public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/
Date: Mon, 20 May 2013 13:48:38 +0000 (UTC)	[thread overview]
Message-ID: <1369057688.a7f3ab5c21680a2738a8c423862f3ee0fac460f6.blueness@gentoo> (raw)

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


             reply	other threads:[~2013-05-20 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 13:48 Anthony G. Basile [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-20 18:19 [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/ Anthony G. Basile
2012-12-13 20:42 Anthony G. Basile
2012-12-13 19:21 Anthony G. Basile
2012-12-13 19:17 Anthony G. Basile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369057688.a7f3ab5c21680a2738a8c423862f3ee0fac460f6.blueness@gentoo \
    --to=blueness@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox