From patchwork Thu Nov 24 16:10:25 2016 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: 83959 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp167762qgi; Thu, 24 Nov 2016 08:13:16 -0800 (PST) X-Received: by 10.99.96.85 with SMTP id u82mr5599957pgb.47.1480003996221; Thu, 24 Nov 2016 08:13:16 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id f8si40023868pgc.288.2016.11.24.08.13.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 08:13:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9wcy-000441-4k; Thu, 24 Nov 2016 16:12:00 +0000 Received: from mail-wj0-x22f.google.com ([2a00:1450:400c:c01::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9wcN-0003PX-Me for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2016 16:11:26 +0000 Received: by mail-wj0-x22f.google.com with SMTP id xy5so37023952wjc.0 for ; Thu, 24 Nov 2016 08:11:05 -0800 (PST) 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=ZvgHV2G06yJ4CvjLXjMjiBfNNH7Kwyue3oq8x1XVvg8=; b=hVKvDSEVdD9oS6b34NAAJbBaM/wDypb/gJnceTWAgxZppKiQS8GpyG/H4io8kyzCJo AZDo8rYhxhIckOiFDKVwAx+2KzvlficQcJNNz1bhBEAJ8fq3L/Mp/YEdirLMj2L/CCEH Rvm8sFH32zLyxCF+dxMlbS3eR23VFouvPOMf0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZvgHV2G06yJ4CvjLXjMjiBfNNH7Kwyue3oq8x1XVvg8=; b=Ajr8WSvAJipVWSZkURWiTTlcTem+19GA5qpNXv7UEFoLQx6a1peCXKBXzqkSJ6U5Yw N/uEGynm98I53736rSJ9F/qC8k0C1lIoYO0wvsv1xtIPDz2zFaeWcliK/NB7ZUbzhdFU IlglcwtZ22AiKq+rVgMk/dXDF5IADrQuo9t7vQu83V1qjrFxjGm32Yq2ijX9Co5ehK5x K6+QXVcm6+Tzgymx+LljuCe6QJP9ptwxy1EtGKybdLfn3iBItPqsCElKhZu79RidbDc4 ET6gpwSctLSgFlu9tiSJH5o0DmEgpGNCsCNzt1Vg3PVtjc0fwgRWP6NGrImsFrYkGZxv DUgw== X-Gm-Message-State: AKaTC02Pihrz1D+rRgHrbtIMgtp9Bof7t5qEyX/x7d+PtqxgWQp6+ALiHjW2Yuo+kDJqKPrE X-Received: by 10.194.29.161 with SMTP id l1mr2954713wjh.97.1480003864658; Thu, 24 Nov 2016 08:11:04 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id z6sm42447098wjt.24.2016.11.24.08.11.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 08:11:02 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E82AD3E052F; Thu, 24 Nov 2016 16:10:59 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com Subject: [kvm-unit-tests PATCH v7 03/11] run_tests: allow passing of options to QEMU Date: Thu, 24 Nov 2016 16:10:25 +0000 Message-Id: <20161124161033.11456-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161124161033.11456-1-alex.bennee@linaro.org> References: <20161124161033.11456-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161124_081123_976653_DDA2DA91 X-CRM114-Status: GOOD ( 11.40 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c01:0:0:0:22f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, nikunj@linux.vnet.ibm.com, jan.kiszka@siemens.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, serge.fdrv@gmail.com, pbonzini@redhat.com, bobby.prani@gmail.com, rth@twiddle.net, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This introduces a the option -o for passing of options directly to QEMU which is useful. In my case I'm using it to toggle MTTCG on an off: ./run_tests.sh -t -o "-tcg mttcg=on" Signed-off-by: Alex Bennée --- run_tests.sh | 10 +++++++--- scripts/functions.bash | 13 +++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 4f2e5cb..05cc7fb 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -13,10 +13,11 @@ function usage() { cat < test.log -for_each_unittest $config run +for_each_unittest $config run "$extra_opts" diff --git a/scripts/functions.bash b/scripts/functions.bash index ee9143c..d38a69e 100644 --- a/scripts/functions.bash +++ b/scripts/functions.bash @@ -2,11 +2,12 @@ function for_each_unittest() { local unittests="$1" - local cmd="$2" - local testname + local cmd="$2" + local extra_opts=$3 + local testname local smp local kernel - local opts + local opts=$extra_opts local groups local arch local check @@ -21,7 +22,7 @@ function for_each_unittest() testname=${BASH_REMATCH[1]} smp=1 kernel="" - opts="" + opts=$extra_opts groups="" arch="" check="" @@ -32,7 +33,7 @@ function for_each_unittest() elif [[ $line =~ ^smp\ *=\ *(.*)$ ]]; then smp=${BASH_REMATCH[1]} elif [[ $line =~ ^extra_params\ *=\ *(.*)$ ]]; then - opts=${BASH_REMATCH[1]} + opts="$opts ${BASH_REMATCH[1]}" elif [[ $line =~ ^groups\ *=\ *(.*)$ ]]; then groups=${BASH_REMATCH[1]} elif [[ $line =~ ^arch\ *=\ *(.*)$ ]]; then @@ -45,6 +46,6 @@ function for_each_unittest() timeout=${BASH_REMATCH[1]} fi done - "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" + "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" exec {fd}<&- }