aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2011-12-28 15:26:18 -0500
committerAnthony G. Basile <blueness@gentoo.org>2011-12-28 15:26:18 -0500
commit983f8fb7e0630ec3af6b14888860bd146b554270 (patch)
treec41d9f4d419a964dfd1e22f791e517aaf49b43a2
parentmisc/test-revdep-pax: test package for revdep-pax (diff)
downloadelfix-983f8fb7e0630ec3af6b14888860bd146b554270.tar.gz
elfix-983f8fb7e0630ec3af6b14888860bd146b554270.tar.bz2
elfix-983f8fb7e0630ec3af6b14888860bd146b554270.zip
misc/test-revdep-pax/testrevdeppax.sh: added test script
-rw-r--r--misc/test-revdep-pax/Makefile.am2
-rwxr-xr-x[-rw-r--r--]misc/test-revdep-pax/testrevdeppax.sh30
2 files changed, 30 insertions, 2 deletions
diff --git a/misc/test-revdep-pax/Makefile.am b/misc/test-revdep-pax/Makefile.am
index d29bd12..1bb9a2e 100644
--- a/misc/test-revdep-pax/Makefile.am
+++ b/misc/test-revdep-pax/Makefile.am
@@ -7,4 +7,4 @@ testrevdeppax_LDADD = libmyrevdeppax.la
lib_LTLIBRARIES = libmyrevdeppax.la
libmyrevdeppax_la_SOURCES = libmyrevdeppax.c
-bin_SCRIPTS = testrevdeppax.sh
+dist_bin_SCRIPTS = testrevdeppax.sh
diff --git a/misc/test-revdep-pax/testrevdeppax.sh b/misc/test-revdep-pax/testrevdeppax.sh
index 60a97d7..75419e8 100644..100755
--- a/misc/test-revdep-pax/testrevdeppax.sh
+++ b/misc/test-revdep-pax/testrevdeppax.sh
@@ -1,3 +1,31 @@
#!/bin/bash
-echo "stub"
+PAXCTLNG="/usr/sbin/paxctl-ng"
+BINARY="/usr/bin/testrevdeppax"
+LIBRARY="/usr/lib/libmyrevdeppax.so.0.0.0"
+REVDEPPAX="/usr/sbin/revdep-pax"
+
+[[ ! -x $PAXCTLNG || ! -x $BINARY || ! -e $LIBRARY || ! -x $REVDEPPAX ]] && {
+ echo "Critical file not found"
+ exit 1
+}
+
+echo
+echo "Testing reverse migration $LIBRARY -> $BINARY"
+echo "(This will take a while)"
+echo
+
+for i in 'R' 'r' 'Rr'
+do
+ for j in 'R' 'r' 'Rr'
+ do
+ $PAXCTLNG -z $BINARY
+ $PAXCTLNG -$i $BINARY
+ $PAXCTLNG -z $LIBRARY
+ $PAXCTLNG -$j $LIBRARY
+ echo "Binary -> $i"
+ echo "Library -> $j"
+ $REVDEPPAX -m -l $LIBRARY
+ echo
+ done
+done