Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/elfix:elfix-0.4.x commit in: misc/test-revdep-pax/
Date: Thu, 29 Dec 2011 01:01:46
Message-Id: a434d53d513136edafbc54451b968596e0278de9.blueness@gentoo
1 commit: a434d53d513136edafbc54451b968596e0278de9
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 28 20:26:18 2011 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 29 00:58:58 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=a434d53d
7
8 misc/test-revdep-pax/testrevdeppax.sh: added test script
9
10 ---
11 misc/test-revdep-pax/Makefile.am | 2 +-
12 misc/test-revdep-pax/testrevdeppax.sh | 30 +++++++++++++++++++++++++++++-
13 2 files changed, 30 insertions(+), 2 deletions(-)
14
15 diff --git a/misc/test-revdep-pax/Makefile.am b/misc/test-revdep-pax/Makefile.am
16 index d29bd12..1bb9a2e 100644
17 --- a/misc/test-revdep-pax/Makefile.am
18 +++ b/misc/test-revdep-pax/Makefile.am
19 @@ -7,4 +7,4 @@ testrevdeppax_LDADD = libmyrevdeppax.la
20 lib_LTLIBRARIES = libmyrevdeppax.la
21 libmyrevdeppax_la_SOURCES = libmyrevdeppax.c
22
23 -bin_SCRIPTS = testrevdeppax.sh
24 +dist_bin_SCRIPTS = testrevdeppax.sh
25
26 diff --git a/misc/test-revdep-pax/testrevdeppax.sh b/misc/test-revdep-pax/testrevdeppax.sh
27 old mode 100644
28 new mode 100755
29 index 60a97d7..75419e8
30 --- a/misc/test-revdep-pax/testrevdeppax.sh
31 +++ b/misc/test-revdep-pax/testrevdeppax.sh
32 @@ -1,3 +1,31 @@
33 #!/bin/bash
34
35 -echo "stub"
36 +PAXCTLNG="/usr/sbin/paxctl-ng"
37 +BINARY="/usr/bin/testrevdeppax"
38 +LIBRARY="/usr/lib/libmyrevdeppax.so.0.0.0"
39 +REVDEPPAX="/usr/sbin/revdep-pax"
40 +
41 +[[ ! -x $PAXCTLNG || ! -x $BINARY || ! -e $LIBRARY || ! -x $REVDEPPAX ]] && {
42 + echo "Critical file not found"
43 + exit 1
44 +}
45 +
46 +echo
47 +echo "Testing reverse migration $LIBRARY -> $BINARY"
48 +echo "(This will take a while)"
49 +echo
50 +
51 +for i in 'R' 'r' 'Rr'
52 +do
53 + for j in 'R' 'r' 'Rr'
54 + do
55 + $PAXCTLNG -z $BINARY
56 + $PAXCTLNG -$i $BINARY
57 + $PAXCTLNG -z $LIBRARY
58 + $PAXCTLNG -$j $LIBRARY
59 + echo "Binary -> $i"
60 + echo "Library -> $j"
61 + $REVDEPPAX -m -l $LIBRARY
62 + echo
63 + done
64 +done