aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2011-11-15 14:25:18 -0500
committerAnthony G. Basile <blueness@gentoo.org>2011-11-15 14:25:18 -0500
commit42d211fc0b735d29c98fe91e0a2a69380d5dfaa3 (patch)
tree062cdff027705221aa70615f2a512659ed0bdbb3 /tests/pxtpax
parenttests/pxtpax: compare file's and process's pax flags (diff)
downloadelfix-42d211fc0b735d29c98fe91e0a2a69380d5dfaa3.tar.gz
elfix-42d211fc0b735d29c98fe91e0a2a69380d5dfaa3.tar.bz2
elfix-42d211fc0b735d29c98fe91e0a2a69380d5dfaa3.zip
Fix some bugs in tests/*
Diffstat (limited to 'tests/pxtpax')
-rw-r--r--tests/pxtpax/Makefile15
-rw-r--r--tests/pxtpax/Makefile.am7
-rwxr-xr-xtests/pxtpax/dotest.sh (renamed from tests/pxtpax/test.sh)8
3 files changed, 12 insertions, 18 deletions
diff --git a/tests/pxtpax/Makefile b/tests/pxtpax/Makefile
deleted file mode 100644
index bc2845b..0000000
--- a/tests/pxtpax/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-
-.PHONY: all
-all: test
-
-.PHONY: test
-test: daemon init.sh test.sh
- @echo "xattr process"
- @$(PWD)/test.sh
-
-daemon: daemon.c
- gcc -o $@ $^
- paxctl-ng -cv $@
-
-clean:
- rm -f daemon daemon.pid
diff --git a/tests/pxtpax/Makefile.am b/tests/pxtpax/Makefile.am
index 4770a08..55f9957 100644
--- a/tests/pxtpax/Makefile.am
+++ b/tests/pxtpax/Makefile.am
@@ -1,7 +1,12 @@
noinst_PROGRAMS = daemon
daemon_SOURCES = daemon.c
-EXTRA_DIST = init.sh test.sh
+EXTRA_DIST = init.sh dotest.sh
check_SCRIPTS = test.sh
TEST = $(check_SCRIPTS)
+
+test.sh:
+ ./dotest.sh
+
+CLEANFILES = daemon.pid
diff --git a/tests/pxtpax/test.sh b/tests/pxtpax/dotest.sh
index 6db0e4d..1003d0a 100755
--- a/tests/pxtpax/test.sh
+++ b/tests/pxtpax/dotest.sh
@@ -4,9 +4,11 @@ PWD=$(pwd)
INITSH="${PWD}"/init.sh
DAEMON="${PWD}"/daemon
PIDFILE="${PWD}"/daemon.pid
+PAXCTLNG="../../src/paxctl-ng"
-paxctl-ng -cv ${DAEMON}
+${PAXCTLNG} -cv ${DAEMON} 2>&1 1>/dev/null
+echo "xattr process"
for pf in "p" "P"; do
for ef in "e" "E"; do
for mf in "m" "M"; do
@@ -14,13 +16,15 @@ for pf in "p" "P"; do
for sf in "s" "S"; do
flags="${pf}${ef}${mf}${rf}${sf}"
echo -n ${flags} " "
- paxctl-ng -"${flags}" ${DAEMON} 2>&1 1>/dev/null
+ ${PAXCTLNG} -"${flags}" ${DAEMON} 2>&1 1>/dev/null
${INITSH} start
if [ -f "${PIDFILE}" ]
then
rflags=$(cat /proc/$(cat ${PIDFILE})/status | grep ^PaX | awk '{ print $2 }')
echo -n ${rflags}
${INITSH} stop
+ else
+ echo -n "no daemon"
fi
echo
done