From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5D0721381F3 for ; Mon, 20 May 2013 13:48:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1F037E075F; Mon, 20 May 2013 13:48:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 94455E075F for ; Mon, 20 May 2013 13:48:40 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6C21B33E4C9 for ; Mon, 20 May 2013 13:48:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 098A6E4404 for ; Mon, 20 May 2013 13:48:38 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1369057688.a7f3ab5c21680a2738a8c423862f3ee0fac460f6.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: tests/pxtpax/ X-VCS-Repository: proj/elfix X-VCS-Files: tests/pxtpax/daemontest.sh X-VCS-Directories: tests/pxtpax/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: a7f3ab5c21680a2738a8c423862f3ee0fac460f6 X-VCS-Branch: master Date: Mon, 20 May 2013 13:48:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4868cb48-1e1e-43d1-ae93-ee84c87ba998 X-Archives-Hash: 922097797318245899b079d078e471ef commit: a7f3ab5c21680a2738a8c423862f3ee0fac460f6 Author: Anthony G. Basile gentoo org> AuthorDate: Mon May 20 13:48:08 2013 +0000 Commit: Anthony G. Basile gentoo 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