power-management/fwts_wakealarm not run as root, fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
High
|
Daniel Manrique | ||
checkbox (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
This was reported using checkbox-
Even though it appears as PASS on the test report, fwts-wakealarm.log shows the test didn't run as intended:
00012 wakealarm Test ACPI Wakealarm.
00013 wakealarm -------
00014 wakealarm Must be run as root or sudo to be able to read system information.
00015 wakealarm Aborted test, insufficient privilege.
00016 wakealarm =======
00017 wakealarm 0 passed, 0 failed, 0 warnings, 4 aborted, 0 skipped, 0 info only.
00018 wakealarm =======
This is because the test definition does not specify user: root.
Thus, even if the job is not normally run by Ubuntu users, if they attempt to run it it will produce bogus information and not run at all.
The solution implemented in the development version is to make this job use root. Also, the "environ" directive must be used to instruct the job to save its log file in the checkbox data directory (otherwise it will save it in /).
The job is defined in jobs/power-
[Test case]
- Install fwts (sudo apt-get install fwts)
- Run checkbox like this (what this does is specify a whitelist on-the-fly with the failing job):
checkbox-qt -W <(cat <<EOF
`head -n 14 /usr/share/
__power-
power-managemen
EOF
)
- Click on "start testing" when you see the list of tests (there should be only one).
Expected result:
- System suspends and then wakes up.
- A log file is left in ~/.cache/
Actual result:
- Test is marked as passed
- However, in ~/.cache/
[Regression potential]
A slight chance for regression exists in that, if a system that wasn't running this test correctly now runs it, and the system fails to suspend properly, it may cause a system crash. The user is properly warned to save his work since checkbox tests may cause the system to stop responding so the impact from this should be minimal. Also, since this test is not run by default, it should only affect users who knowingly want to use it.
Related branches
- Marc Tardif (community): Approve
-
Diff: 48 lines (+6/-2)3 files modifieddebian/changelog (+4/-2)
jobs/power-management.txt.in (+1/-0)
jobs/usb.txt.in (+1/-0)
Changed in checkbox: | |
milestone: | none → 0.14 |
importance: | Undecided → High |
Changed in checkbox: | |
status: | New → In Progress |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
assignee: | nobody → Daniel Manrique (roadmr) |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
description: | updated |
description: | updated |
description: | updated |
Changed in checkbox (Ubuntu): | |
status: | New → Fix Released |
Hello Daniel, or anyone else affected,
Accepted checkbox into precise-proposed. The package will build now and be available at http:// launchpad. net/ubuntu/ +source/ checkbox/ 0.13.8 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification- failed. In either case, details of your testing will help us make a better decision.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance!