tests: fix order of fakechroot + fakeroot nesting
As noted in the fakechroot(1) man page, fakeroot and fakechroot might wrap the same C library functions. Arch Linux hit this recently with calls to stat(). It is important to start the fake environment in proper order - fakeroot should be started inside fakechroot. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
34611a6643
commit
05f283b5ad
1 changed files with 8 additions and 6 deletions
|
@ -240,18 +240,20 @@ class pmtest(object):
|
|||
|
||||
cmd = []
|
||||
if os.geteuid() != 0:
|
||||
fakeroot = util.which("fakeroot")
|
||||
if not fakeroot:
|
||||
tap.diag("WARNING: fakeroot not found!")
|
||||
else:
|
||||
cmd.append("fakeroot")
|
||||
|
||||
# fakechroot must be called before fakeroot due to potential
|
||||
# potential interactions when wrapping the same C functions
|
||||
fakechroot = util.which("fakechroot")
|
||||
if not fakechroot:
|
||||
tap.diag("WARNING: fakechroot not found!")
|
||||
else:
|
||||
cmd.append("fakechroot")
|
||||
|
||||
fakeroot = util.which("fakeroot")
|
||||
if not fakeroot:
|
||||
tap.diag("WARNING: fakeroot not found!")
|
||||
else:
|
||||
cmd.append("fakeroot")
|
||||
|
||||
if pacman["gdb"]:
|
||||
cmd.extend(["libtool", "execute", "gdb", "--args"])
|
||||
if pacman["valgrind"]:
|
||||
|
|
Loading…
Add table
Reference in a new issue