Merge lp:~brendan-donegan/checkbox/bug1184733 into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Approved by: Daniel Manrique
Approved revision: 2466
Merged at revision: 2467
Proposed branch: lp:~brendan-donegan/checkbox/bug1184733
Merge into: lp:checkbox
Diff against target: 114 lines (+32/-7)
6 files modified
checkbox-old/debian/changelog (+6/-0)
checkbox-old/jobs/hibernate.txt.in (+3/-1)
checkbox-old/jobs/power-management.txt.in (+6/-3)
checkbox-old/jobs/resource.txt.in (+12/-0)
checkbox-old/jobs/stress.txt.in (+3/-1)
checkbox-old/jobs/suspend.txt.in (+2/-2)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug1184733
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Brendan Donegan (community) Needs Resubmitting
Review via email: mp+192137@code.launchpad.net

Description of the change

The RTC tests were causing some false positives on ARM because they assumed every system should have an RTC with the device name /dev/rtc. This isn't necessarily the case. What's more not every system will have an RTC. Also we weren't really testing the RTC as much as just checking it was there, so this branch modifies the rtc test to actually exercise the RTC (by querying it's current time)

To post a comment you must log in.
2465. By Brendan Donegan

Change other uses of rtc job

Revision history for this message
Daniel Manrique (roadmr) wrote :

Running hwclock -r without sudo results in :

$ hwclock -r
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.

I think this needs user: root to function properly:

$ sudo hwclock -r
Tue 22 Oct 2013 05:52:07 AM EDT -0.781760 seconds

review: Needs Fixing
2466. By Brendan Donegan

Add root user to rtc job

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Oh! That's weird - I don't need sudo here to read - just to set. Well, I guess it won't do any harm so - added!

review: Needs Resubmitting
Revision history for this message
Daniel Manrique (roadmr) wrote :

hm, can you verify the mode for your rtc device?

$ ls -la /dev/rtc0
crw------- 1 root root 254, 0 Oct 23 09:10 /dev/rtc0

I checked that it's like this on our SUTs so if your permissions are different, they'd seem to be the exception.

review: Needs Information
Revision history for this message
Daniel Manrique (roadmr) wrote :

not too important anyway, let's set to root and approve this :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-old/debian/changelog'
2--- checkbox-old/debian/changelog 2013-10-18 20:56:12 +0000
3+++ checkbox-old/debian/changelog 2013-10-23 09:38:00 +0000
4@@ -8,6 +8,12 @@
5 * jobs/ethernet.txt.in - added test for running ethtool queries against all
6 devices found on the system.
7
8+ [ Brendan Donegan ]
9+ * jobs/resources.txt.in, jobs/power-management.txt.in - refactor rtc test so
10+ that it actually tests the RTC instead of just checking for its presence.
11+ Also create a resource job to allow other jobs to determine if an RTC is
12+ present. (LP: #1184733)
13+
14 -- Sylvain Pineau <sylvain.pineau@canonical.com> Fri, 18 Oct 2013 15:36:53 -0400
15
16 checkbox (0.16.13) saucy; urgency=low
17
18=== modified file 'checkbox-old/jobs/hibernate.txt.in'
19--- checkbox-old/jobs/hibernate.txt.in 2013-10-01 19:28:56 +0000
20+++ checkbox-old/jobs/hibernate.txt.in 2013-10-23 09:38:00 +0000
21@@ -1,6 +1,8 @@
22 plugin: user-interact-verify
23 name: power-management/hibernate_advanced
24-depends: power-management/rtc
25+requires:
26+ sleep.disk == 'supported'
27+ rtc.state == 'supported'
28 environ: CHECKBOX_DATA
29 user: root
30 command:
31
32=== modified file 'checkbox-old/jobs/power-management.txt.in'
33--- checkbox-old/jobs/power-management.txt.in 2013-10-01 19:28:58 +0000
34+++ checkbox-old/jobs/power-management.txt.in 2013-10-23 09:38:00 +0000
35@@ -130,11 +130,14 @@
36
37 plugin: shell
38 name: power-management/rtc
39-command:
40- test -e /dev/rtc || ( echo "ERROR: Real Time Clock not found" >&2 && exit 1 )
41+requires:
42+ rtc.state == 'supported'
43+ package.name == 'util-linux'
44+user: root
45+command: hwclock -r
46 estimated_duration: 0.02
47 _description:
48- Make sure that the RTC (Real-Time Clock) device exists.
49+ Verify that the Real-time clock (RTC) device functions properly, if present
50
51 plugin: shell
52 name: power-management/tickless_idle
53
54=== modified file 'checkbox-old/jobs/resource.txt.in'
55--- checkbox-old/jobs/resource.txt.in 2013-10-17 14:36:03 +0000
56+++ checkbox-old/jobs/resource.txt.in 2013-10-23 09:38:00 +0000
57@@ -171,3 +171,15 @@
58 requires: package.name == "iw"
59 estimated_duration: 0.04
60 description: Creates resource info for wifi supported interface modes.
61+
62+name: rtc
63+plugin: resource
64+command:
65+ if [ -e /sys/class/rtc ]
66+ then
67+ echo "state: supported"
68+ else
69+ echo "state: unsupported"
70+ fi
71+estimated_duration: 0.04
72+description: Creates resource info for RTC
73
74=== modified file 'checkbox-old/jobs/stress.txt.in'
75--- checkbox-old/jobs/stress.txt.in 2013-10-01 19:28:58 +0000
76+++ checkbox-old/jobs/stress.txt.in 2013-10-23 09:38:00 +0000
77@@ -11,8 +11,10 @@
78 plugin: shell
79 name: power-management/hibernate_30_cycles
80 depends:
81- power-management/rtc
82 power-management/hibernate_advanced
83+requires:
84+ sleep.disk == 'supported'
85+ rtc.state == 'supported'
86 environ: CHECKBOX_DATA
87 user: root
88 command:
89
90=== modified file 'checkbox-old/jobs/suspend.txt.in'
91--- checkbox-old/jobs/suspend.txt.in 2013-10-17 17:15:29 +0000
92+++ checkbox-old/jobs/suspend.txt.in 2013-10-23 09:38:00 +0000
93@@ -161,9 +161,9 @@
94
95 plugin: user-verify
96 name: suspend/suspend_advanced
97-depends: power-management/rtc
98 requires:
99 sleep.mem == 'supported'
100+ rtc.state == 'supported'
101 user: root
102 environ: CHECKBOX_DATA
103 command:
104@@ -189,9 +189,9 @@
105
106 plugin: shell
107 name: suspend/suspend_advanced_auto
108-depends: power-management/rtc
109 requires:
110 sleep.mem == 'supported'
111+ rtc.state == 'supported'
112 _description:
113 This is the automated version of suspend/suspend_advanced.
114 user: root

Subscribers

People subscribed via source and target branches