From patchwork Wed Oct 9 10:56:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 20910 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9DA9025C6D for ; Wed, 9 Oct 2013 10:56:57 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id ia6sf1204493vcb.7 for ; Wed, 09 Oct 2013 03:56:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=0LTFT9pPutsp30dmmayQsKwSGsgVuAVftkDVxwGi+Jc=; b=fx18T6RQMoGy8mFlS38hRdPpAV/KEh8cBlaVHyodAuGJpFpdaTQtOFl2IxQGozfYqp /egoYusYB803frtOY+oI6yFZAeYumNkDUJMj1dpQ3xwPbXKi/kkpWA16EJN3Sl0kh8an RH1a5FpSoGG6fvqcBtTprEC550JG6JLuLBJBgirCSCa2OaEMHk951XioZXVG08f/5dH+ tHuvENdDA4zE272jVYjV1AqsP7/qOKCniAATbxCiamv/16ib8JLCXYxkoGVLBEuF7nXt AXZaXwDHQd5c5WA9New+ol9kdh+54b2sVURz078nj6M/usT9vWmLLPT7NKZowZIjJkDU /hYA== X-Received: by 10.236.0.232 with SMTP id 68mr6109577yhb.16.1381316217450; Wed, 09 Oct 2013 03:56:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.39.193 with SMTP id r1ls649528qek.30.gmail; Wed, 09 Oct 2013 03:56:57 -0700 (PDT) X-Received: by 10.221.47.193 with SMTP id ut1mr5180037vcb.8.1381316217334; Wed, 09 Oct 2013 03:56:57 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id g2si11601137vch.28.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Oct 2013 03:56:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id x14so379266vbb.9 for ; Wed, 09 Oct 2013 03:56:57 -0700 (PDT) X-Gm-Message-State: ALoCoQndmL3ZTZuBbwe7mFCjQEc1n0gmUM0yLARKPgSLDZQl/CABTrnidDREhrxZYZwFfBjptbwE X-Received: by 10.220.11.7 with SMTP id r7mr5174652vcr.12.1381316217220; Wed, 09 Oct 2013 03:56:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp277558vcz; Wed, 9 Oct 2013 03:56:55 -0700 (PDT) X-Received: by 10.112.210.136 with SMTP id mu8mr6823470lbc.25.1381316214690; Wed, 09 Oct 2013 03:56:54 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by mx.google.com with ESMTPS id ds1si16894403lac.151.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Oct 2013 03:56:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.217.169 is neither permitted nor denied by best guess record for domain of anders.roxell@linaro.org) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id z5so636638lbh.0 for ; Wed, 09 Oct 2013 03:56:54 -0700 (PDT) X-Received: by 10.112.28.109 with SMTP id a13mr6833321lbh.3.1381316213831; Wed, 09 Oct 2013 03:56:53 -0700 (PDT) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id js17sm34639836lab.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 09 Oct 2013 03:56:52 -0700 (PDT) From: Anders Roxell To: davej@redhat.com Cc: trinity@vger.kernel.org, patches@linaro.org, Anders Roxell Subject: [PATCH 3/3] scripts: arch dependent to get the syscall_list Date: Wed, 9 Oct 2013 12:56:26 +0200 Message-Id: <1381316186-8562-4-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1381316186-8562-1-git-send-email-anders.roxell@linaro.org> References: <1381316186-8562-1-git-send-email-anders.roxell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , ARCH may be changed in the enviroment Signed-off-by: Anders Roxell --- scripts/find.sh | 10 +++++++++- scripts/test-all-syscalls-parallel.sh | 10 +++++++++- scripts/test-all-syscalls-sequentially.sh | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/scripts/find.sh b/scripts/find.sh index 3f10c58..717beb1 100755 --- a/scripts/find.sh +++ b/scripts/find.sh @@ -8,6 +8,14 @@ TRINITY_PATH=${TRINITY_PATH:-.} TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX) +if [ $ARCH = "arm" ]; then + $TRINITY_PATH/trinity -L | grep -v AVOID | \ + awk '{ print $2 }' | sort -u> $TRINITY_TMP/syscall_list +else + $TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | \ + awk '{ print $4 }' | sort -u> $TRINITY_TMP/syscall_list +fi + check_tainted() { if [ "$(cat /proc/sys/kernel/tainted)" != $TAINT ]; then @@ -27,7 +35,7 @@ while [ 1 ]; do -for sc in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u) +for sc in $(cat $TRINITY_TMP/syscall_list) do mkdir -p tmp.$i pushd tmp.$i diff --git a/scripts/test-all-syscalls-parallel.sh b/scripts/test-all-syscalls-parallel.sh index 312fd2a..e229702 100755 --- a/scripts/test-all-syscalls-parallel.sh +++ b/scripts/test-all-syscalls-parallel.sh @@ -3,12 +3,20 @@ TRINITY_PATH=${TRINITY_PATH:-.} TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX) +if [ $ARCH = "arm" ]; then + $TRINITY_PATH/trinity -L | grep -v AVOID | \ + awk '{ print $2 }' | sort -u> $TRINITY_TMP/syscall_list +else + $TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | \ + awk '{ print $4 }' | sort -u> $TRINITY_TMP/syscall_list +fi + chmod 755 $TRINITY_TMP cd $TRINITY_TMP while [ 1 ]; do - for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u) + for syscall in $(cat $TRINITY_TMP/syscall_list) do MALLOC_CHECK_=2 $TRINITY_PATH/trinity -q -c $syscall -D & done diff --git a/scripts/test-all-syscalls-sequentially.sh b/scripts/test-all-syscalls-sequentially.sh index 2b726fc..1b56a0c 100755 --- a/scripts/test-all-syscalls-sequentially.sh +++ b/scripts/test-all-syscalls-sequentially.sh @@ -6,6 +6,14 @@ TRINITY_PATH=${TRINITY_PATH:-.} TRINITY_TMP=$(mktemp -d /tmp/trinity.XXXXXX) +if [ $ARCH = "arm" ]; then + $TRINITY_PATH/trinity -L | grep -v AVOID | \ + awk '{ print $2 }' | sort -u> $TRINITY_TMP/syscall_list +else + $TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | \ + awk '{ print $4 }' | sort -u> $TRINITY_TMP/syscall_list +fi + check_tainted() { if [ "$(cat /proc/sys/kernel/tainted)" != $TAINT ]; then @@ -18,7 +26,7 @@ TAINT=$(cat /proc/sys/kernel/tainted) while [ 1 ] do -for syscall in $($TRINITY_PATH/trinity -L | grep entrypoint | grep -v AVOID | awk '{ print $4 }' | sort -u) +for syscall in $(cat $TRINITY_TMP/syscall_list) do chmod 755 $TRINITY_TMP pushd $TRINITY_TMP