aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-12-13 14:17:16 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-12-13 14:21:19 -0500
commit289a744b98d7fdd2eaddf1f1056c5e85dde9d927 (patch)
treee70b1e2fc30256f14453f4337438d99f86b96385 /tests
parenttests/{gnustack,pxtpax}: return success/failure, reduce vebosity (diff)
downloadelfix-289a744b98d7fdd2eaddf1f1056c5e85dde9d927.tar.gz
elfix-289a744b98d7fdd2eaddf1f1056c5e85dde9d927.tar.bz2
elfix-289a744b98d7fdd2eaddf1f1056c5e85dde9d927.zip
tests/pxtpax/daemontest.sh: add logic for amd64 vs i686
Diffstat (limited to 'tests')
-rwxr-xr-xtests/pxtpax/daemontest.sh34
1 files changed, 32 insertions, 2 deletions
diff --git a/tests/pxtpax/daemontest.sh b/tests/pxtpax/daemontest.sh
index c5d079d..4d61c1c 100755
--- a/tests/pxtpax/daemontest.sh
+++ b/tests/pxtpax/daemontest.sh
@@ -4,6 +4,7 @@
# dotest = 1 -> do both
dotest=${1-0}
verbose=${2-0}
+unamem=$(uname -m)
PWD=$(pwd)
INITSH="${PWD}"/init.sh
@@ -18,6 +19,27 @@ count=0
echo "================================================================================"
echo
echo " RUNNIG DAEMON TEST"
+echo
+echo " NOTE:"
+echo " 1) This test is only for amd64 and i686"
+echo " 2) This test will fail on amd64 unless the following are enabled in the kernel:"
+echo " CONFIG_PAX_PAGEEXEC"
+echo " CONFIG_PAX_EMUTRAMP"
+echo " CONFIG_PAX_MPROTECT"
+echo " CONFIG_PAX_RANDMMAP"
+echo " 3) This test will fail on i686 unless the following are enbled in the kernel:"
+echo " CONFIG_PAX_EMUTRAMP"
+echo " CONFIG_PAX_MPROTECT"
+echo " CONFIG_PAX_RANDMMAP"
+echo " CONFIG_PAX_SEGMEXEC"
+echo
+
+if [ "$unamem" != "i686" -a "$unamem" != "x86_64" ]; then
+ echo "This test is only for i686 or x86_64"
+ echo
+ echo "================================================================================"
+ exit 0
+fi
for pf in "p" "P" "-"; do
for ef in "e" "E" "-"; do
@@ -61,8 +83,16 @@ for pf in "p" "P" "-"; do
rflags="-----"
fi
- # Skip i = 4 which is S which is not set
- for i in 0 1 2 3; do
+
+ if [ "$unamem" = "i686" ]; then
+ # Skip i = 0 which is P which is not set on i686
+ list="1 2 3 4"
+ else
+ # Skip i = 4 which is S which is not set on amd64
+ list="0 1 2 3"
+ fi
+
+ for i in $list; do
p=${pflags:$i:1}
r=${rflags:$i:1}
if [ $p != "-" ]; then