Comment 5 for bug 1178800

Revision history for this message
James E. Blair (corvus) wrote :

Hi,

We have two protections against this sort of thing in Jenkins:

1) The jenkins user on the unit test slaves does not have general sudo ability, so all sudo commands will fail (there may be a password prompt).

2) We have a script that detects whether a sudo attempt occurred, and fails the test with an appropriate error message.

In examining the logs from these tests, we found that the sudo command was run, but failed. That suggests that while this test causes sudo to be run, the test itself does not fail if sudo fails (at least, not in the way that sudo fails when invoked under Jenkins). So layer (1) above holds.

Unfortunately, when we moved the test runners to quantal, the sudo log format changed, and our sudo detection script in (2) did not catch it, and so did not explicitly fail the test for having attempted to run sudo. This will be rectified shortly as we move the test runners back to precise (and the next time we change test runners, we'll check if the script needs updating).