Unable to complete Power off / Reboot tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
High
|
Daniel Manrique |
Bug Description
While testing the poweroff / reboot tests, the system will shutdown / reboot correctly.
But after it reboots, the small prompt window, which will show test result to tester, will not pop out.
And the log is not complete, the after-boot result is not there.
I think this might related to some policy-kit issue.
This conjecture arose because tester will be asked to enter password when running checkbox.
Checkbox version:
ii checkbox 0.16.4+
ii checkbox-
ii checkbox-
ii checkbox-
ii checkbox-qt 0.16.4+
Please find attachment for the poweroff log.
Related branches
- Daniel Manrique (community): Approve
- Brendan Donegan (community): Approve
-
Diff: 191 lines (+41/-20)2 files modifiedcheckbox-old/debian/changelog (+1/-0)
checkbox-old/scripts/pm_test (+40/-20)
Hello, Po-Hsu!
OK, looks like the username is not being correctly determined by the script. See how it thinks the username is "None", typical of a string representation of a Python variable with value "None":
2013-07-16 04:55:50,064 DEBUG Executing: "sed -i -e '$a# Automatically added by pm.py\\nNone ALL=NOPASSWD: /usr/bin/python' /etc/sudoers".. .config/ autostart/ pm_test. desktop' )...
.
2013-07-16 04:55:50,071 DEBUG Writing desktop file ('~None/
So it's both creating entries for a nonexistent user, and trying to write a file to a bogus location. I suspect you'll find a ~None (literally) directory in the ubuntu user's home dir :)
Looking at the code, the problem is clear: it uses the SUDO_USER variable to determine the username. If running under policykit, this variable is most likely undefined.
username = os.getenv( 'SUDO_USER' )
I'll find an equivalent and ensure the script works well with both, hopefully I'll have something by tomorrow.
Thanks for reporting this!