diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-12-28 15:26:18 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-12-28 19:58:58 -0500 |
commit | a434d53d513136edafbc54451b968596e0278de9 (patch) | |
tree | 377cc47e4a89f61fc3e40e471a775493691b3cbb | |
parent | misc/test-revdep-pax: test package for revdep-pax (diff) | |
download | elfix-a434d53d513136edafbc54451b968596e0278de9.tar.gz elfix-a434d53d513136edafbc54451b968596e0278de9.tar.bz2 elfix-a434d53d513136edafbc54451b968596e0278de9.zip |
misc/test-revdep-pax/testrevdeppax.sh: added test script
-rw-r--r-- | misc/test-revdep-pax/Makefile.am | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | misc/test-revdep-pax/testrevdeppax.sh | 30 |
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 |