From patchwork Wed Jun 21 15:42:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 106109 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1998473qgd; Wed, 21 Jun 2017 08:52:07 -0700 (PDT) X-Received: by 10.55.120.1 with SMTP id t1mr38988630qkc.171.1498060327793; Wed, 21 Jun 2017 08:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498060327; cv=none; d=google.com; s=arc-20160816; b=tr0uL9emOFZnhG+uPBBpbw+iHYimrGt1aorxDsevDcnP3HI3FeOWghWND5jQyuqjKY L0yygvuJuxcNHP/y/CaQj6QkohuT9SXBal64rLAywMY+1tHCCCwAOmA/TN1uProPZgwk DFL/dvauZd9tdia8eY++StAamJysXkucWAOUrBMszFDIiYYLetMYkSUTYpK2RROLjVGX ztrru3nuGiYjWFewHKf6lz3W/6h3NGxXk8AIrDglrbRFF08w1x1eVtLLYPiYdXrcOmCa UNtQgA7wFmuivbtgkWlAN7mAKd2BBLJLdMeJoCcML/AS7AHGZ7Tw4Dyk9E7BZrQpBGXD iumQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=VHjaHXwZN5H2T0HQTezWT4fu4LV4/bi4RRsfJKfr5ww=; b=a33moGeYBaUQb3eO6EndsdnWQFTwJ0YvZn+oF7I7I5ZGpuUwhuaJnnFl5EnE/IaYNm Z0hXtAENBFNSQ2K1JX2nOYE28mkG0CwMl6NID1RNaB4/ZxmLkXvwlGH+VNQvfd2ICP3D H4lSf0PZJNys0svd6lqsMdFJA4BhezoFO/pc3n90t+TJZoh0hRW9ECcbguPb74OuCf5h tAZJT+M03VXBqw6PMlZ29BvLyyT+BNgpdmlvwFkzxJ6lXwKLmZP1a542IVWQgCn/ImF3 WzZpxisnJCeDqdQOW98jU30gvrRjHgKQA789h2amSGyYNNCwR+yJJ5fE83eIL0SPNEsI Jxjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=OyiAtqwC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 2si15349269qtm.342.2017.06.21.08.52.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 21 Jun 2017 08:52:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.b=OyiAtqwC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNhvJ-0007mw-Df for patch@linaro.org; Wed, 21 Jun 2017 11:52:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNhlw-0006O2-HB for qemu-devel@nongnu.org; Wed, 21 Jun 2017 11:42:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNhls-0002tK-5w for qemu-devel@nongnu.org; Wed, 21 Jun 2017 11:42:24 -0400 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]:36712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNhlr-0002t3-VB for qemu-devel@nongnu.org; Wed, 21 Jun 2017 11:42:20 -0400 Received: by mail-wr0-x231.google.com with SMTP id c11so84699427wrc.3 for ; Wed, 21 Jun 2017 08:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VHjaHXwZN5H2T0HQTezWT4fu4LV4/bi4RRsfJKfr5ww=; b=OyiAtqwCwtDeZx+ooO0/CS1tUPwU9N5y2Ad9R1Ame0D8JFOenxkc/YzeCuqphLyY/z +WJRO/eFjdaab+22oPfG6Epsrzo+zk4ACnXy4q/aCxw9FI24HI1RDKPGMLa2iP3ouBlG xDxQhK82TxSANkRA1KVGh+19XJ8boqs+MQTJg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VHjaHXwZN5H2T0HQTezWT4fu4LV4/bi4RRsfJKfr5ww=; b=WkUHDqqxk8LPz+auJnCuFG6fEIb5PLbR9TEUl1AiW9T/L6jCq92VfVRxS6WVN4mmCW CjXvQSdA/ny9CCMEhcC5celYnfasJWrFer6JPSLZsFdqCWbLxP7NmUl43hr501C/RiWf hxccN7whSN2RRp4JkuflmWe9gpSHtSK8PaIn9c6B+k/GAG0F/sss699M73Z55cC3VEBL 64pdzLKvBeRW3WD/Ng0RY6imSTP7vbH3CeoBsAwfDclOFv6eLA/vp8DyRbXSAGqAjo+L lfKZ3zO4fdzUP9xYQ0xFzSNUisPvMhSui71z1qVXukDn+pZJfqzDaTNQIussxwrFgDrZ yItA== X-Gm-Message-State: AKS2vOzD5Wr+54ypbR68QCpgSaAtb8jZh50iyCHXHq8V/pLPcLH4lCH5 ftMAsc0ZvK1NyBl6oPYYcw== X-Received: by 10.223.166.196 with SMTP id t62mr22925299wrc.52.1498059738850; Wed, 21 Jun 2017 08:42:18 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a99sm21455174wrc.64.2017.06.21.08.42.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 08:42:12 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 862B93E0F9D; Wed, 21 Jun 2017 16:42:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 21 Jun 2017 16:42:43 +0100 Message-Id: <20170621154244.28309-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170621154244.28309-1-alex.bennee@linaro.org> References: <20170621154244.28309-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::231 Subject: [Qemu-devel] [RISU PATCH v6 09/10] new: record_traces.sh helper script X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" A simple script to run through a bunch of binaries and generate their trace files. Signed-off-by: Alex Bennée --- v6 - moved into contrib/ v5 - author, license and usage header v3 - allow overriding of RISU binary --- contrib/record_traces.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 contrib/record_traces.sh -- 2.13.0 diff --git a/contrib/record_traces.sh b/contrib/record_traces.sh new file mode 100755 index 0000000..1234a61 --- /dev/null +++ b/contrib/record_traces.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# +# A risu helper script to batch process a bunch of binaries and record their outputs +# +# Copyright (c) 2017 Linaro Limited +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Alex Bennée - initial implementation +# +# Usage: +# export RISU=/path/to/risu +# ./record_traces.sh ./testcases.aarch64/*.bin +# + +set -e + +if test -z "$RISU"; then + script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) + RISU=${script_dir}/risu +fi + +for f in $@; do + echo "Running risu against $f" + t="$f.trace" + ${RISU} --master $f -t $t + echo "Checking trace file OK" + ${RISU} $f -t $t +done