Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/elfix:master commit in: /, tests/gnustack/, tests/, tests/pxtpax/
Date: Tue, 15 Nov 2011 19:25:35
Message-Id: 42d211fc0b735d29c98fe91e0a2a69380d5dfaa3.blueness@gentoo
1 commit: 42d211fc0b735d29c98fe91e0a2a69380d5dfaa3
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 15 19:25:18 2011 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 15 19:25:18 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=42d211fc
7
8 Fix some bugs in tests/*
9
10 ---
11 configure.ac | 1 -
12 tests/Makefile.am | 2 +-
13 tests/gnustack/Makefile.am | 4 ++--
14 tests/pxtpax/Makefile | 15 ---------------
15 tests/pxtpax/Makefile.am | 7 ++++++-
16 tests/pxtpax/{test.sh => dotest.sh} | 8 ++++++--
17 6 files changed, 15 insertions(+), 22 deletions(-)
18
19 diff --git a/configure.ac b/configure.ac
20 index 57ca11b..18331f1 100644
21 --- a/configure.ac
22 +++ b/configure.ac
23 @@ -56,7 +56,6 @@ AC_CONFIG_FILES([
24 doc/Makefile
25 tests/Makefile
26 tests/gnustack/Makefile
27 - tests/gnustack/Makefile
28 tests/pxtpax/Makefile
29 ])
30
31
32 diff --git a/tests/Makefile.am b/tests/Makefile.am
33 index 9744798..d1becd2 100644
34 --- a/tests/Makefile.am
35 +++ b/tests/Makefile.am
36 @@ -1 +1 @@
37 -SUBDIRS = gnustack xtpax
38 +SUBDIRS = gnustack pxtpax
39
40 diff --git a/tests/gnustack/Makefile.am b/tests/gnustack/Makefile.am
41 index b0b054f..af11d60 100644
42 --- a/tests/gnustack/Makefile.am
43 +++ b/tests/gnustack/Makefile.am
44 @@ -18,10 +18,10 @@ test.sh:
45 @echo "================================================================================"
46 @echo
47 @echo "Fixing Bad GNU_STACK Elf"
48 - @../src/fix-gnustack -f bad-gnustack
49 + @../../src/fix-gnustack -f bad-gnustack
50 @echo
51 @echo "Fixed Bad GNU_STACK Elf"
52 - @../src/fix-gnustack bad-gnustack
53 + @../../src/fix-gnustack bad-gnustack
54 @echo
55 @echo "================================================================================"
56
57
58 diff --git a/tests/pxtpax/Makefile b/tests/pxtpax/Makefile
59 deleted file mode 100644
60 index bc2845b..0000000
61 --- a/tests/pxtpax/Makefile
62 +++ /dev/null
63 @@ -1,15 +0,0 @@
64 -
65 -.PHONY: all
66 -all: test
67 -
68 -.PHONY: test
69 -test: daemon init.sh test.sh
70 - @echo "xattr process"
71 - @$(PWD)/test.sh
72 -
73 -daemon: daemon.c
74 - gcc -o $@ $^
75 - paxctl-ng -cv $@
76 -
77 -clean:
78 - rm -f daemon daemon.pid
79
80 diff --git a/tests/pxtpax/Makefile.am b/tests/pxtpax/Makefile.am
81 index 4770a08..55f9957 100644
82 --- a/tests/pxtpax/Makefile.am
83 +++ b/tests/pxtpax/Makefile.am
84 @@ -1,7 +1,12 @@
85 noinst_PROGRAMS = daemon
86 daemon_SOURCES = daemon.c
87
88 -EXTRA_DIST = init.sh test.sh
89 +EXTRA_DIST = init.sh dotest.sh
90
91 check_SCRIPTS = test.sh
92 TEST = $(check_SCRIPTS)
93 +
94 +test.sh:
95 + ./dotest.sh
96 +
97 +CLEANFILES = daemon.pid
98
99 diff --git a/tests/pxtpax/test.sh b/tests/pxtpax/dotest.sh
100 similarity index 74%
101 rename from tests/pxtpax/test.sh
102 rename to tests/pxtpax/dotest.sh
103 index 6db0e4d..1003d0a 100755
104 --- a/tests/pxtpax/test.sh
105 +++ b/tests/pxtpax/dotest.sh
106 @@ -4,9 +4,11 @@ PWD=$(pwd)
107 INITSH="${PWD}"/init.sh
108 DAEMON="${PWD}"/daemon
109 PIDFILE="${PWD}"/daemon.pid
110 +PAXCTLNG="../../src/paxctl-ng"
111
112 -paxctl-ng -cv ${DAEMON}
113 +${PAXCTLNG} -cv ${DAEMON} 2>&1 1>/dev/null
114
115 +echo "xattr process"
116 for pf in "p" "P"; do
117 for ef in "e" "E"; do
118 for mf in "m" "M"; do
119 @@ -14,13 +16,15 @@ for pf in "p" "P"; do
120 for sf in "s" "S"; do
121 flags="${pf}${ef}${mf}${rf}${sf}"
122 echo -n ${flags} " "
123 - paxctl-ng -"${flags}" ${DAEMON} 2>&1 1>/dev/null
124 + ${PAXCTLNG} -"${flags}" ${DAEMON} 2>&1 1>/dev/null
125 ${INITSH} start
126 if [ -f "${PIDFILE}" ]
127 then
128 rflags=$(cat /proc/$(cat ${PIDFILE})/status | grep ^PaX | awk '{ print $2 }')
129 echo -n ${rflags}
130 ${INITSH} stop
131 + else
132 + echo -n "no daemon"
133 fi
134 echo
135 done