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: 9445999 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE2EB60235 for ; Thu, 24 Nov 2016 16:14:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C05FB2808C for ; Thu, 24 Nov 2016 16:14:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B48D8280D0; Thu, 24 Nov 2016 16:14:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 269B72808C for ; Thu, 24 Nov 2016 16:14:00 +0000 (UTC) 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-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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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}<&- }