public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/
@ 2012-12-13 19:17 Anthony G. Basile
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony G. Basile @ 2012-12-13 19:17 UTC (permalink / raw
  To: gentoo-commits

commit:     ea23f3d6de1a549f18a6aa245873a89d8acf8d00
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 13 19:17:16 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 19:17:16 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=ea23f3d6

tests/pxtpax/daemontest.sh: add logic for amd64 vs i686

---
 tests/pxtpax/daemontest.sh |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/tests/pxtpax/daemontest.sh b/tests/pxtpax/daemontest.sh
index c5d079d..901edc7 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
+            list="1 2 3 4"
+          else [ "$unamem" = "x86_64" ]; then
+            # Skip i = 4 which is S which is not set
+            list="0 1 2 3"
+          fi
+
+          for i in $list; do
             p=${pflags:$i:1}
             r=${rflags:$i:1}
             if [ $p != "-" ]; then


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/
@ 2012-12-13 19:21 Anthony G. Basile
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony G. Basile @ 2012-12-13 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     289a744b98d7fdd2eaddf1f1056c5e85dde9d927
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 13 19:17:16 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 19:21:19 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=289a744b

tests/pxtpax/daemontest.sh: add logic for amd64 vs i686

---
 tests/pxtpax/daemontest.sh |   34 ++++++++++++++++++++++++++++++++--
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/
@ 2012-12-13 20:42 Anthony G. Basile
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony G. Basile @ 2012-12-13 20:42 UTC (permalink / raw
  To: gentoo-commits

commit:     657e55c26b16386c7e011e4f40e0ddef11c61906
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 13 20:42:41 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 20:42:41 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=657e55c2

tests/pxtpax/Makefile.am: fix renaming of daemontest.sh script

---
 tests/pxtpax/Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/pxtpax/Makefile.am b/tests/pxtpax/Makefile.am
index 1072252..0b4bbd2 100644
--- a/tests/pxtpax/Makefile.am
+++ b/tests/pxtpax/Makefile.am
@@ -1,7 +1,7 @@
 noinst_PROGRAMS = daemon
 daemon_SOURCES = daemon.c
 
-EXTRA_DIST = init.sh dotest.sh
+EXTRA_DIST = init.sh daemontest.sh
 
 check_SCRIPTS = daemontest
 TEST = $(check_SCRIPTS)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/
@ 2013-05-20 13:48 Anthony G. Basile
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony G. Basile @ 2013-05-20 13:48 UTC (permalink / raw
  To: gentoo-commits

commit:     a7f3ab5c21680a2738a8c423862f3ee0fac460f6
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon May 20 13:48:08 2013 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon May 20 13:48:08 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=a7f3ab5c

tests/pxtpax/daemontest.sh: clean up bash

---
 tests/pxtpax/daemontest.sh |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/pxtpax/daemontest.sh b/tests/pxtpax/daemontest.sh
index 66ec946..b292c62 100755
--- a/tests/pxtpax/daemontest.sh
+++ b/tests/pxtpax/daemontest.sh
@@ -51,7 +51,7 @@ echo "        CONFIG_PAX_RANDMMAP"
 echo "        CONFIG_PAX_SEGMEXEC"
 echo
 
-if [ "$unamem" != "i686" -a "$unamem" != "x86_64" ]; then
+if [[ "$unamem" != "i686" && "$unamem" != "x86_64" ]]; then
   echo "This test is only for i686 or x86_64"
   echo
   echo "================================================================================"
@@ -65,16 +65,16 @@ for pf in "p" "P" "-"; do
         for sf in "s" "S" "-"; do
 
           pflags="${pf}${ef}${mf}${rf}${sf}"
-          if [ "${verbose}" != 0 ] ;then
+          if [[ "${verbose}" != 0 ]] ;then
             echo "SET TO :" ${pflags}
           fi
 
           flags="${pf/-/Pp}${ef/-/Ee}${mf/-/Mm}${rf/-/Rr}${sf/-/Ss}"
           ${PAXCTLNG} -"${flags}" ${DAEMON} >/dev/null 2>&1
 
-          if [ "${verbose}" != 0 ] ;then
+          if [[ "${verbose}" != 0 ]] ;then
             sflags=$(${PAXCTLNG} -v ${DAEMON})
-            if [ "${dotest}" = "0" ]; then
+            if [[ "${dotest}" = "0" ]]; then
               sflags=$(echo ${sflags} | awk '{print $3}')
               echo "GOT    :"  ${sflags}
             else
@@ -86,22 +86,22 @@ for pf in "p" "P" "-"; do
           fi
 
           ${INITSH} start
-          if [ -f "${PIDFILE}" ]
+          if [[ -f "${PIDFILE}" ]]
           then
             rflags=$(cat /proc/$(cat ${PIDFILE})/status | grep ^PaX | awk '{ print $2 }')
-            if [ "${verbose}" != 0 ] ;then
+            if [[ "${verbose}" != 0 ]] ;then
               echo "RUNNING: "${rflags}
             fi
             ${INITSH} stop
           else
-            if [ "${verbose}" != 0 ] ;then
+            if [[ "${verbose}" != 0 ]] ;then
               echo "RUNNING: no daemon"
             fi
             rflags="-----"
           fi
 
 
-          if [ "$unamem" = "i686" ]; then
+          if [[ "$unamem" = "i686" ]]; then
             # Skip i = 0 which is P which is not set on i686
             list="1 2 3 4"
           else
@@ -112,15 +112,15 @@ for pf in "p" "P" "-"; do
           for i in $list; do
             p=${pflags:$i:1}
             r=${rflags:$i:1}
-            if [ $p != "-" ]; then
-              if [ $p != $r -a $r != "-" ]; then
+            if [[ $p != "-" ]]; then
+              if [[ $p != $r && $r != "-" ]]; then
                 (( count = count + 1 ))
                 echo "Mismatch: ${pflags} ${rflags}"
               fi
             fi
           done
 
-          if [ "${verbose}" != 0 ] ;then
+          if [[ "${verbose}" != 0 ]] ;then
             echo
           else
             echo -n "."
@@ -132,7 +132,7 @@ for pf in "p" "P" "-"; do
   done
 done
 
-if [ "${verbose}" = 0 ] ;then
+if [[ "${verbose}" = 0 ]] ;then
   echo
   echo
 fi


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/
@ 2013-05-20 18:19 Anthony G. Basile
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony G. Basile @ 2013-05-20 18:19 UTC (permalink / raw
  To: gentoo-commits

commit:     556c9c85478d716eee61d348a9b90efb3c4169d8
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon May 20 18:19:00 2013 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon May 20 18:19:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=556c9c85

tests/pxtpax/daemontest.sh: make progress pretty

---
 tests/pxtpax/daemontest.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tests/pxtpax/daemontest.sh b/tests/pxtpax/daemontest.sh
index b292c62..72c6266 100755
--- a/tests/pxtpax/daemontest.sh
+++ b/tests/pxtpax/daemontest.sh
@@ -58,6 +58,8 @@ if [[ "$unamem" != "i686" && "$unamem" != "x86_64" ]]; then
   exit 0
 fi
 
+dots=0
+
 for pf in "p" "P" "-"; do
   for ef in "e" "E" "-"; do
     for mf in "m" "M" "-"; do
@@ -123,7 +125,12 @@ for pf in "p" "P" "-"; do
           if [[ "${verbose}" != 0 ]] ;then
             echo
           else
+            (( dots = dots + 1 ))
             echo -n "."
+            if [[ "$dots" = "80" ]]; then
+              dots=0
+              echo
+            fi
           fi
 
         done


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-20 18:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-13 20:42 [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2013-05-20 18:19 Anthony G. Basile
2013-05-20 13:48 Anthony G. Basile
2012-12-13 19:21 Anthony G. Basile
2012-12-13 19:17 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