[pacman-dev] [PATCH] [pactest] Check for fakeroot in ldconfig tests

Chirantan Ekbote chirantan.ekbote at gmail.com
Thu Jan 31 19:11:56 EST 2013


libalpm runs ldconfig inside chroot so we should expect failure when
testing if fakechroot is not installed.

Fixes FS#33551.

Signed-off-by: Chirantan Ekbote <chirantan.ekbote at gmail.com>
---
 test/pacman/tests/ldconfig001.py | 4 ++++
 test/pacman/tests/ldconfig002.py | 4 ++++
 test/pacman/tests/ldconfig003.py | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/test/pacman/tests/ldconfig001.py b/test/pacman/tests/ldconfig001.py
index a97f28c..cbc4695 100644
--- a/test/pacman/tests/ldconfig001.py
+++ b/test/pacman/tests/ldconfig001.py
@@ -7,3 +7,7 @@
 
 self.addrule("PACMAN_RETCODE=0")
 self.addrule("FILE_EXIST=etc/ld.so.cache")
+
+fakechroot = util.which("fakechroot")
+if not fakechroot:
+	self.expectfailure = True
diff --git a/test/pacman/tests/ldconfig002.py b/test/pacman/tests/ldconfig002.py
index 07f2ec6..2b5d833 100644
--- a/test/pacman/tests/ldconfig002.py
+++ b/test/pacman/tests/ldconfig002.py
@@ -11,3 +11,7 @@
 self.addrule("PACMAN_RETCODE=0")
 self.addrule("PKG_VERSION=dummy|1.0-2")
 self.addrule("FILE_EXIST=etc/ld.so.cache")
+
+fakechroot = util.which("fakechroot")
+if not fakechroot:
+	self.expectfailure = True
diff --git a/test/pacman/tests/ldconfig003.py b/test/pacman/tests/ldconfig003.py
index 9b2967e..40fcfb2 100644
--- a/test/pacman/tests/ldconfig003.py
+++ b/test/pacman/tests/ldconfig003.py
@@ -7,3 +7,7 @@
 
 self.addrule("PACMAN_RETCODE=0")
 self.addrule("FILE_EXIST=etc/ld.so.cache")
+
+fakechroot = util.which("fakechroot")
+if not fakechroot:
+	self.expectfailure = True
-- 
1.8.1.2



More information about the pacman-dev mailing list