From patchwork Mon Jun 19 10:46:54 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: 105828 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp812734qgd; Mon, 19 Jun 2017 03:58:21 -0700 (PDT) X-Received: by 10.176.86.2 with SMTP id y2mr14591736uaa.90.1497869901439; Mon, 19 Jun 2017 03:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497869901; cv=none; d=google.com; s=arc-20160816; b=G0v2YTX92MjA+ROSQ2nlmfB/bTrpFRpE3EhXwqX92h5lZRlrDDXvz6Jq2vZjmtQ/xv /VmVGv9QDremHJwC+GJZOx5YwIZu7sPgSwJ5qK0a1PoKBkyMItIAXsDL+yigs0pcfCfI 2renSLvUnYN+mEVRv9+mAf5aTfPPlBbyxwsGFH02YbAb2qzmzon95uuevnLEKeIDCrj4 PNJHbZzQWxdxm9mEiJzP6vpP9z8hfIUwLr1appcz6uWAw7+iF4nmUyUaqpKVHr6ufAcE gcuyIBIHOGSSed5QUOhAYJqr0/y/SRpHM//9dvnY3r5Q9TxlzmsNktjx/sIRWnOMl05s Dxjw== 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=ujzFI5IGCWcRzNwSIP7fYZR4XrH/oau+XxV8wgZ2p+E=; b=het5W1d9d5BZZMV5RqbxpDkIXKAJisKYgOS2HUzJX+dzhNI+TvZrHbPtqaKnAAvcDU uWiBYptSqqVxJgf1Ajnn8rJ+40CcW5pluoeC+N6BSmyXiuOLcYGHZ2R10s7ZZcDaorkD mVDDYTMOKsSOR2Uw72h0/hSiUA0+4kKEjfYQ4fjU5623/slxfqes9Oo/xzG/AmEyf+CA vZNlf84EJATcOVw9zwR33vLFJTwFDRdF9ZTRXCao5wCNAnCqOL3Bg9RHPihaEngFRtfC wEls+8x6GuI904no3t/FV5JjXnhCm1kh5Gvf+OPd8WJVOlhihORnQmV2P3b97EPTEZVl wP1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=eStVjS9q; 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 x19si5096173uax.147.2017.06.19.03.58.21 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Jun 2017 03:58:21 -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=eStVjS9q; 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]:41700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuNx-0000wZ-1Y for patch@linaro.org; Mon, 19 Jun 2017 06:58:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuIT-0004TP-KC for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:52:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMuIS-0000Nl-CD for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:52:41 -0400 Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]:33905) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMuIS-0000N1-5k for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:52:40 -0400 Received: by mail-wr0-x234.google.com with SMTP id 77so69584236wrb.1 for ; Mon, 19 Jun 2017 03:52:39 -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=ujzFI5IGCWcRzNwSIP7fYZR4XrH/oau+XxV8wgZ2p+E=; b=eStVjS9qn7gfG6eEJIrRzAz6Z8IjeOksskNg2WvNiO087apR/U508v+2cQscEuIgts Q6oIRbxlo7XGCbnkTRqoa4G6hIVoWOzF2enZBRwc1hRg8Wqro8Uhegxy3Ifm4c/IME1y I9zKSiJAcfJwKA3YZzkkGtprvOYnGJjan3BuI= 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=ujzFI5IGCWcRzNwSIP7fYZR4XrH/oau+XxV8wgZ2p+E=; b=MkHS6qCfWsX6nxJt40tDxsn/aIvW/RlyYlMLlcCRw/40O9a9nW5OBb3pEME9gAOnz4 wyQRQlgu5XV/d4ovUn2gAt9LANLcaGX0Lb2ZYwXkNlpssKMCjugttIsyD52sw4rW/lBx +kVx2DxKJT8A8BwPKm9h3S4sx+pJuChiaEOuPd+WBLm63Y1aHw+Xb0DWgxzCVlba8EDy +0aZE+HC7qZIhVSTtPiQfj9enFsqmxx99h/QUl4dJPkWs7xxHyGgKH7fe8mw17kpXB/v 42oPU+v4AqqH6EuTJv8/oCiHGC0ys2xJ27gRDuyvQh4RVoRRGlhq2NytBIerEZt+69Ne 9z4Q== X-Gm-Message-State: AKS2vOyD9gz5sSmz3oL9mPKtdAaRbT7EbRCFz9o0b1x0uKIxQEV435tz C+i3HhItkjivVdy3 X-Received: by 10.223.150.89 with SMTP id c25mr15018132wra.15.1497869559011; Mon, 19 Jun 2017 03:52:39 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 201sm4955519wmy.15.2017.06.19.03.52.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 03:52:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 91E323E0CC0; Mon, 19 Jun 2017 11:47:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Mon, 19 Jun 2017 11:46:54 +0100 Message-Id: <20170619104655.31104-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170619104655.31104-1-alex.bennee@linaro.org> References: <20170619104655.31104-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::234 Subject: [Qemu-devel] [RISU PATCH v5 12/13] 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 --- v5 - author, license and usage header v3 - allow overriding of RISU binary --- record_traces.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 record_traces.sh -- 2.13.0 diff --git a/record_traces.sh b/record_traces.sh new file mode 100755 index 0000000..1234a61 --- /dev/null +++ b/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