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 = []
|
cmd = []
|
||||||
if os.geteuid() != 0:
|
if os.geteuid() != 0:
|
||||||
fakeroot = util.which("fakeroot")
|
# fakechroot must be called before fakeroot due to potential
|
||||||
if not fakeroot:
|
# potential interactions when wrapping the same C functions
|
||||||
tap.diag("WARNING: fakeroot not found!")
|
|
||||||
else:
|
|
||||||
cmd.append("fakeroot")
|
|
||||||
|
|
||||||
fakechroot = util.which("fakechroot")
|
fakechroot = util.which("fakechroot")
|
||||||
if not fakechroot:
|
if not fakechroot:
|
||||||
tap.diag("WARNING: fakechroot not found!")
|
tap.diag("WARNING: fakechroot not found!")
|
||||||
else:
|
else:
|
||||||
cmd.append("fakechroot")
|
cmd.append("fakechroot")
|
||||||
|
|
||||||
|
fakeroot = util.which("fakeroot")
|
||||||
|
if not fakeroot:
|
||||||
|
tap.diag("WARNING: fakeroot not found!")
|
||||||
|
else:
|
||||||
|
cmd.append("fakeroot")
|
||||||
|
|
||||||
if pacman["gdb"]:
|
if pacman["gdb"]:
|
||||||
cmd.extend(["libtool", "execute", "gdb", "--args"])
|
cmd.extend(["libtool", "execute", "gdb", "--args"])
|
||||||
if pacman["valgrind"]:
|
if pacman["valgrind"]:
|
||||||
|
|
Loading…
Add table
Reference in a new issue