adt-run could export the SUDO_ASKPASS variable to the testbed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autopkgtest (Ubuntu) |
Fix Released
|
Wishlist
|
Martin Pitt |
Bug Description
It would be good to store the location of the SUDO_ASKPASS script on the testbed, so that specific commands can be run as root even though the rest of the test is running as the user.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: autopkgtest 3.11.1
ProcVersionSign
Uname: Linux 3.19.0-7-generic x86_64
ApportVersion: 2.16.2-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Mar 12 15:26:53 2015
InstallationDate: Installed on 2013-11-30 (467 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
PackageArchitec
SourcePackage: autopkgtest
SystemImageInfo:
current build number: 0
device name:
channel: daily
last update: Unknown
UpgradeStatus: Upgraded to vivid on 2015-02-10 (30 days ago)
Done in http:// anonscm. debian. org/cgit/ autopkgtest/ autopkgtest. git/commit/ ?id=67e6d01f .
The whole sudo handling could probably be generalized to all virt runners at some point, but for now this works with the ssh runner. Tests can now just do "sudo -A". But note that it's not always a given that sudo is available, so either test [ -n $SUDO_ASKPASS ] or be prepared that sudo -A fails, and skip tests accordingly.