From patchwork Wed Jan 8 12:10:44 2025 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: 855687 Delivered-To: patch@linaro.org Received: by 2002:adf:8b05:0:b0:385:e875:8a9e with SMTP id n5csp686107wra; Wed, 8 Jan 2025 04:16:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWyQ+dr1+J488Zwv2pO/Wz52ocG3wXp+S77lykfETqYACd+fz/rtNN6FW0DwXwUIeBf+APoPg==@linaro.org X-Google-Smtp-Source: AGHT+IFxIUSnDRdEAivpWmNX+uZAUe7f/8s82Jk7T/km0Vg0t4R75R55IMTrbBbrrLWWyyp9yTDM X-Received: by 2002:a05:620a:24c6:b0:7b6:f34b:cdd2 with SMTP id af79cd13be357-7bcd97a4e6cmr425457685a.53.1736338586641; Wed, 08 Jan 2025 04:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736338586; cv=none; d=google.com; s=arc-20240605; b=I9DGS4ULL2wuMwgpPqPcTeqgPq/gU+2oXrHXr4benjeSAUZQwOAoAU3SreDfXsEBoE 355YAu33TzLanzTVJrMp7UAyZs704u2kKakVEy3tE/Yydd64dGC1Jm7kureiBDHAy1kd 1FxwuiC0BGHr/VtimZUQ75mq9k4BWIFiWcAoI7vZY/NdW0F/EQbpxzockOlWR9YXHEmM EdNNdJkCED/XAwi7L0jeQfLNtvwJYvTKkrhBn8hQX3Xsob4Yr0ZIamIBmGJJGOg9BDql 0gupZi0oP7Hdn3G2tvlkxbFeOiJyp/kg11vpw2Uw/PbY/e5S8NPJzc+zBhNtdHu9uuKJ NudQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HuCXulvJRMZygWdnINtFY7SjYOcclpP9r7Wb7ozg1Gw=; fh=l95L5Maua5HG0vXtrda7YXM3hY8pWBBFNczXRFh+wJU=; b=cRJP+BcV3kuzVaHbz8WysHVRClJ4a/EJX+eDKYCqpo2D0w6z/0KAmPc32r/k91ewf5 az1+fCnV3DAeoh8XRvIDpP59ZH1RMkxbnY+M1lKnhYwrApZsF9QnfmugTL6Xh6wqrHem NYZ1uFhya94By+2C3b4OgdWQ5KELMNeIFoj0InaD8aw9xyKLsSLiqUuLh64Zjz5gdUy8 tkf06+27HV3Ls2tIFG1vglOhUOfDV9I5bClJTR+N279/3SJtmZbMThNgzB4+JtIL5iW1 Onv4ewbUYzE1/c8GA7yOoAFdhE/TFleOmq1mTs4raKEDqGTavDcqA6tfYysgULhFYFne cUvg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fSUrpDVl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7ba2d9b5c17si1632243185a.282.2025.01.08.04.16.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Jan 2025 04:16:26 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fSUrpDVl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVUxd-0003fg-Sp; Wed, 08 Jan 2025 07:14:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tVUuU-0000pO-9L for qemu-devel@nongnu.org; Wed, 08 Jan 2025 07:11:46 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVUuP-0007K0-KZ for qemu-devel@nongnu.org; Wed, 08 Jan 2025 07:11:41 -0500 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-aab6fa3e20eso2773564066b.2 for ; Wed, 08 Jan 2025 04:11:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736338269; x=1736943069; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HuCXulvJRMZygWdnINtFY7SjYOcclpP9r7Wb7ozg1Gw=; b=fSUrpDVl4EeL/Dz9Xf36jSCUPz3NuyOW3lQRM7rNwfaRW8PtgPYbSizCxsYTvzlBSS UucgNQ1WIvERwVVvFD3fpD0fCXdgJmCccGcyJiXbc61aeAvcBmKn9asOWOYXHGaErkqt pk9boR9oqJYfXrmTqt2DlRKawxOLF+2sA0b6+nG6iXhE4NPm/pNazekVsgm6ILGoKlPF HCq4j92+UhCNZsOo2GwEHtziSVguVp9buZqP7xw1deGGc9uoPAhEPXU97OgZNf7/kEPK qUSWu6x/xEGWrY71Y4nAdAQHTtN+PmqswOSYAtnjHmGOkf2xlP7oy689K90cIStKsjPh Pckg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736338269; x=1736943069; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HuCXulvJRMZygWdnINtFY7SjYOcclpP9r7Wb7ozg1Gw=; b=nt2zx7E3r7jjywd7b3WrvSgwbz9Qag65K0HXwZ24GPdoc1Gcp9t+5Ig8zrcPnlGn8G qmYFczQR9R9SuuTLNbPLkqZzPmSKyU5TYwpOm0rpTL7ko6knSYu36YB1B+uoQbVIABtE QGB0p/XyweiunZFWDSUey+znfNrqyY6F/n/TdJT2l7tioXIauUzI6/COAB8eyZz60uqb aFYEBfR9W/wkuSzcZWHckQorD2Y3JtBOaQim0KcsG2zEoSqnTvw0qx1m84O9yr1ZAgi6 f3+e1bAbb6wLvY4txwyYuMvuQQd3q7gz4l+kRYQ5lQQ9KZMr0gZiZwnyzDuO1QYxgEG1 dAgg== X-Gm-Message-State: AOJu0Yze3KAQ2bV1oJtweicZqpp9LvqB37b5h7RroBLyOzvO+qpBEbW1 6zOcOq8ynmZf7n2uQwrugHpfPwTU8aVGtdLqDDB6xXFTYIdKX76JTpxXDC1kxLo= X-Gm-Gg: ASbGncs834ZFjdzF66ntrYNIg/E+P1l4rL2Y1oRYZCaSu6k/bAynWysouXDo4KrFMed Cjs6wWXYj6kyM6r8XV1lg/54ShsZeOk2oCwbaIr0l6gdyIfGKO/lKyHZbMiWNEWSFsQ7grNibau pClBfNyreqCPJDy5kAyjSZ5Be43vv0cKeY0yRwpBGNu5tSsXEzRVT2gql9M+JcVV4JL4e8x4cLx t+0aYGbycTmb8cIVK8LFd+7/P93Eq4mDOFWk8treaEXblGPMj+KZkQ= X-Received: by 2002:a17:907:7f8e:b0:aaf:f1a:d2ad with SMTP id a640c23a62f3a-ab2abc9f07dmr154794866b.50.1736338269092; Wed, 08 Jan 2025 04:11:09 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0f0128b8sm2492701966b.145.2025.01.08.04.11.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 04:11:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B867A5FC58; Wed, 8 Jan 2025 12:10:56 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Halil Pasic , Aurelien Jarno , qemu-riscv@nongnu.org, Radoslaw Biernacki , Daniel Henrique Barboza , =?utf-8?q?Alex_Benn=C3=A9e?= , Marcel Apfelbaum , Richard Henderson , Beraldo Leal , Fabiano Rosas , Mark Cave-Ayland , Laurent Vivier , Nicholas Piggin , Marcin Juszkiewicz , Christian Borntraeger , Wainer dos Santos Moschetta , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Ed Maste , Jiaxun Yang , Bernhard Beschow , Bin Meng , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Laurent Vivier , Joel Stanley , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , John Snow , "Michael S. Tsirkin" , Pavel Dovgalyuk , Alistair Francis , Liu Zhiwei , Harsh Prateek Bora , Leif Lindholm , Cleber Rosa , Thomas Huth , Paolo Bonzini , qemu-s390x@nongnu.org, Eric Farman , Weiwei Li , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster , Daniel Henrique Barboza , Palmer Dabbelt , Peter Maydell , Li-Wen Hsu Subject: [PATCH v4 22/32] tests/functional: bail aarch64_virt tests early if missing TCG Date: Wed, 8 Jan 2025 12:10:44 +0000 Message-Id: <20250108121054.1126164-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250108121054.1126164-1-alex.bennee@linaro.org> References: <20250108121054.1126164-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The set_machine and require_accelerator steps can bail early so move those to the front of the test functions. While we are at it also clean up some long lines when adding the vm arguments. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- tests/functional/test_aarch64_virt.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_aarch64_virt.py b/tests/functional/test_aarch64_virt.py index b3d3b0ee51..201c5ed023 100755 --- a/tests/functional/test_aarch64_virt.py +++ b/tests/functional/test_aarch64_virt.py @@ -40,9 +40,9 @@ def test_alpine_virt_tcg_gic_max(self): iso_path = self.ASSET_ALPINE_ISO.fetch() self.set_machine('virt') - self.vm.set_console() self.require_accelerator("tcg") + self.vm.set_console() self.vm.add_args("-accel", "tcg") self.vm.add_args("-cpu", "max,pauth-impdef=on") self.vm.add_args("-machine", @@ -71,15 +71,16 @@ def common_aarch64_virt(self, machine): Common code to launch basic virt machine with kernel+initrd and a scratch disk. """ + self.set_machine('virt') + self.require_accelerator("tcg") + logger = logging.getLogger('aarch64_virt') kernel_path = self.ASSET_KERNEL.fetch() - self.set_machine('virt') self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0') - self.require_accelerator("tcg") self.vm.add_args('-cpu', 'max,pauth-impdef=on', '-machine', machine, '-accel', 'tcg', @@ -100,7 +101,9 @@ def common_aarch64_virt(self, machine): # Add the device self.vm.add_args('-blockdev', - f"driver=qcow2,file.driver=file,file.filename={image_path},node-name=scratch") + "driver=qcow2," + "file.driver=file," + f"file.filename={image_path},node-name=scratch") self.vm.add_args('-device', 'virtio-blk-device,drive=scratch')