aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-12-13 19:18:41 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-12-13 19:20:10 -0500
commit3c99d150a62c57d299ffe147fccb723dd7fb98f3 (patch)
treeea133c119e500128f5ad5f16b3d71c96f89a8d59 /tests
parenttests/paxmodule: test python module, set with paxctl-ng, read with pypaxctl (diff)
downloadelfix-3c99d150a62c57d299ffe147fccb723dd7fb98f3.tar.gz
elfix-3c99d150a62c57d299ffe147fccb723dd7fb98f3.tar.bz2
elfix-3c99d150a62c57d299ffe147fccb723dd7fb98f3.zip
tests/paxmodule: test python module, set with pypaxctl, read with paxctl-ng
Diffstat (limited to 'tests')
-rwxr-xr-xtests/paxmodule/paxmodtest.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/paxmodule/paxmodtest.sh b/tests/paxmodule/paxmodtest.sh
index 074de6c..b820d5e 100755
--- a/tests/paxmodule/paxmodtest.sh
+++ b/tests/paxmodule/paxmodtest.sh
@@ -51,6 +51,44 @@ for pf in "p" "P" "-"; do
done
done
+for pf in "p" "P" "-"; do
+ for ef in "e" "E" "-"; do
+ for mf in "m" "M" "-"; do
+ for rf in "r" "R" "-"; do
+ for sf in "s" "S" "-"; do
+
+ pflags="${pf}${ef}${mf}${rf}${sf}"
+ if [ "${verbose}" != 0 ] ;then
+ echo "SET TO :" ${pflags}
+ fi
+
+ flags="${pf/-/Pp}${ef/-/Ee}${mf/-/Mm}${rf/-/Rr}${sf/-/Ss}"
+ ${PYPAXCTL} -s "${flags}" ${TESTFILE} >/dev/null 2>&1
+
+ sflags=$(${PAXCTLNG} -v ${TESTFILE})
+ sflags=$(echo ${sflags} | awk '{print $3}')
+
+ if [ "${verbose}" != 0 ] ;then
+ echo "GOT :" ${sflags}
+ fi
+
+ if [ "${pflags}" != "${sflags}" ]; then
+ (( count = count + 1 ))
+ if [ "${verbose}" != 0 ] ;then
+ echo "Mismatch: ${pflags} ${sflags}"
+ fi
+ fi
+
+ if [ "${verbose}" != 0 ] ;then
+ echo
+ fi
+
+ done
+ done
+ done
+ done
+done
+
echo " Mismatches = ${count}"
echo
echo "================================================================================"