From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704646980; cv=none; d=zohomail.com; s=zohoarc; b=QkHdvl9g49Pvu+HRu7h5KrMVBYfm4UpN/nvCDVo5KV2+jbb3Jm6EEvMe49Cp5FNJJU9mt65E9gtc9uXZSgKDMtvX/ZAOA7f0RVVqCs8R5JsY0sh2qNjp6l6Wfudp+MsdOROJi4XQEFxiMrw+BXoxFcsi5FXOGi8aS/qmNEutie0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704646980; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Uhq4cqVst5wOeiM+A3ZvuIpPDrIGmY8oPrygh7VrYew=; b=iZ8UOc+/OqUukgLdYKWuX1EBXDr869SVaysDtpwt2m0ahpoStANzYXaIUcJ0pAv+3bNtG7534g8uYuqycCnmh+fTCQ6trWn8pDF/R+plE5c++fXbkdNmeGqLyp5NOOSZW7rRttv6YdL3qzTIINrorFobJcGIOskluZrohjlZLqs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704646980357642.5062679533728; Sun, 7 Jan 2024 09:03:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWX6-0000h4-6P; Sun, 07 Jan 2024 12:01:56 -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 1rMWWy-0000Sg-0m; Sun, 07 Jan 2024 12:01:53 -0500 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWWw-00075L-IX; Sun, 07 Jan 2024 12:01:47 -0500 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-28be024282bso510507a91.3; Sun, 07 Jan 2024 09:01:45 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:01:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646904; x=1705251704; 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=Uhq4cqVst5wOeiM+A3ZvuIpPDrIGmY8oPrygh7VrYew=; b=WUYlfbE0w2rjJuOn0s0wBipoCfJiLuDPgSv+WqNBSa2JIu0A8SLevhNdW1mR7mbh/t MrfAFgPiJTCRJWdy9q3F34iGyQrQP6Etn9T70J8Hs61ywl8Dx0llTrgAE7wskRlWMysU qu4gxBvVueyFFI4MSyLVel39IsxJjH4BiDdIXkw73Gz62AGrFsQJ8wtuVSydOALFtubs 5MlAyl5rtOcradnjHZdqHfHW0PicJzb8EGVw9pPHGpDmNsgmwWy+vrQb8sxAsPiQpEyC Fu85RaRqp14JSWVBcFWWMVueq3adR8JqMfly6Zv5HDti8T+B8Sb20pgYvcCmmCeQdasC ZGmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646904; x=1705251704; 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=Uhq4cqVst5wOeiM+A3ZvuIpPDrIGmY8oPrygh7VrYew=; b=lqAwxiwv+jtC6xgEsBhXa2a54eyXe63N7DigQim0TQIgqRboLtWAMxHjGo/OxgZR65 mrpMBWjvsM0bS8FvEKLyhmDO2RDt/bLNe+pDlQVk1TtLSmgSrn8PBxjNzIEJQYx1ai2t 25azRuDdLJloTccSu58g0HTMezaNY9mOp1f9l4zB7KOrZNIoMvTFqsY9GS7vnWKNp5ZT Q0zwDo/M5RK6QQPQUg4PpB1pxDNtWZk7iBy6YBKMzj/g0CPgRdeQ4kDwvrHyN2dAZT64 tPDxLr4tzyBA/STxy4Bf255ihazVA1mZ8OWsbcXRljyjnIMp4ZB9fuCBvjeMQkaRxCw4 3BFA== X-Gm-Message-State: AOJu0YwVFMgwoG13kDbEfWfDwbDHon0hgXRGAoZV1uYrmBd6dYixQPM5 bsRfVi04BjoB1VdfW/UakbIBpmYiXdA= X-Google-Smtp-Source: AGHT+IFA6giLZ+u+pgGHuYba9TpYTl4/KY5RkpEgxPDbiY6WImq3POEK7o/Yt9effmQCRX78712zjw== X-Received: by 2002:a17:903:495:b0:1d4:2266:64bf with SMTP id jj21-20020a170903049500b001d4226664bfmr764949plb.52.1704646904244; Sun, 07 Jan 2024 09:01:44 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org, qemu-s390x@nongnu.org (open list:S390 general arch...) Subject: [PATCH 1/9] gitlab: fix s390x tag for avocado-system-centos Date: Mon, 8 Jan 2024 03:01:11 +1000 Message-ID: <20240107170119.82222-2-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=npiggin@gmail.com; helo=mail-pj1-x1031.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704646982344100020 Content-Type: text/plain; charset="utf-8" The 390x tag should be s390x. Signed-off-by: Nicholas Piggin Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 91663946de..cfe737aca2 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -184,7 +184,7 @@ avocado-system-centos: variables: IMAGE: centos8 MAKE_CHECK_ARGS: check-avocado - AVOCADO_TAGS: arch:ppc64 arch:or1k arch:390x arch:x86_64 arch:rx + AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx arch:sh4 arch:nios2 =20 build-system-opensuse: --=20 2.42.0 From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704646981; cv=none; d=zohomail.com; s=zohoarc; b=RRcmYYUEY1x7cDBRATY5Qxm6XSf7lAWZikIwYN9lEv47elpMtBd1NREVyPPTto5ctD4hYrkHKYplSv7vBjd/hAAaY9RbtLCKvYJhWWQKsdCZ/nAR4HHM0ZQ6S/D9lFzjpMG0eKwkBR7eAgLoJiwFFKI5WNzQgE5gbOiWuyjCPns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704646981; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=x/NyucbyYBfaGMIB9+/c1AzBImvbiA7o4w9IVqnLoTQ=; b=e99IQy0h4ADbzd5RPR2qaCqoEwoqbBO7S2EawVyOXyB+P6rPmweqsg8BwRVyaSC3xKDmDHSs1z2xoT0atTtHzLqoBUolh8dF7NaARFSKlXKfTM/2oRov7eIOw+Q4YD7qKzIF5HG/jO6YTLpHQZD2HWFa7jAaLu+mGmGw78mgi58= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704646981180734.1653007141731; Sun, 7 Jan 2024 09:03:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWX7-0000mY-Fk; Sun, 07 Jan 2024 12:01:57 -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 1rMWX5-0000dW-70; Sun, 07 Jan 2024 12:01:55 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0: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 1rMWX3-0007Hk-Ea; Sun, 07 Jan 2024 12:01:54 -0500 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1d3aa0321b5so9656575ad.2; Sun, 07 Jan 2024 09:01:52 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646911; x=1705251711; 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=x/NyucbyYBfaGMIB9+/c1AzBImvbiA7o4w9IVqnLoTQ=; b=na60ZV7c+TC0ecdT22GkB50Q3tauYQDNR/NEPI04ucvfQ2LhP9qcVCiT/hAbLZBcRR H7bCIQ56OiONPYQyvYNb4aqhiZ6noZHpB6vBheShC/7z34uJEeo+3jBexY6wvXH53uJ9 MTUkx1J0zi61LJjMhgmxLPCUrwRbTikBdCAJbtPfRQF4pyKOMBGlNxJQDkyLxP3Zpl/G gGlA1p4q+o04BFT551QCy/JBA4iG4fQHnDkO7TgBU5Ty0544RJUCzqdxsFc9/mI3B4pG apFnqeHXE2dJEc6YZchEAR1qfe58j6mhBo2iteVu9814Njl3CbVufsLAWXBsKqwSRcDR YHIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646911; x=1705251711; 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=x/NyucbyYBfaGMIB9+/c1AzBImvbiA7o4w9IVqnLoTQ=; b=L4Y8qGWvEgIcFe0s/fsZo8usOeYYV/WUPM0JuL2f0yU490tI4u76l0WH3E6HI/bers 4b7Rg6LAXUZxhpjwPvFWUs2p7nDvqjS9AoE5BnNvhljo6ymsftW8Fn/8fzgecItahSN2 5mNAFjS7n1G1MfSJt1BlYqUQnELdaanRUl0hTqJEwzMDbXCSSrjby6oMkJxqe39K5f5B 4oxupNlc41GoSKa9QYl2cHzB811nfDhUdbr5u8bKdJUmQsngbk9BIYqNM/47iif5OtWl J/L2uly2mlMPvR4uiBXBv6W5VDpi868pN7Z0Tym0xMD/HXtV/dZvgIEJIpQhjSIJDiTO kL4w== X-Gm-Message-State: AOJu0YwHZgKBhAvADtcd8cgJXrbVkBFjLecP5CPjlefHGf6c6GJpZAo3 Pp2lhJ+rF5t3teVZpFyn3yVXB1B9oDw= X-Google-Smtp-Source: AGHT+IHU92L5QPaHBy/gfFzZqjICKYC2L4MB8zr6CZ2Nt4QHSNmKVX2VUBReUtGB8msAWlyoNMmjuw== X-Received: by 2002:a17:902:eb8f:b0:1d4:1d90:f75b with SMTP id q15-20020a170902eb8f00b001d41d90f75bmr3066663plg.17.1704646911201; Sun, 07 Jan 2024 09:01:51 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org Subject: [PATCH 2/9] tests/avocado: mark boot_linux.py long runtime instead of flaky Date: Mon, 8 Jan 2024 03:01:12 +1000 Message-ID: <20240107170119.82222-3-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=npiggin@gmail.com; helo=mail-pl1-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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704646982321100019 Content-Type: text/plain; charset="utf-8" The ppc64 and s390x tests were first marked skipIf GITLAB_CI by commit c0c8687ef0f ("tests/avocado: disable BootLinuxPPC64 test in CI"), and commit 0f26d94ec9e ("tests/acceptance: skip s390x_ccw_vrtio_tcg on GitLab") due to being very heavy-weight for gitlab CI. Commit 9b45cc99318 ("docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS") changed this to being flaky but it isn't really, it just had a long runtime. So introduce a new AVOCADO_ALLOW_LONG_RUNTIME variable and make these tests require it. Re-testing the s390x and ppc64 tests on gitlab shows about 100-150s runtime each, which is similar to the x86-64 tests. Since these are among the longest running avocado tests, make x86-64 require long runtime as well. Signed-off-by: Nicholas Piggin Reviewed-by: C=C3=A9dric Le Goater --- docs/devel/testing.rst | 8 ++++++++ tests/avocado/boot_linux.py | 8 ++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index bd132306c1..3a9c1327be 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -1346,6 +1346,14 @@ the environment. The definition of *large* is a bit arbitrary here, but it usually means an asset which occupies at least 1GB of size on disk when uncompressed. =20 +AVOCADO_ALLOW_LONG_RUNTIME +^^^^^^^^^^^^^^^^^^^^^^^^^^ +Tests which have a long runtime will not be run unless that +``AVOCADO_ALLOW_LONG_RUNTIME=3D1`` is exported on the environment. + +The definition of *long* is a bit arbitrary here, but it usually means a +test which takes more than 100 seconds to complete. + AVOCADO_ALLOW_UNTRUSTED_CODE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There are tests which will boot a kernel image or firmware that can be diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index 7c4769904e..6df0fc0489 100644 --- a/tests/avocado/boot_linux.py +++ b/tests/avocado/boot_linux.py @@ -93,13 +93,11 @@ class BootLinuxPPC64(LinuxTest): =20 timeout =3D 360 =20 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - + @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_pseries_tcg(self): """ :avocado: tags=3Dmachine:pseries :avocado: tags=3Daccel:tcg - :avocado: tags=3Dflaky """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") @@ -113,13 +111,11 @@ class BootLinuxS390X(LinuxTest): =20 timeout =3D 240 =20 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - + @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_s390_ccw_virtio_tcg(self): """ :avocado: tags=3Dmachine:s390-ccw-virtio :avocado: tags=3Daccel:tcg - :avocado: tags=3Dflaky """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") --=20 2.42.0 From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704646980; cv=none; d=zohomail.com; s=zohoarc; b=MAqIQljbjr674h09UiFVJ5LxlVSD/178/erNC1+5I8JY4lekgq+oyWqHA1i++upzMy554aqwEKv4JxagNoWUYFpaXG4adWjZXYeARYyhIDJd2iJF7kZhGaHUTjlw3dxxgIjZk/Dt9Zbpbf6H/y9/+e2zcxjX4RveZ+iQQZeI874= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704646980; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9VTKTEfNoVO9bVyk+W0ucnkOnsixCuWHxy7rwA2EEgo=; b=a0g4ynd84T0oAFGyBwaMcjEeVrbUGw5DqTuibnhCCb+xxVG3w+xGWXHbqDykCev3TqDY8hXH5kA/lta3cygtEjF2bS+gHo94D1yo7tiKi3dAAiiXQkARVUEVznJmbKfAwp1n5Q4NCwWlcHtom7yYRJ9SI8ED4SHv9IJ8nEutrvM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704646980780663.8668054247853; Sun, 7 Jan 2024 09:03:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWXF-0000vL-Gk; Sun, 07 Jan 2024 12:02:05 -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 1rMWXD-0000tr-Jr; Sun, 07 Jan 2024 12:02:03 -0500 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWXB-0007PZ-Lo; Sun, 07 Jan 2024 12:02:03 -0500 Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3606dc4fdf2so8549935ab.0; Sun, 07 Jan 2024 09:02:00 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:01:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646919; x=1705251719; 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=9VTKTEfNoVO9bVyk+W0ucnkOnsixCuWHxy7rwA2EEgo=; b=YnldBlBn+gtTQIWOxyKi/iU9zJXYHRXNG0lhm02eJW0kP/0dG6iRQ0CfbFEwcQIy0P e5yU5A17qK7JuDcmT208pKjM7okWXk+YWoTtodIONk3VdZZX83OiIdPgQSB2lmO4ZHDJ 0dCLOnzkIzcZAmhTkMXrYkKCod66nShJD6duoy+w56DZKvO7PTP5HWzE/0RhLd+BVoP/ 02g2mHCrdqua94RPaLafYBRvvVT1QlgXeaL6VhXEFbB0kz2P/zBxwEs9YoYmZpAHf3n6 F0/sN/BVzu7CC4hB0wwbR5lMmowDGb6jtV2WDiumZAExdp1cf7+6HchaAXpOvIbSO5db REow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646919; x=1705251719; 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=9VTKTEfNoVO9bVyk+W0ucnkOnsixCuWHxy7rwA2EEgo=; b=Vgk8mflE/OOgumOnGNfOYZmnl8ykcBy75xKG5rCke2CArkHGRVbZGqjG6vLOHvAKv3 awm37JgEdP8L2h1ZcwzPj4ByO299Hfgl/J3yde44/i+vtssLy2WE1sTMbsKi7PEHb7SE i4soAiRXCyWwuDrrV4dxq+NA9+ZDrYlomWXsaMbMHlcBeUsEgk7qEQrLBLCnVvi/FEDK wKeGcVSTOFxMqZOqfhyyemdixFGcxazzv514UdqJCtpCGV+FmQLqp6WxzIxxIYhtf1A/ 41CTyGn0DIoykUUQE2Hu5/OXbCvsSEUosxs/3Q1ORMC4ypaDu0283jxB6S8OIESyqEzW behQ== X-Gm-Message-State: AOJu0YxgMPKmRdw6L4aWfwyYYomiVbp3Rk1yQJyyhv8uNtl2ggtIDBp7 qLBFhb65F6XuoOR3mEYkbg7U+/Fat98= X-Google-Smtp-Source: AGHT+IHdoJAYW1Ki2NzNk3oXJbZghk3GbA8Mc6g+5AigdPkacEAYnD4BIG4A7yMgqRJFdogrsZDQuA== X-Received: by 2002:a05:6e02:152a:b0:35f:cc60:6245 with SMTP id i10-20020a056e02152a00b0035fcc606245mr4906915ilu.2.1704646918631; Sun, 07 Jan 2024 09:01:58 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org Subject: [PATCH 3/9] tests/avocado: Mark x86-64 boot_linux.py TCG tests as long runtime Date: Mon, 8 Jan 2024 03:01:13 +1000 Message-ID: <20240107170119.82222-4-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::12a; envelope-from=npiggin@gmail.com; helo=mail-il1-x12a.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704646982321100018 Content-Type: text/plain; charset="utf-8" Re-testing gitlab CI shows the x86-64 TCG tests take ~100s each, are the longest-running tests. They are close to the ~150s taken by the disabled ppc64 and s390x tests. From avocado-system-centos: boot_linux.py:BootLinuxX8664.test_pc_i440fx_tcg: PASS (112.34 s) boot_linux.py:BootLinuxX8664.test_pc_q35_tcg: PASS (97.05 s) boot_linux.py:BootLinuxPPC64.test_pseries_tcg: PASS (148.86 s) boot_linux.py:BootLinuxS390X.test_s390_ccw_virtio_tcg: PASS (149.83 s) So disable the x86-64 tests as well. Signed-off-by: Nicholas Piggin --- The other way we could go is enabling them all since ppc64 and s390s are now much faster than when they were originally disabled; or to only enable q35, giving at least one boot_linux.py test. [Test time results from here https://gitlab.com/npiggin/qemu/-/jobs/5842257= 510] Thanks, Nick --- tests/avocado/boot_linux.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index 6df0fc0489..a4a78122ac 100644 --- a/tests/avocado/boot_linux.py +++ b/tests/avocado/boot_linux.py @@ -14,6 +14,9 @@ =20 from avocado import skipUnless =20 +# We don't run TCG tests in CI, as booting the current Fedora OS in TCG te= sts +# is very heavyweight (~100s per test). There are lighter weight distros w= hich +# we use in the machine_aarch64_virt.py, tux_baseline.py, etc. =20 class BootLinuxX8664(LinuxTest): """ @@ -21,6 +24,7 @@ class BootLinuxX8664(LinuxTest): """ timeout =3D 480 =20 + @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_pc_i440fx_tcg(self): """ :avocado: tags=3Dmachine:pc @@ -39,6 +43,7 @@ def test_pc_i440fx_kvm(self): self.vm.add_args("-accel", "kvm") self.launch_and_wait(set_up_ssh_connection=3DFalse) =20 + @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_pc_q35_tcg(self): """ :avocado: tags=3Dmachine:q35 @@ -58,9 +63,6 @@ def test_pc_q35_kvm(self): self.launch_and_wait(set_up_ssh_connection=3DFalse) =20 =20 -# For Aarch64 we only boot KVM tests in CI as booting the current -# Fedora OS in TCG tests is very heavyweight. There are lighter weight -# distros which we use in the machine_aarch64_virt.py tests. class BootLinuxAarch64(LinuxTest): """ :avocado: tags=3Darch:aarch64 @@ -84,14 +86,11 @@ def test_virt_kvm(self): self.launch_and_wait(set_up_ssh_connection=3DFalse) =20 =20 -# See the tux_baseline.py tests for almost the same coverage in a lot -# less time. class BootLinuxPPC64(LinuxTest): """ :avocado: tags=3Darch:ppc64 """ - - timeout =3D 360 + timeout =3D 480 =20 @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_pseries_tcg(self): @@ -108,8 +107,7 @@ class BootLinuxS390X(LinuxTest): """ :avocado: tags=3Darch:s390x """ - - timeout =3D 240 + timeout =3D 480 =20 @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_s390_ccw_virtio_tcg(self): --=20 2.42.0 From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704646979; cv=none; d=zohomail.com; s=zohoarc; b=Ti9QJkwPpRE3D/ZYU5J7kfeWoz+cqYhQn5iJe80BFihKdwv9aya74FSclp8s5369AgURnmnf7W8wlnjprBzVfXOZIwDbEKw2mVnyWPyhphJzdKq5zgSXaKCBpk7ClT5Mpt+1x8XeXzBQqapHgxdSoPV5Np6brqHNUwzK9x9zzps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704646979; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Kj6bMelHOZKOZ/ZOY2z83t9J8QZg9iW/5VS5Z2WSRII=; b=Tr27VgZSUR0lbZsYKD2DhWOR2Enbe7prIo8lSAsUqCkN5wmcUBlLpZF020jMHP+MKM4KU3/fEnbBdlosKlA9PwwtBo5jY13eC9414Na4SNb5iayu6lgMTCD+2Kz580nRdDPVa3COLZFZ2oc/7be+NqRxsHOmB2SQJ/GMWT7i+zk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704646979640566.7119802893828; Sun, 7 Jan 2024 09:02:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWXV-0001GX-1p; Sun, 07 Jan 2024 12:02:21 -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 1rMWXS-0001FW-Ja; Sun, 07 Jan 2024 12:02:18 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWXJ-0007YF-On; Sun, 07 Jan 2024 12:02:18 -0500 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1d427518d52so6946315ad.0; Sun, 07 Jan 2024 09:02:09 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.01.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646927; x=1705251727; 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=Kj6bMelHOZKOZ/ZOY2z83t9J8QZg9iW/5VS5Z2WSRII=; b=G17vmy3QqiLXTpbPNyw4Qk87++x8QwT52INeF2vdDkV5GnzcjsW6VQSsrckLr1dXPT XmCU9KxtQLg2JQjKKqx36y6FNmBPy9teSRbpyMhBBtNNdRi0sBKru9u6paIGMqO9bzwh jlGolevMzOKzScOcNliX3IgGOOWhrqTjeIBhfbe0vG3Jx8PELMmsF4sYxt1fRVm9L/th CZWKZ1Ebh3yGsKhe33If83VDumKTNZkbSnU0ixMaEMT1MjZp/PV22Ud2sY2UBqT1rL/7 znUV3HI6n560qPno35WlrfVSqf5Yy36Qdc1oo+YoeBHV0bTD6ayAku8H5ym/MYfxLzpa wW/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646927; x=1705251727; 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=Kj6bMelHOZKOZ/ZOY2z83t9J8QZg9iW/5VS5Z2WSRII=; b=Yu69mNDIkdU44GS8kUvUioz19agfGMVSJQNGrJQUAHsjdCgk/9RFqIP6/BnSUM97Rm NQL47dQxb3FWKeKj2zIZqVQBIuRXdNOxikR/uUyGose+UzbA4K1B8kDS6zVHD3nMbqTS 3nlj/8ukpG4XQajPqOTfwnXpZMftpqFNXElFRgSvzm9ePLwW8XVxa8fNqQLEE3aScPVe ap+8f8LPGqwnXejW/SBtOce1HcRXC1cfd6jn+6U3qblvfk5UIYGVKEmTbSnsWxrqpNht oDufd3RVtiJZ8o8uGEQB3kNpAQ7/N3dcxU/o0hLO+uHYQ9ScBijsakk1slCkKOHhvnQT xFww== X-Gm-Message-State: AOJu0YzkhBW5hF1MZImBl487jUYpNfs9+dpGyL9NH5p9WfM7pqvzl2Zw vvc7W+Mo5Jl8WPONfrbwZTv5Rpw//g0= X-Google-Smtp-Source: AGHT+IGqvRMVvyZedFAjJWc+B9puN2iImBgdWGvzV/n/tqwDvaLTsPDUVJh8BNTVucRIGG2FiqR8Vw== X-Received: by 2002:a17:902:d48e:b0:1d4:df39:687a with SMTP id c14-20020a170902d48e00b001d4df39687amr3286523plg.14.1704646927596; Sun, 07 Jan 2024 09:02:07 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org Subject: [PATCH 4/9] tests/avocado: Enable replay_linux.py on ppc64 pseries Date: Mon, 8 Jan 2024 03:01:14 +1000 Message-ID: <20240107170119.82222-5-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=npiggin@gmail.com; helo=mail-pl1-x62d.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704646980415100002 Content-Type: text/plain; charset="utf-8" Add a ppc64 pseries test. This tends to hang in the replay phase near the end of the trace due to a missing event, so it is marked flaky. spapr-vscsi IO is extremely slow when running in record-replay modes, particularly when driven by SLOF. This causes tests to time-out even after an hour, so this uses guestfish to extract the kernel and initrd and boot them directly. Signed-off-by: Nicholas Piggin --- tests/avocado/replay_linux.py | 76 ++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 270ccc1eae..82daba9f3f 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -11,8 +11,9 @@ import os import logging import time +import subprocess =20 -from avocado import skipUnless +from avocado import skipIf, skipUnless from avocado_qemu import BUILD_DIR from avocado.utils import cloudinit from avocado.utils import network @@ -191,3 +192,76 @@ def test_virt_gicv3(self): self.run_rr(shift=3D3, args=3D(*self.get_common_args(), "-machine", "virt,gic-version=3D3")) + +# ppc64 pseries test. +# +# This machine tends to fail replay and hang very close to the end of the +# trace, with missing events, which is still an open issue. +# +# spapr-scsi IO driven by SLOF/grub is extremely slow in record/replay mod= e, +# so jump through some hoops to boot the kernel directly. With this, the t= est +# runs in about 5 minutes (modulo hang), which suggests other machines may +# have similar issues and could benefit from bypassing bootloaders. +# +ppc_deps =3D ["guestfish"] # dependent tools needed in the test setup/box. + +def which(tool): + """ looks up the full path for @tool, returns None if not found + or if @tool does not have executable permissions. + """ + paths=3Dos.getenv('PATH') + for p in paths.split(os.path.pathsep): + p =3D os.path.join(p, tool) + if os.path.exists(p) and os.access(p, os.X_OK): + return p + return None + +def ppc_missing_deps(): + """ returns True if any of the test dependent tools are absent. + """ + for dep in ppc_deps: + if which(dep) is None: + return True + return False + +@skipIf(ppc_missing_deps(), 'dependencies (%s) not installed' % ','.join(p= pc_deps)) +@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'known failure in trace re= play') +class ReplayLinuxPPC64(ReplayLinux): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Daccel:tcg + """ + + hdd =3D 'scsi-hd' + cd =3D 'scsi-cd' + bus =3D None + + def setUp(self): + super().setUp() + + # kernel, initramfs, and kernel cmdline are all taken by hand from + # the Fedora image. + self.kernel=3D"vmlinuz-5.3.7-301.fc31.ppc64le" + self.initramfs=3D"initramfs-5.3.7-301.fc31.ppc64le.img" + cmd =3D "guestfish --ro -a %s run " + ": mount /dev/sda2 / " + ": copy-out /boot/%s %s " + ": copy-out /boot/%s %s " + % (self.boot_path, self.kernel, self.workdir, + self.initramfs, self.workdir) + subprocess.run(cmd.split()) + + def test_pseries(self): + """ + :avocado: tags=3Dmachine:pseries + """ + kernel=3Dos.path.normpath(os.path.join(self.workdir, self.kernel)) + initramfs=3Dos.path.normpath(os.path.join(self.workdir, self.initr= amfs)) + cmdline=3D"root=3DUUID=3D8a409ee6-3cb3-4b06-a266-39e2dae3e5fa ro " + "no_timer_check net.ifnames=3D0 console=3Dtty1 " + "console=3DttyS0,115200n8" + self.run_rr(shift=3D1, args=3D("-device", "spapr-vscsi", + "-machine", "x-vof=3Don", + "-kernel", kernel, + "-initrd", initramfs, + "-append", cmdline)) --=20 2.42.0 From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704646980; cv=none; d=zohomail.com; s=zohoarc; b=bdSC+A/jGj6WYY+TeP/RbKKF90l8mZc8Z8jiBEW7ehKb+WjKrO/nZFDlkoXCDqxApVqVJhgxgY5Y27DbycGB+zY8glKP/6Q/+8dbzUadXfSz2A72nASDPBImel0db72KRo6bbl8RGZZ4/GV38GoRRruXQf49YMPjp03OtrUnUeg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704646980; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=R4QwoejbFxocsaZb3oiG49cglGKrIuMcCW89VqSauWQ=; b=Nyl5aO+8W97cPH+DCe+0qNyTw9Hn9g4GBuuBO/S2UG5h+oOblxpN25CvBK8UKUj7z6Vdb4tlM9FrHmXqYPuSN7KQWF9S+5Yqo1g0+hFoqBosF6Q8gZcZQSqt1DbNQM+PUeFBhaKehlGqXtedkUkAqy+7Yh8MZU1MS06m+ngmEbY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704646980191850.651819907154; Sun, 7 Jan 2024 09:03:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWXf-0001Z4-CT; Sun, 07 Jan 2024 12:02:31 -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 1rMWXc-0001Ty-9a; Sun, 07 Jan 2024 12:02:28 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWXa-0007Zh-Km; Sun, 07 Jan 2024 12:02:28 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1d3ea5cc137so9399415ad.0; Sun, 07 Jan 2024 09:02:24 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646944; x=1705251744; 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=R4QwoejbFxocsaZb3oiG49cglGKrIuMcCW89VqSauWQ=; b=Q1AyRAHh2DQn/mx89hQYplg2ogYLRdsHHxUuynaC6KDl+/GA9ANL9GfLQJN5A3Z2J7 JVTqUK2rRA7AM6wO4Mfx9lqzjZBaH8sk9KFnqQn2QN2qZ62zTCWsrf4pBLXnHpkL91Zj pmu2JnejyLwkpCuSRsxtJXlrGMbKuQDad+DHZAUaJbiVlMCj3gtM2t2lKQcytRDpoF2I J6h7b3lES+4XdCQ24tee1JScnIiDcf/W4ScXEvYIXneruBdGXQ7+zat+S3SM8bSIY4pn qp32j4Pl/ybs+NEV9aAFaldLboMTXBKfhYvc1nXEECMzGjQWT+PuyJGlFgKw/QqIckbP TxMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646944; x=1705251744; 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=R4QwoejbFxocsaZb3oiG49cglGKrIuMcCW89VqSauWQ=; b=na6pi1xjNyNKw0/CwtpYvFgSSNKAZ4AdRcVba8iEpJvI8tmQp8EB6zufrbX+3rxgaf EzQEQ8iymucRYpl4FmpponDF2K2mkMV0hVdtsAzUV5eG8bXrz51hV/aditHRoDDXJuQc R446pZELEpdQbKypUQyGrtoM19QNvcDTzY/ide76Q5UBKkwFBvSAJnNl0NhrbJ8yeHxj 9GJwLoSFCHb7MUbjcsqz7qlU3pge7xwOZGR5mtZum6U8ancgZChQM0sMuOdJOwDgu76q LGqLnbkW2SQVhddYjT/rwhCMhm8UremQtPhFuGI6YpHcr9+XNr1XhA62YNi7U8ggro1B /Zbg== X-Gm-Message-State: AOJu0Yy4B3PObYooAUsQNcg89ltYP3O+IVL4Y7KwuuUBTY88K6gwEnm+ fOYdTGJJElD91tFQBJfXf/CFvSFl40Q= X-Google-Smtp-Source: AGHT+IEm99aQrYCXbLMNyK/X3LZ9oL4b8eBNRSUjQPiysbkRPZoiYOuApRbftWhzlGqWtx3VNWvz0g== X-Received: by 2002:a17:902:7483:b0:1d3:eade:bdda with SMTP id h3-20020a170902748300b001d3eadebddamr3111178pll.77.1704646943890; Sun, 07 Jan 2024 09:02:23 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org Subject: [PATCH 5/9] tests/avocado: ppc add powernv10 boot_linux_console test Date: Mon, 8 Jan 2024 03:01:15 +1000 Message-ID: <20240107170119.82222-6-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=npiggin@gmail.com; helo=mail-pl1-x629.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704646982275100017 Content-Type: text/plain; charset="utf-8" Add test for POWER10. Signed-off-by: Nicholas Piggin Reviewed-by: C=C3=A9dric Le Goater --- tests/avocado/boot_linux_console.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 3f0180e1f8..4f05bb7441 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -1386,6 +1386,14 @@ def test_ppc_powernv9(self): """ self.do_test_ppc64_powernv('P9') =20 + def test_ppc_powernv10(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:powernv10 + :avocado: tags=3Daccel:tcg + """ + self.do_test_ppc64_powernv('P10') + def test_ppc_g3beige(self): """ :avocado: tags=3Darch:ppc --=20 2.42.0 From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704646979; cv=none; d=zohomail.com; s=zohoarc; b=eepScAeizY24aMZMGBZ0T6p1GPnKAJhN21zSAf6K0AOV8Yj0cJv9uhIo1PtjgG50gZRGQykx/tV/Af4S83frf1V6tAbQz2TKOiRAq6khN8kz+EoSsI9mcW2o8+2ey8dTwKYUkV5l0nwLqkjX4jTyKKC/EQ6bVmj35LH5u7rk4Mk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704646979; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YLpVpr4lXcxtiYkgYwO8f+zCCPIx0i1aEW37ifuFYyc=; b=FF4J9O2mzhWY1dR8dTCtCszUCZNHroQMsFLMRr45r2FR2kKqKhyV9//38EV3fj1QrtLf2xYNBdM3hJGHKKnmsLFn1/eSEHdyCIFfgUrQvUh97WHWjbv7J174quA8GtOMxC/Lv2x4TUmlCNB5z9jg78qYaw0XpQXbVhqXeujAUi0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704646979515299.69243390551594; Sun, 7 Jan 2024 09:02:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWXz-00020q-Jz; Sun, 07 Jan 2024 12:02:51 -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 1rMWXo-0001nD-NZ; Sun, 07 Jan 2024 12:02:44 -0500 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWXm-0007an-RU; Sun, 07 Jan 2024 12:02:40 -0500 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-28be8ebcdc1so521689a91.0; Sun, 07 Jan 2024 09:02:38 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:02:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646957; x=1705251757; 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=YLpVpr4lXcxtiYkgYwO8f+zCCPIx0i1aEW37ifuFYyc=; b=TFupAU3eRRedZNBOqZX2ti0mujlWAbgKhZvrISNJQhwFtxeFZXH2tzlKBDElTWVoa6 JSDqe76VkhWONbKfjctFklS71YOnwP1M2+6jJKbNw5hk71xCZG1GaVWQSJDxILME9Dz2 lqPqAxa4STIegQaLwgSBURVx6uobKtr85H6rWmAyeQVtnMMNNGryu/e1mxq0TcjZQ7+U +BukVI2HjVM16+8/gMKe7LapX+qvOVfQhbt12iMrD209OHo1xoeDta5JRIGjL9E13tr8 Gfr2B4B+qJOBNzDcpMGgmuuGMTv6wlCNnyi50oQriamlZ6ZHKs+Sa4w9rq11Cfz8ELAx Zn7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646957; x=1705251757; 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=YLpVpr4lXcxtiYkgYwO8f+zCCPIx0i1aEW37ifuFYyc=; b=TtV7/msOZUy4NDC6EPAW7TFCZoVJNY2r7K/WBlCLuLfxdG2jB1nY0kXPhyeB48mj4X B7e4h6WaJ97e5m2EFElPCbh9ezaTbWiYHhMocOSIqPrIZQIFa/YCUK0bKpJtBGVqmVpd Egba+WBIOOP7Wa7QHdbhDdnGIYmgWSXRCGEtPLoeSI+5bqJ79+xJPx+hLTNwjZiLb4sE 0h0XGN/Jc1Dwg+WaTKtCTDoVMgUhpCpfrEa0gRLI7isLUEcUK0FHckNn9PY6SfsjVHph WKRcGbHKu/W8mMSO5xKqavDuXwfV4w0yerWF8VYAfVBYePjOtXLlXpHhj+WOK34v74BR Vmxg== X-Gm-Message-State: AOJu0Yxik/n1E8a+3ztE7wUYF6EUqBEhDOWE27SlDlNL4oMT95U4blgJ SucMDfyrmopbEm8SHmTPlRO72WZlA0o= X-Google-Smtp-Source: AGHT+IGpVYZH+WxnWpoCV5wMccBY2sxR9/AlZEMxNAz0KrpF9S/IPDXr62OXB4nFej6dlVf3Zu9J3w== X-Received: by 2002:a17:902:ce8c:b0:1d4:399d:8511 with SMTP id f12-20020a170902ce8c00b001d4399d8511mr939223plg.84.1704646956660; Sun, 07 Jan 2024 09:02:36 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org Subject: [PATCH 6/9] tests/avocado: Add ppc pseries and powernv hash MMU tests Date: Mon, 8 Jan 2024 03:01:16 +1000 Message-ID: <20240107170119.82222-7-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=npiggin@gmail.com; helo=mail-pj1-x102c.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704646980577100005 Content-Type: text/plain; charset="utf-8" POWER CPUs support hash and radix MMU modes. Linux supports running in either mode, but defaults to radix. To keep up testing of QEMU's hash MMU implementation, add some Linux hash boot tests. Signed-off-by: Nicholas Piggin --- tests/avocado/ppc_powernv.py | 23 +++++++++++++++++++---- tests/avocado/ppc_pseries.py | 20 +++++++++++++++++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/tests/avocado/ppc_powernv.py b/tests/avocado/ppc_powernv.py index d0e5c07bde..4342941d5d 100644 --- a/tests/avocado/ppc_powernv.py +++ b/tests/avocado/ppc_powernv.py @@ -12,11 +12,11 @@ class powernvMachine(QemuSystemTest): =20 timeout =3D 90 - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 console=3Dhvc0 ' panic_message =3D 'Kernel panic - not syncing' good_message =3D 'VFS: Cannot open root device' =20 - def do_test_linux_boot(self): + def do_test_linux_boot(self, command_line =3D KERNEL_COMMON_COMMAND_LI= NE): self.require_accelerator("tcg") kernel_url =3D ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/ppc64le/os' @@ -25,9 +25,8 @@ def do_test_linux_boot(self): kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 self.vm.set_console() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dhvc0' self.vm.add_args('-kernel', kernel_path, - '-append', kernel_command_line) + '-append', command_line) self.vm.launch() =20 def test_linux_boot(self): @@ -54,6 +53,22 @@ def test_linux_smp_boot(self): wait_for_console_pattern(self, console_pattern, self.panic_message) wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 + def test_linux_smp_hpt_boot(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:powernv + :avocado: tags=3Daccel:tcg + """ + + self.vm.add_args('-smp', '4') + self.do_test_linux_boot(self.KERNEL_COMMON_COMMAND_LINE + + 'disable_radix') + console_pattern =3D 'smp: Brought up 1 node, 4 CPUs' + wait_for_console_pattern(self, 'hash-mmu: Initializing hash mmu', + self.panic_message) + wait_for_console_pattern(self, console_pattern, self.panic_message) + wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) + def test_linux_smt_boot(self): """ :avocado: tags=3Darch:ppc64 diff --git a/tests/avocado/ppc_pseries.py b/tests/avocado/ppc_pseries.py index a8311e6555..74aaa4ac4a 100644 --- a/tests/avocado/ppc_pseries.py +++ b/tests/avocado/ppc_pseries.py @@ -12,11 +12,11 @@ class pseriesMachine(QemuSystemTest): =20 timeout =3D 90 - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 console=3Dhvc0 ' panic_message =3D 'Kernel panic - not syncing' good_message =3D 'VFS: Cannot open root device' =20 - def do_test_ppc64_linux_boot(self): + def do_test_ppc64_linux_boot(self, kernel_command_line =3D KERNEL_COMM= ON_COMMAND_LINE): kernel_url =3D ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/ppc64le/os' '/ppc/ppc64/vmlinuz') @@ -24,7 +24,6 @@ def do_test_ppc64_linux_boot(self): kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 self.vm.set_console() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dhvc0' self.vm.add_args('-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch() @@ -62,6 +61,21 @@ def test_ppc64_linux_smp_boot(self): wait_for_console_pattern(self, console_pattern, self.panic_message) wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 + def test_ppc64_linux_hpt_smp_boot(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + """ + + self.vm.add_args('-smp', '4') + self.do_test_ppc64_linux_boot(self.KERNEL_COMMON_COMMAND_LINE + + 'disable_radix') + console_pattern =3D 'smp: Brought up 1 node, 4 CPUs' + wait_for_console_pattern(self, 'hash-mmu: Initializing hash mmu', + self.panic_message) + wait_for_console_pattern(self, console_pattern, self.panic_message) + wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) + def test_ppc64_linux_smt_boot(self): """ :avocado: tags=3Darch:ppc64 --=20 2.42.0 From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704647010; cv=none; d=zohomail.com; s=zohoarc; b=Y3FkRjOx8q9EmXg549+XIJklBS0EPg1ezaMTYV1NdobUM4J+fapz7PjoQf5q5/X0IRbBGqk2XTKikeB5b+PZe/19qikE9ngHnh2Ec9gfkKOBSOZVcLWC2Td++ofg2fEI8KZou6mHw71FFrUgxnUb+LS7wyR/MR8iH3lfDXDVAHY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704647010; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wAKkyryfCUAfxunLLdX5d5FTICFxv2rzMH9pkmW1uJ0=; b=WqFPtfrykZfbHLMucdDnv0m9tNM6ss+sR7JGw96T2L+YDRGPLhPpJ7Ktmik2R40n/7XSqQkS0CSFO4EdAaWnuwfCRqR2XLYvi1w9NKVHt5RdZgiBoPLpa1bMQhrWjb+365IRI1aBoUn5HrYA6irXJsVxLn+HtxiK4RglscQv+k0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704647010393811.3033360408492; Sun, 7 Jan 2024 09:03:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWY0-00026V-33; Sun, 07 Jan 2024 12:02:52 -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 1rMWXx-0001te-RQ; Sun, 07 Jan 2024 12:02:50 -0500 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWXw-0007bQ-CG; Sun, 07 Jan 2024 12:02:49 -0500 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7bc32b04dc9so50398639f.2; Sun, 07 Jan 2024 09:02:47 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:02:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646966; x=1705251766; 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=wAKkyryfCUAfxunLLdX5d5FTICFxv2rzMH9pkmW1uJ0=; b=eSpf1800Kfcp8t60JQqbTQxPweB1U3XC3+csh2JIeN2dMbTZ4Au1YqKPW8joR0lb8O QWga9yda/M2D3nEH1Qy0OzcyuhMOLxE2bCol8LAEN6pbvjIAtul0dHc9Mt+SxpYGUkET KXqmelHCCtDWfrlaOQgskvPaG98DQhjQ5Ko55mAZxGbDMxq111koRHCkIhTKHwhaO8yG SEsqRWMOseB3GAlOTheM6lxQB06XLsd+gfsMPKvjBYVkM1eSImIBKp8YKU8ZSDJXFv9N P5UphTPzixXB30OrRcZQ9elOQhGR3tHELZsH4dvJdlUzX+4eRDbWUGWIxvZZHa81MVRq 2lmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646966; x=1705251766; 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=wAKkyryfCUAfxunLLdX5d5FTICFxv2rzMH9pkmW1uJ0=; b=HnvhUGeU0Hwdcc7Ph9y4/Y8Vang979sG2Sdqe1QFOicJUAeAAn7VbFlRVBCIUJSo7I mu4fx6FHxqL7TRDvkWddw+n+PUhztD3zgUhebHGJhd5w+jmPawgNE1EOU00TveS7qByb HM2iMStD1vHVeVZX/p88licXPSq+G7jjNs+uuC8ViqN54Nxk6Yx1MQIaorMvvNmj+Z9q hP1Enqwp2sVeNIP4EGr5k7nvLo0XJFc4dDWrYoxHN08ES1V4GkpgP2b1oxRB2ZLUt+BF XuJdhvcMJysoGehG8uqP/o0c2sHrfCcZPoMinmiGPo5/JvGF6ixiclnzPET2lGLP3uAw fpxQ== X-Gm-Message-State: AOJu0Yzb9dJEmmNBXUV7jeXZLX09DkuVpA0o8+OPeNTMuHZXd9fNAL+F e858yefHv5JZzk8EMdnlP3pXigisYSA= X-Google-Smtp-Source: AGHT+IH5lKJg61zBBpzag+BI2AJKoCsgjAzcC+wmL+9yaeK/NJ255eL/PROyi+IrEUMcO4fhlS/hCQ== X-Received: by 2002:a05:6e02:1c45:b0:35f:d8fd:8ecc with SMTP id d5-20020a056e021c4500b0035fd8fd8eccmr4706666ilg.0.1704646966091; Sun, 07 Jan 2024 09:02:46 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org Subject: [PATCH 7/9] tests/avocado: Add pseries KVM boot_linux test Date: Mon, 8 Jan 2024 03:01:17 +1000 Message-ID: <20240107170119.82222-8-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::d2f; envelope-from=npiggin@gmail.com; helo=mail-io1-xd2f.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704647012593100003 Content-Type: text/plain; charset="utf-8" ppc has no avocado tests for the KVM backend. Add a KVM boot_linux.py test for pseries. Signed-off-by: Nicholas Piggin Reviewed-by: C=C3=A9dric Le Goater --- tests/avocado/boot_linux.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index a4a78122ac..b20b2fc620 100644 --- a/tests/avocado/boot_linux.py +++ b/tests/avocado/boot_linux.py @@ -102,6 +102,14 @@ def test_pseries_tcg(self): self.vm.add_args("-accel", "tcg") self.launch_and_wait(set_up_ssh_connection=3DFalse) =20 + def test_pseries_kvm(self): + """ + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:kvm + """ + self.require_accelerator("kvm") + self.vm.add_args("-accel", "kvm") + self.launch_and_wait(set_up_ssh_connection=3DFalse) =20 class BootLinuxS390X(LinuxTest): """ --=20 2.42.0 From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704647007; cv=none; d=zohomail.com; s=zohoarc; b=YzUytgyPyHfxWpfGOucSgGJI9HoSmPKrJ7MhlPmUUjf5PJuZKoYfmORBjwL/RJhmWgs1ZsoZau2MaW4un+qGGjefir85WGsXZhfhpp4aT07vM6MR1Jic3vnyPQcy5Vf7O8WJ5O90mYlUcp3w69le94qvkCs8CXLnPrX+X4FjTqY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704647007; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=w+0rM9qJPg4QbTubFG4ojGHqeBLJn3I6TDRx1YClZ58=; b=m6oJl6mcd5PHQJJUWSwyHB4mk/lgtx4Wz7I2F6l6aDpJDGsrL80lPpVGnHHVQs9LkXXOFuUkXp/NHQH0bq2vVMm8l1+A/jjbMQ5E8r1hrWljCT7y2aNt6L4v7/uZkVNxY+sd6XrSD9nMaKPs7G09sju7tDAGTxHs9n3EcuJYEAg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704647007931196.74901883383507; Sun, 7 Jan 2024 09:03:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWYG-00042A-BD; Sun, 07 Jan 2024 12:03:08 -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 1rMWYE-0003nf-G3; Sun, 07 Jan 2024 12:03:06 -0500 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWYB-0007eR-RN; Sun, 07 Jan 2024 12:03:06 -0500 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-5ca29c131ebso873790a12.0; Sun, 07 Jan 2024 09:03:02 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:02:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646981; x=1705251781; 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=w+0rM9qJPg4QbTubFG4ojGHqeBLJn3I6TDRx1YClZ58=; b=WPhOUb0yDxtvw97w59ztbjcc7l68YHFhnOkAYMe43mKg35ecmp8l/5N/Npw+rJLpvJ rlj2NvkteQ8a8twG46nQcl3yndY/jb1KBrdhc+TcSNuL10PJDa/OzqLeE1nVAFDyE6jK bsVwWrCewxOfNuTTJLxtdUF/3Zysk0XdDKZDlTos16ythPsKHbMw6TQ8KwTsiG55obKl PAlpl/bHpaU+ZHtTgP2/VDZA0YVR6BUj46R2uRqIva7KJVFdTWnMBB/rlt0L9fLu5pwX uwq6bWZM+AyEbZuKvxk2z+JDKqUWJ5TXSiSlVzYSP85xkY/TWZNuV8nsJS+o6twUFhL3 tcWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646982; x=1705251782; 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=w+0rM9qJPg4QbTubFG4ojGHqeBLJn3I6TDRx1YClZ58=; b=aEykk9YRevqoE5BItAtG4y+QIeREqfAu8D+qr1GgfvGQL2958FrGUtGmvqbebhRFBA w+zazCUsYnzH+vGUqvobZjqcTORP5Lk93qr5kIBvQcheaVIzNQ7CfK9SSAHlW14vtOcE UI2WWzTqoztAc/AgMDSjCDD+wM6Su4jAGqLRLQDhVVE1ZbO1/E0isGnkVM+pgiLYl1Bm oDZPPbC/Jm5dIsG1RoZ39IoY8pLhEatcxk+MiyL29XJE4c32VjBgwlKBheqvUSMrTs/Q OygnvopsYzVQlCT0Xd3cUugJn/m/Rz0htHT+8FflosQyT9YJjluzcTELQ4O+yC/31FKK Miug== X-Gm-Message-State: AOJu0YzJdnYkw16l6JUQeYD8lxZrLwCkshIje1bkrgEWWkJXw0e9dK89 kOwSi/XjjUNawbpImQi+tPCedfazzxM= X-Google-Smtp-Source: AGHT+IH15G21xWxWnA1HQbWfdVHTKPLtH3+2SHgJcyyLk9cPtxGnfzwDVYKFBn/yVWTIAd5PCdBU1w== X-Received: by 2002:a17:902:e752:b0:1d4:e0e6:694 with SMTP id p18-20020a170902e75200b001d4e0e60694mr3656247plf.31.1704646981650; Sun, 07 Jan 2024 09:03:01 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org Subject: [PATCH 8/9] tests/avocado: ppc add hypervisor tests Date: Mon, 8 Jan 2024 03:01:18 +1000 Message-ID: <20240107170119.82222-9-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=npiggin@gmail.com; helo=mail-pg1-x536.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704647008465100001 The powernv and pseries machines both provide hypervisor facilities that are supported by KVM. This is a large and complicated set of features that don't get much system-level testing in ppc tests. Add a new test case for these which runs QEMU KVM inside the target. This downloads an Alpine VM image, boots it and downloads and installs the qemu package, then boots a virtual machine under it, re-using the original Alpine VM image. Signed-off-by: Nicholas Piggin --- MAINTAINERS | 1 + tests/avocado/ppc_hv_tests.py | 201 ++++++++++++++++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 tests/avocado/ppc_hv_tests.py diff --git a/MAINTAINERS b/MAINTAINERS index 395f26ba86..ffe91a2bc5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1509,6 +1509,7 @@ F: tests/qtest/libqos/*spapr* F: tests/qtest/rtas* F: tests/qtest/libqos/rtas* F: tests/avocado/ppc_pseries.py +F: tests/avocado/ppc_hv_tests.py =20 PowerNV (Non-Virtualized) M: C=C3=A9dric Le Goater diff --git a/tests/avocado/ppc_hv_tests.py b/tests/avocado/ppc_hv_tests.py new file mode 100644 index 0000000000..2162d6bd68 --- /dev/null +++ b/tests/avocado/ppc_hv_tests.py @@ -0,0 +1,201 @@ +# Tests that specifically try to exercise hypervisor features of the +# target machines. powernv supports the Power hypervisor ISA, and +# pseries supports the nested-HV hypervisor spec. +# +# Copyright (c) 2023 IBM Corporation +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from avocado import skipIf, skipUnless +from avocado.utils import archive +from avocado_qemu import QemuSystemTest +from avocado_qemu import wait_for_console_pattern, exec_command +import os +import time +import subprocess + +deps =3D ["xorriso"] # dependent tools needed in the test setup/box. + +def which(tool): + """ looks up the full path for @tool, returns None if not found + or if @tool does not have executable permissions. + """ + paths=3Dos.getenv('PATH') + for p in paths.split(os.path.pathsep): + p =3D os.path.join(p, tool) + if os.path.exists(p) and os.access(p, os.X_OK): + return p + return None + +def missing_deps(): + """ returns True if any of the test dependent tools are absent. + """ + for dep in deps: + if which(dep) is None: + return True + return False + +# Alpine is a light weight distro that supports QEMU. These tests boot +# that on the machine then run a QEMU guest inside it in KVM mode, +# that runs the same Alpine distro image. +# QEMU packages are downloaded and installed on each test. That's not a +# large download, but it may be more polite to create qcow2 image with +# QEMU already installed and use that. +@skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited') +@skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') +@skipIf(missing_deps(), 'dependencies (%s) not installed' % ','.join(deps)) +class HypervisorTest(QemuSystemTest): + + timeout =3D 1000 + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 console=3Dhvc0 ' + panic_message =3D 'Kernel panic - not syncing' + good_message =3D 'VFS: Cannot open root device' + + def extract_from_iso(self, iso, path): + """ + Extracts a file from an iso file into the test workdir + + :param iso: path to the iso file + :param path: path within the iso file of the file to be extracted + :returns: path of the extracted file + """ + filename =3D os.path.basename(path) + + cwd =3D os.getcwd() + os.chdir(self.workdir) + + with open(filename, "w") as outfile: + cmd =3D "xorriso -osirrox on -indev %s -cpx %s %s" % + (iso, path, filename) + subprocess.run(cmd.split(), + stdout=3Dsubprocess.DEVNULL, stderr=3Dsubproces= s.DEVNULL) + + os.chdir(cwd) + + # Return complete path to extracted file. Because callers to + # extract_from_iso() specify 'path' with a leading slash, it is + # necessary to use os.path.relpath() as otherwise os.path.join() + # interprets it as an absolute path and drops the self.workdir par= t. + return os.path.normpath(os.path.join(self.workdir, filename)) + + def setUp(self): + super().setUp() + + iso_url =3D ('https://dl-cdn.alpinelinux.org/alpine/v3.18/releases= /ppc64le/alpine-standard-3.18.4-ppc64le.iso') + + # Alpine use sha256 so I recalculated this myself + iso_sha256 =3D 'c26b8d3e17c2f3f0fed02b4b1296589c2390e6d5548610099a= f75300edd7b3ff' + iso_path =3D self.fetch_asset(iso_url, asset_hash=3Diso_sha256, + algorithm =3D "sha256") + + self.iso_path =3D iso_path + self.vmlinuz =3D self.extract_from_iso(iso_path, '/boot/vmlinuz-lt= s') + self.initramfs =3D self.extract_from_iso(iso_path, '/boot/initramf= s-lts') + + def do_start_alpine(self): + self.vm.set_console() + self.vm.add_args("-kernel", self.vmlinuz) + self.vm.add_args("-initrd", self.initramfs) + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + self.require_accelerator("tcg") + + self.vm.add_args("-accel", "tcg,thread=3Dmulti") + self.vm.add_args("-smp", "4", "-m", "2g") + self.vm.add_args("-drive", f"file=3D{self.iso_path},format=3Draw,i= f=3Dnone,id=3Ddrive0") + + self.vm.launch() + wait_for_console_pattern(self, 'Welcome to Alpine Linux 3.18') + exec_command(self, 'root') + wait_for_console_pattern(self, 'localhost login:') + wait_for_console_pattern(self, 'You may change this message by edi= ting /etc/motd.') + exec_command(self, 'setup-alpine -qe') + wait_for_console_pattern(self, 'localhost:~#') + + def do_stop_alpine(self): + exec_command(self, 'poweroff') + wait_for_console_pattern(self, 'alpine:~#') + self.vm.wait() + + def do_setup_kvm(self): + exec_command(self, 'echo http://dl-cdn.alpinelinux.org/alpine/v3.1= 8/main > /etc/apk/repositories') + wait_for_console_pattern(self, 'alpine:~#') + exec_command(self, 'echo http://dl-cdn.alpinelinux.org/alpine/v3.1= 8/community >> /etc/apk/repositories') + wait_for_console_pattern(self, 'alpine:~#') + exec_command(self, 'apk update') + wait_for_console_pattern(self, 'alpine:~#') + exec_command(self, 'apk add qemu-system-ppc64') + wait_for_console_pattern(self, 'alpine:~#') + exec_command(self, 'modprobe kvm-hv') + wait_for_console_pattern(self, 'alpine:~#') + + # This uses the host's block device as the source file for guest block + # device for install media. This is a bit hacky but allows reuse of the + # iso without having a passthrough filesystem configured. + def do_test_kvm(self, hpt=3DFalse): + if hpt: + append =3D 'disable_radix' + else: + append =3D '' + exec_command(self, 'qemu-system-ppc64 -nographic -smp 2 -m 1g ' + '-machine pseries,x-vof=3Don,accel=3Dkvm ' + '-machine cap-cfpc=3Dbroken,cap-sbbc=3Dbroken,' + 'cap-ibs=3Dbroken,cap-ccf-assist=3Doff= ' + '-drive file=3D/dev/nvme0n1,format=3Draw,readon= ly=3Don ' + '-initrd /media/nvme0n1/boot/initramfs-lts ' + '-kernel /media/nvme0n1/boot/vmlinuz-lts ' + '-append \'usbcore.nousb ' + append + '\'') + # Alpine 3.18 kernel seems to crash in XHCI USB driver. + wait_for_console_pattern(self, 'Welcome to Alpine Linux 3.18') + exec_command(self, 'root') + wait_for_console_pattern(self, 'localhost login:') + wait_for_console_pattern(self, 'You may change this message by edi= ting /etc/motd.') + exec_command(self, 'poweroff >& /dev/null') + wait_for_console_pattern(self, 'localhost:~#') + wait_for_console_pattern(self, 'reboot: Power down') + time.sleep(1) + exec_command(self, '') # console has strange issue after qemu exit + exec_command(self, 'reset') + exec_command(self, 'echo VM finished') + wait_for_console_pattern(self, 'VM finished') + + def test_hv_pseries(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:tcg + """ + self.vm.add_args('-device', 'nvme,serial=3D1234,drive=3Ddrive0') + self.vm.add_args("-machine", "x-vof=3Don,cap-nested-hv=3Don") + self.do_start_alpine() + self.do_setup_kvm() + self.do_test_kvm() + self.do_stop_alpine() + + def test_hv_pseries_kvm(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:kvm + """ + self.vm.add_args('-device', 'nvme,serial=3D1234,drive=3Ddrive0') + self.vm.add_args("-machine", "x-vof=3Don,cap-nested-hv=3Don") + self.do_start_alpine() + self.do_setup_kvm() + self.do_test_kvm() + self.do_stop_alpine() + + def test_hv_powernv(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:powernv + :avocado: tags=3Daccel:tcg + """ + self.vm.add_args('-device', 'nvme,bus=3Dpcie.2,addr=3D0x0,serial= =3D1234,drive=3Ddrive0', + '-device', 'e1000e,netdev=3Dnet0,mac=3DC0:FF:EE:0= 0:00:02,bus=3Dpcie.0,addr=3D0x0', + '-netdev', 'user,id=3Dnet0,hostfwd=3D::20022-:22,= hostname=3Dalpine') + self.do_start_alpine() + self.do_setup_kvm() + self.do_test_kvm() + self.do_test_kvm(True) + self.do_stop_alpine() --=20 2.42.0 From nobody Tue Nov 26 20:16:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1704647020; cv=none; d=zohomail.com; s=zohoarc; b=a3Ftp29PHKNEcKjTw5AZ3fe91464CDqv2GVl4JfKIEHja6FY+r2vC9Q0AR5urX4qouymNxwLP/t+ScoRMgQzQRqkuK1zT/OAbX+BGoVyKXJQfr1wL/XfTjT+RKAzFyp4vvilgIFrUpn7pcB+qf80uK9YUOUe88rLJ97NmhRcP/w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704647020; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gj5wpFqx12ILIOgzmUxgQDtNTX3qdzeAME6ErSpnIOc=; b=C8a7o7nE6ogts4fr/LU5ELzpsZlc/mkTTOLtCWHbpcK6FcY31nVuJQocnYr3b5K0WgUxm2k5yNBE/kRzwD+IGYJHJQc9EkDBB8QgkDojP/jtvtx1U+InzT0/6M2kECXp0Qb2nYgxs9s9aROhnaLKe785iMfrWLGXhpva2cc+gpE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170464702061041.58762679941299; Sun, 7 Jan 2024 09:03:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWYZ-0006Jd-3V; Sun, 07 Jan 2024 12:03:27 -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 1rMWYX-0006EK-LT; Sun, 07 Jan 2024 12:03:25 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWYV-0007iS-LJ; Sun, 07 Jan 2024 12:03:25 -0500 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-28cf491b197so310691a91.1; Sun, 07 Jan 2024 09:03:22 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.03.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704647001; x=1705251801; 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=gj5wpFqx12ILIOgzmUxgQDtNTX3qdzeAME6ErSpnIOc=; b=H/7dwwlh8WBrvkPyRyts4WdhRHoSwa0cx99ls3PjeNugtWHpfUj5byUeMBx0KPp+2o 6e6M49VBeOqxcpoIXbdOG2ir8j1dJWyMdk0iPAp5I8xsm9HUGZac2UrOfgL3r+fDcKVI IBrXXIeIrfsBEj9+sDfrtdrxtrRj3mK8MWF2bwGSv9plAMIDOiyM2jr5Egc2ZAiO1TGx uv7fsHjnR5GfLxThMMGSZfLOk+qO1u3JfW4VAwU2IHxoRUZvlho+fozz6Ylk2kbU0+uI vsFfwR/cZjhVFG6wWoZ9+xX1WEiJCXfkbXI9sqvw5ZxN8R2YBPkvSU6hFVJ5RniuddDV xpLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704647001; x=1705251801; 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=gj5wpFqx12ILIOgzmUxgQDtNTX3qdzeAME6ErSpnIOc=; b=MavQsN0UYHTRRVvlQiuzlZdCoTB6+X8jnKjuvCn+1FxWHjXU8NtA6yiXxjmSUUTolk 6+BDfK3sl3Tf6Yv4nEieIztIltG+dSlofoXp0W33Gex69Vqoe0eobEaJphHFwQUFiJxI +zBT+otZz0Sa/UxEe/D3Sf78Ibp1o7gN/5UBJVJb8ffK5ci0/1V9hmdXFJ6lcsnqm/ui YtgMKalyXkSf3/NJNmpJiNnbwVndFp8FBWHW0+DXb0WLWc9O8n75Mfgctp9tav7P85Bl L1uRn++a2bJywrJOqGFeMYeOylU08F7xP4RQgyb1YKLphYr5rIpYl1ahq5KK7j2gNkIn fYMQ== X-Gm-Message-State: AOJu0YynDeVlvPTtmTTt1vFUkv00FVcaf5icp+cccZ1UsryMrbVIOmLN AqmfGAnLisSrTrg9vjnt2+oJ8rqxNSQ= X-Google-Smtp-Source: AGHT+IHHNb6vX3gycWjeWvOKEFKpWnsSPxfHn88iAAyQXuVswJmntJzLIBqTk0q1TL87Y9YXhUJxuQ== X-Received: by 2002:a17:903:2309:b0:1d4:ca58:8495 with SMTP id d9-20020a170903230900b001d4ca588495mr821414plh.108.1704647001247; Sun, 07 Jan 2024 09:03:21 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org, Warner Losh Subject: [PATCH 9/9] tests/avocado: Add FreeBSD distro boot tests for ppc Date: Mon, 8 Jan 2024 03:01:19 +1000 Message-ID: <20240107170119.82222-10-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=npiggin@gmail.com; helo=mail-pj1-x1030.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1704647022724100003 Content-Type: text/plain; charset="utf-8" FreeBSD project provides qcow2 images that work well for testing QEMU. Add pseries tests for HPT and Radix, KVM and TCG. This uses a short term VM image, because FreeBSD has not set up long term builds for ppc64 at present. Other architectures could be added so this does not get a ppc_ prefix but is instead named similarly to boot_linux. Reviewed-by: Warner Losh Signed-off-by: Nicholas Piggin --- Unfortunately the latest stable (14.0) x86-64 VM image does not seem to output to console by default and I've not been able to find a reliable way to edit the filesystem to change the boot loader options, or use console input in the test case to change it on the fly. Thanks, Nick --- tests/avocado/boot_freebsd.py | 106 ++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 tests/avocado/boot_freebsd.py diff --git a/tests/avocado/boot_freebsd.py b/tests/avocado/boot_freebsd.py new file mode 100644 index 0000000000..79c68b149a --- /dev/null +++ b/tests/avocado/boot_freebsd.py @@ -0,0 +1,106 @@ +# Functional tests that boot FreeBSD in various configurations +# +# Copyright (c) 2023 IBM Corporation +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import os + +from avocado import skipUnless +from avocado_qemu import QemuSystemTest +from avocado_qemu import wait_for_console_pattern +from avocado_qemu import exec_command +from avocado.utils import archive +from avocado.utils import process +from avocado.utils.path import find_command + +@skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited') +@skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') +class BootFreeBSDPPC64(QemuSystemTest): + """ + :avocado: tags=3Darch:ppc64 + """ + + timeout =3D 360 + + def setUp(self): + super().setUp() + + # We need zstd for all the tests + # See https://github.com/avocado-framework/avocado/issues/5609 + zstd =3D find_command('zstd', False) + if zstd is False: + self.cancel('Could not find "zstd", which is required to ' + 'decompress rootfs') + drive_url =3D ('https://artifact.ci.freebsd.org/snapshot/15.0-CURR= ENT/8a735ffdf04936c6785ac4fa31486639262dd416/powerpc/powerpc64le/disk.qcow2= .zst') + drive_hash =3D '95d863dbbc4b60f4899d1ef21d6489fca05bf03d' + drive_path_zstd =3D self.fetch_asset(drive_url, asset_hash=3Ddrive= _hash) + drive_path =3D os.path.join(self.workdir, 'disk.qcow2') + + cmd =3D f"{zstd} -d {drive_path_zstd} -o {drive_path}" + process.run(cmd) + + self.drive_opt =3D f"file=3D{drive_path},format=3Dqcow2,if=3Dvirti= o" + + def run_pseries_test(self, force_HPT=3DFalse): + if force_HPT: + self.vm.add_args('-m', '4g') + else: + self.vm.add_args('-m', '1g') + self.vm.add_args('-smp', '4') + self.vm.add_args('-drive', self.drive_opt) + self.vm.add_args('-net', 'nic,model=3Dvirtio') + self.vm.set_console() + self.vm.launch() + + wait_for_console_pattern(self, 'Hit [Enter] to boot immediately, o= r any other key for command prompt.') + if force_HPT: + exec_command(self, 'x') + wait_for_console_pattern(self, 'OK') + exec_command(self, 'set radix_mmu=3D0') + exec_command(self, 'boot') + wait_for_console_pattern(self, 'cas: selected hash MMU', 'pani= c:') + else: + exec_command(self, '') + wait_for_console_pattern(self, 'cas: selected radix MMU', 'pan= ic:') + + wait_for_console_pattern(self, 'FreeBSD 15.0-CURRENT', 'panic:') + wait_for_console_pattern(self, 'FreeBSD/SMP: Multiprocessor System= Detected: 4 CPUs', 'panic:') + wait_for_console_pattern(self, 'FreeBSD/powerpc (Amnesiac) (ttyu0)= ', 'panic:') + + def test_pseries_tcg(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:tcg + """ + self.require_accelerator("tcg") + self.run_pseries_test() + + def test_pseries_hpt_tcg(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:tcg + """ + self.require_accelerator("tcg") + self.run_pseries_test(force_HPT=3DTrue) + + def test_pseries_kvm(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:kvm + """ + self.require_accelerator("kvm") + self.run_pseries_test() + + def test_pseries_hpt_kvm(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:kvm + """ + self.require_accelerator("kvm") + self.run_pseries_test(force_HPT=3DTrue) --=20 2.42.0