summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-10-06 10:09:10 +0200
committerAllan McRae <allan@archlinux.org>2014-10-13 07:10:37 +0200
commit627ede877920d82ae6d1c9cc2d41c04cbc62ff25 (patch)
treeb1a491df0f2508ed5462966edd029eeb4488f784
parentc1d6cec2e277eea7affa43601086c523311b58c0 (diff)
downloadpacman-627ede877920d82ae6d1c9cc2d41c04cbc62ff25.tar.gz
pacman-627ede877920d82ae6d1c9cc2d41c04cbc62ff25.tar.xz
add pacman-db-upgrade test
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--Makefile.am1
-rw-r--r--test/scripts/pacman-db-upgrade-v9.py21
-rw-r--r--valgrind.supp18
3 files changed, 40 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 44a23414..e9b3dfa1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,6 +28,7 @@ $(top_srcdir)/test/pacman/tests/TESTS: $(wildcard test/pacman/tests/*.py*)
TESTS = test/scripts/parseopts_test.sh \
test/scripts/human_to_size_test.sh \
+ test/scripts/pacman-db-upgrade-v9.py \
test/util/pacsorttest.sh \
test/util/vercmptest.sh
include $(top_srcdir)/test/pacman/tests/TESTS
diff --git a/test/scripts/pacman-db-upgrade-v9.py b/test/scripts/pacman-db-upgrade-v9.py
new file mode 100644
index 00000000..dc6f97d6
--- /dev/null
+++ b/test/scripts/pacman-db-upgrade-v9.py
@@ -0,0 +1,21 @@
+self.description = "pacman-db-upgrade DB version 9 (symlink support removal)"
+
+self.filesystem = [ "mnt_real/subdir/", "mnt -> mnt_real/subdir/", "bar -> ./" ]
+
+fpkg = pmpkg("filesystem")
+fpkg.files = ["mnt_real/", "mnt/", "mnt/foo", "bar/", "bar/baz"]
+fpkg.backup = ["mnt/foo"]
+
+self.addpkg2db("local", fpkg)
+self.dbver = 8
+
+self.cmd = ["pacman-db-upgrade", "--root", self.root + "/"]
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_BACKUP=filesystem|mnt_real/subdir/foo")
+self.addrule("PKG_FILES=filesystem|mnt_real/")
+self.addrule("PKG_FILES=filesystem|mnt_real/subdir/")
+self.addrule("PKG_FILES=filesystem|mnt_real/subdir/foo")
+self.addrule("PKG_FILES=filesystem|baz")
+self.addrule("!PKG_FILES=filesystem|mnt/")
+self.addrule("!PKG_FILES=filesystem|bar/")
diff --git a/valgrind.supp b/valgrind.supp
index ac54b74d..7da71635 100644
--- a/valgrind.supp
+++ b/valgrind.supp
@@ -149,3 +149,21 @@
Memcheck:Cond
fun:__lxstat
}
+{
+ bash-is-a-sieve
+ Memcheck:Leak
+ match-leak-kinds: reachable,definite,indirect
+ ...
+ obj:*/bash
+}
+{
+ fakechroot-call-init
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ obj:/usr/lib/libfakeroot/fakechroot/libfakechroot.so
+ fun:call_init.part.0
+ fun:_dl_init
+ obj:/usr/lib/ld-2.20.so
+ ...
+}