diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-11-15 14:25:18 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-11-15 14:42:25 -0500 |
commit | 02b921e118783ab4b00a412d94a20d476a5ff15e (patch) | |
tree | 98d95fb4b5baa026654c716944d893d7de9f843b | |
parent | tests/pxtpax: compare file's and process's pax flags (diff) | |
download | elfix-02b921e118783ab4b00a412d94a20d476a5ff15e.tar.gz elfix-02b921e118783ab4b00a412d94a20d476a5ff15e.tar.bz2 elfix-02b921e118783ab4b00a412d94a20d476a5ff15e.zip |
Fix some bugs in tests/*
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/gnustack/Makefile.am | 4 | ||||
-rw-r--r-- | tests/pxtpax/Makefile | 15 | ||||
-rw-r--r-- | tests/pxtpax/Makefile.am | 7 | ||||
-rwxr-xr-x | tests/pxtpax/dotest.sh (renamed from tests/pxtpax/test.sh) | 8 |
6 files changed, 15 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index 42c86b6..9ccd9a0 100644 --- a/configure.ac +++ b/configure.ac @@ -56,7 +56,6 @@ AC_CONFIG_FILES([ doc/Makefile tests/Makefile tests/gnustack/Makefile - tests/gnustack/Makefile tests/pxtpax/Makefile ]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 9744798..d1becd2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1 +1 @@ -SUBDIRS = gnustack xtpax +SUBDIRS = gnustack pxtpax diff --git a/tests/gnustack/Makefile.am b/tests/gnustack/Makefile.am index b0b054f..af11d60 100644 --- a/tests/gnustack/Makefile.am +++ b/tests/gnustack/Makefile.am @@ -18,10 +18,10 @@ test.sh: @echo "================================================================================" @echo @echo "Fixing Bad GNU_STACK Elf" - @../src/fix-gnustack -f bad-gnustack + @../../src/fix-gnustack -f bad-gnustack @echo @echo "Fixed Bad GNU_STACK Elf" - @../src/fix-gnustack bad-gnustack + @../../src/fix-gnustack bad-gnustack @echo @echo "================================================================================" 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 |