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 09C3E1381F3 for ; Thu, 13 Dec 2012 19:17:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA57B21C01D; Thu, 13 Dec 2012 19:17:34 +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 65C6B21C01D for ; Thu, 13 Dec 2012 19:17:34 +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 5208C33DBCE for ; Thu, 13 Dec 2012 19:17:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D8518E543C for ; Thu, 13 Dec 2012 19:17:31 +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: <1355426236.ea23f3d6de1a549f18a6aa245873a89d8acf8d00.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: ea23f3d6de1a549f18a6aa245873a89d8acf8d00 X-VCS-Branch: master Date: Thu, 13 Dec 2012 19:17:31 +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: 6d572869-5d3c-4b6d-90b2-4a58f09fa1f6 X-Archives-Hash: 7b667000763ee39d2fe32cf46312784e commit: ea23f3d6de1a549f18a6aa245873a89d8acf8d00 Author: Anthony G. Basile gentoo org> AuthorDate: Thu Dec 13 19:17:16 2012 +0000 Commit: Anthony G. Basile gentoo 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