Comment 1 for bug 558728

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

Hello, the following information should complete this bug as a valid SRU report, to hopefully upload this fix to Lucid.

Note that even though the data is collected, checkbox doesn't actually include it in any reports. This is used when doing a certification run using checkbox-compatibility.

Solution:
Checkbox revision 784 changes the job definition to run as root, which causes checkbox to run it through the superprivileged backend.

TEST CASE:
For this test case we need to come up with a way of including the cdimage information in a report, so we can verify the behavior. Do this test on a Lucid 10.04 system (a virtual machine works fine).

1- Drop the attached text_report.py file in /usr/share/dropbox/plugins.
2- Launch System Testing
3- Deselect all tests and complete the test run (should be quick).
4- Look at ~/.cache/checkbox/text_report.txt which should contain information about the cd image used to install.
5- delete the whole .cache/checkbox directory.
6- rename /var/log/installer/media-info so that checkbox doesn't find it and tries to use the casper.log fallback.
7- Rerun steps 2-3 to do another test run.
8- Confirm that ~/.cache/checkbox/text_report.txt did NOT get created, meaning that cdimage_resource was unable to gather the requested information due to inability to read /var/log/installer/casper.log.

With the fix applied, the text_report.txt gets created even without the media info file, by taking the data from casper.log read running as root.

Regression potential:
The fix only makes the script run as root instead of the current user, nothing else in the code has changed. Since checkbox is installed system-wide, there's no chance of a regression where the script doesn't run due to the user change. Also, cdimage_resource opens files read-only so even if it runs as root, it won't affect the system in ways that weren't present before.