* [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/
@ 2012-12-14 0:18 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-12-14 0:18 UTC (permalink / raw
To: gentoo-commits
commit: 250709352520f5fdf025f86157de2f20508f5473
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 14 00:18:41 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Dec 14 00:18:41 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=25070935
tests/paxmodule: test python module, set with pypaxctl, read with paxctl-ng
---
tests/paxmodule/paxmodtest.sh | 38 ++++++++++++++++++++++++++++++++++++++
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 "================================================================================"
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/
@ 2012-12-14 0:20 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-12-14 0:20 UTC (permalink / raw
To: gentoo-commits
commit: 3c99d150a62c57d299ffe147fccb723dd7fb98f3
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 14 00:18:41 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Dec 14 00:20:10 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=3c99d150
tests/paxmodule: test python module, set with pypaxctl, read with paxctl-ng
---
tests/paxmodule/paxmodtest.sh | 38 ++++++++++++++++++++++++++++++++++++++
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 "================================================================================"
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/
@ 2012-12-15 17:19 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-12-15 17:19 UTC (permalink / raw
To: gentoo-commits
commit: 1b8987b294acdcb452c3eefce2c14b4b0385a064
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 15 17:14:05 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 15 17:19:02 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=1b8987b2
tests/paxmodule: no longer require python module to be installed
---
tests/paxmodule/Makefile.am | 2 +-
tests/paxmodule/paxmodtest.sh | 31 +++++++++++++++++++++++++++----
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/tests/paxmodule/Makefile.am b/tests/paxmodule/Makefile.am
index 6c5930d..86f3acb 100644
--- a/tests/paxmodule/Makefile.am
+++ b/tests/paxmodule/Makefile.am
@@ -9,4 +9,4 @@ check_SCRIPTS = paxmodtest
TEST = $(check_SCRIPTS)
paxmodtest:
- ./paxmodtest.sh 0
+ ./paxmodtest.sh 0 $(CFLAGS)
diff --git a/tests/paxmodule/paxmodtest.sh b/tests/paxmodule/paxmodtest.sh
index b820d5e..319dad5 100755
--- a/tests/paxmodule/paxmodtest.sh
+++ b/tests/paxmodule/paxmodtest.sh
@@ -1,19 +1,42 @@
#!/bin/bash
verbose=${1-0}
+shift
-PWD=$(pwd)
-TESTFILE="${PWD}"/dummy
+TESTFILE="$(pwd)/dummy"
PAXCTLNG="../../src/paxctl-ng"
PYPAXCTL="../../scripts/pypaxctl"
-count=0
-
echo "================================================================================"
echo
echo " RUNNIG PAXMODULE TEST"
+
+
+unamem=$(uname -m)
+pythonversion=$(python --version 2>&1)
+pythonversion=$(echo ${pythonversion} | awk '{ print $2 }')
+pythonversion=${pythonversion%\.*}
+PYTHONPATH="../../scripts/build/lib.linux-${unamem}-${pythonversion}"
+
+if [ ! -d ${PYTHONPATH} ]; then
+ echo " (Re)building pax module"
+
+ #NOTE: the last -D or -U wins as it does for gcc $CFLAGS
+ for f in $@; do
+ [ $f = "-UXTPAX" ] && unset XTPAX
+ [ $f = "-DXTPAX" ] && XTPAX=1
+ [ $f = "-UPTPAX" ] && unset PTPAX
+ [ $f = "-DPTPAX" ] && PTPAX=1
+ done
+ export XTPAX
+ export PTPAX
+
+ ( cd ../../scripts; exec ./setup.py build ) >/dev/null
+fi
echo
+count=0
+
for pf in "p" "P" "-"; do
for ef in "e" "E" "-"; do
for mf in "m" "M" "-"; do
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/
@ 2012-12-29 3:45 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-12-29 3:45 UTC (permalink / raw
To: gentoo-commits
commit: c87eaa8a8d17c8b81d69d84a9a9c10ee0a306ef5
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 29 03:45:33 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 29 03:45:33 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=c87eaa8a
tests/paxmodule/paxmodtest.sh: fix unit test
---
tests/paxmodule/paxmodtest.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/paxmodule/paxmodtest.sh b/tests/paxmodule/paxmodtest.sh
index 98ba340..9398f29 100755
--- a/tests/paxmodule/paxmodtest.sh
+++ b/tests/paxmodule/paxmodtest.sh
@@ -105,7 +105,7 @@ for pf in "p" "P" "-"; do
${PYPAXCTL} -s "${flags}" ${TESTFILE} >/dev/null 2>&1
sflags=$(${PAXCTLNG} -v ${TESTFILE})
- sflags=$(echo ${sflags} | awk '{print $3}')
+ sflags=$(echo ${sflags} | awk '{print $4}')
if [ "${verbose}" != 0 ] ;then
echo "GOT :" ${sflags}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-29 3:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-15 17:19 [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2012-12-29 3:45 Anthony G. Basile
2012-12-14 0:20 Anthony G. Basile
2012-12-14 0:18 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox