diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py index 3de35c43..f3375e82 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py @@ -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"]: