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
=== modified file 'checkbox-old/debian/changelog'
--- checkbox-old/debian/changelog 2013-10-18 20:56:12 +0000
+++ checkbox-old/debian/changelog 2013-10-23 09:38:00 +0000
@@ -8,6 +8,12 @@
8 * jobs/ethernet.txt.in - added test for running ethtool queries against all 8 * jobs/ethernet.txt.in - added test for running ethtool queries against all
9 devices found on the system.9 devices found on the system.
1010
11 [ Brendan Donegan ]
12 * jobs/resources.txt.in, jobs/power-management.txt.in - refactor rtc test so
13 that it actually tests the RTC instead of just checking for its presence.
14 Also create a resource job to allow other jobs to determine if an RTC is
15 present. (LP: #1184733)
16
11 -- Sylvain Pineau <sylvain.pineau@canonical.com> Fri, 18 Oct 2013 15:36:53 -040017 -- Sylvain Pineau <sylvain.pineau@canonical.com> Fri, 18 Oct 2013 15:36:53 -0400
1218
13checkbox (0.16.13) saucy; urgency=low19checkbox (0.16.13) saucy; urgency=low
1420
=== modified file 'checkbox-old/jobs/hibernate.txt.in'
--- checkbox-old/jobs/hibernate.txt.in 2013-10-01 19:28:56 +0000
+++ checkbox-old/jobs/hibernate.txt.in 2013-10-23 09:38:00 +0000
@@ -1,6 +1,8 @@
1plugin: user-interact-verify1plugin: user-interact-verify
2name: power-management/hibernate_advanced2name: power-management/hibernate_advanced
3depends: power-management/rtc3requires:
4 sleep.disk == 'supported'
5 rtc.state == 'supported'
4environ: CHECKBOX_DATA6environ: CHECKBOX_DATA
5user: root7user: root
6command:8command:
79
=== modified file 'checkbox-old/jobs/power-management.txt.in'
--- checkbox-old/jobs/power-management.txt.in 2013-10-01 19:28:58 +0000
+++ checkbox-old/jobs/power-management.txt.in 2013-10-23 09:38:00 +0000
@@ -130,11 +130,14 @@
130130
131plugin: shell131plugin: shell
132name: power-management/rtc132name: power-management/rtc
133command:133requires:
134 test -e /dev/rtc || ( echo "ERROR: Real Time Clock not found" >&2 && exit 1 )134 rtc.state == 'supported'
135 package.name == 'util-linux'
136user: root
137command: hwclock -r
135estimated_duration: 0.02138estimated_duration: 0.02
136_description:139_description:
137 Make sure that the RTC (Real-Time Clock) device exists.140 Verify that the Real-time clock (RTC) device functions properly, if present
138141
139plugin: shell142plugin: shell
140name: power-management/tickless_idle143name: power-management/tickless_idle
141144
=== modified file 'checkbox-old/jobs/resource.txt.in'
--- checkbox-old/jobs/resource.txt.in 2013-10-17 14:36:03 +0000
+++ checkbox-old/jobs/resource.txt.in 2013-10-23 09:38:00 +0000
@@ -171,3 +171,15 @@
171requires: package.name == "iw"171requires: package.name == "iw"
172estimated_duration: 0.04172estimated_duration: 0.04
173description: Creates resource info for wifi supported interface modes.173description: Creates resource info for wifi supported interface modes.
174
175name: rtc
176plugin: resource
177command:
178 if [ -e /sys/class/rtc ]
179 then
180 echo "state: supported"
181 else
182 echo "state: unsupported"
183 fi
184estimated_duration: 0.04
185description: Creates resource info for RTC
174186
=== modified file 'checkbox-old/jobs/stress.txt.in'
--- checkbox-old/jobs/stress.txt.in 2013-10-01 19:28:58 +0000
+++ checkbox-old/jobs/stress.txt.in 2013-10-23 09:38:00 +0000
@@ -11,8 +11,10 @@
11plugin: shell11plugin: shell
12name: power-management/hibernate_30_cycles12name: power-management/hibernate_30_cycles
13depends:13depends:
14 power-management/rtc
15 power-management/hibernate_advanced14 power-management/hibernate_advanced
15requires:
16 sleep.disk == 'supported'
17 rtc.state == 'supported'
16environ: CHECKBOX_DATA18environ: CHECKBOX_DATA
17user: root19user: root
18command:20command:
1921
=== modified file 'checkbox-old/jobs/suspend.txt.in'
--- checkbox-old/jobs/suspend.txt.in 2013-10-17 17:15:29 +0000
+++ checkbox-old/jobs/suspend.txt.in 2013-10-23 09:38:00 +0000
@@ -161,9 +161,9 @@
161161
162plugin: user-verify162plugin: user-verify
163name: suspend/suspend_advanced163name: suspend/suspend_advanced
164depends: power-management/rtc
165requires:164requires:
166 sleep.mem == 'supported'165 sleep.mem == 'supported'
166 rtc.state == 'supported'
167user: root167user: root
168environ: CHECKBOX_DATA168environ: CHECKBOX_DATA
169command:169command:
@@ -189,9 +189,9 @@
189189
190plugin: shell190plugin: shell
191name: suspend/suspend_advanced_auto191name: suspend/suspend_advanced_auto
192depends: power-management/rtc
193requires:192requires:
194 sleep.mem == 'supported'193 sleep.mem == 'supported'
194 rtc.state == 'supported'
195_description:195_description:
196 This is the automated version of suspend/suspend_advanced.196 This is the automated version of suspend/suspend_advanced.
197user: root197user: root

Subscribers

People subscribed via source and target branches