Bug#728304: for schroot backend allow to run tests as user while installation steps as root

Martin Pitt martin at piware.de
Fri Dec 20 12:25:11 UTC 2013

Hello Yaroslav,

Yaroslav Halchenko [2013-10-30  8:48 -0400]:
> Adding user's login to root-users configuration of schroot allows  autopkgtest
> to invoke apt-get with necessary privileges, but then tests also run
> under root user, instead of the original user

Please note that you can have this behaviour with the current
autopkgtest if you explicitly specify the "--user $USER" adt-run
option. Then it'll use root to install dependencies and $USER to run
tests. There already was a test to make sure that works, I just
committed some extended tests that also make sure that dependency
installation still works with --user, and that "needs-root" is
respected properly.

Indeed the test gets run as root if you call adt-run as normal user
with the schroot runner. It should default to running them as the
calling user instead. I'll devote this bug report to this.



Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

More information about the autopkgtest-devel mailing list