From patchwork Sun Jan 7 17:01:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=WUYlfbE0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7Nmj6JGvz1yPX for ; Mon, 8 Jan 2024 04:03:01 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The 390x tag should be s390x. Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé --- .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 build-system-opensuse: From patchwork Sun Jan 7 17:01:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=na60ZV7c; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7Nmk12Kdz1yPT for ; Mon, 8 Jan 2024 04:03:02 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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édric 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. +AVOCADO_ALLOW_LONG_RUNTIME +^^^^^^^^^^^^^^^^^^^^^^^^^^ +Tests which have a long runtime will not be run unless that +``AVOCADO_ALLOW_LONG_RUNTIME=1`` 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): timeout = 360 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - + @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_pseries_tcg(self): """ :avocado: tags=machine:pseries :avocado: tags=accel:tcg - :avocado: tags=flaky """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") @@ -113,13 +111,11 @@ class BootLinuxS390X(LinuxTest): timeout = 240 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - + @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_s390_ccw_virtio_tcg(self): """ :avocado: tags=machine:s390-ccw-virtio :avocado: tags=accel:tcg - :avocado: tags=flaky """ self.require_accelerator("tcg") self.vm.add_args("-accel", "tcg") From patchwork Sun Jan 7 17:01:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883395 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=YnldBlBn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7Nmj5P6Sz1yPK for ; Mon, 8 Jan 2024 04:03:01 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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/5842257510] 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 @@ from avocado import skipUnless +# We don't run TCG tests in CI, as booting the current Fedora OS in TCG tests +# is very heavyweight (~100s per test). There are lighter weight distros which +# we use in the machine_aarch64_virt.py, tux_baseline.py, etc. class BootLinuxX8664(LinuxTest): """ @@ -21,6 +24,7 @@ class BootLinuxX8664(LinuxTest): """ timeout = 480 + @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_pc_i440fx_tcg(self): """ :avocado: tags=machine: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=False) + @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_pc_q35_tcg(self): """ :avocado: tags=machine:q35 @@ -58,9 +63,6 @@ def test_pc_q35_kvm(self): self.launch_and_wait(set_up_ssh_connection=False) -# 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=arch:aarch64 @@ -84,14 +86,11 @@ def test_virt_kvm(self): self.launch_and_wait(set_up_ssh_connection=False) -# See the tux_baseline.py tests for almost the same coverage in a lot -# less time. class BootLinuxPPC64(LinuxTest): """ :avocado: tags=arch:ppc64 """ - - timeout = 360 + timeout = 480 @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_pseries_tcg(self): @@ -108,8 +107,7 @@ class BootLinuxS390X(LinuxTest): """ :avocado: tags=arch:s390x """ - - timeout = 240 + timeout = 480 @skipUnless(os.getenv('AVOCADO_ALLOW_LONG_RUNTIME'), 'runtime limited') def test_s390_ccw_virtio_tcg(self): From patchwork Sun Jan 7 17:01:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=G17vmy3Q; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7Nmh4xfFz1yPT for ; Mon, 8 Jan 2024 04:03:00 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 -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=3, args=(*self.get_common_args(), "-machine", "virt,gic-version=3")) + +# 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 mode, +# so jump through some hoops to boot the kernel directly. With this, the test +# runs in about 5 minutes (modulo hang), which suggests other machines may +# have similar issues and could benefit from bypassing bootloaders. +# +ppc_deps = ["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=os.getenv('PATH') + for p in paths.split(os.path.pathsep): + p = 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(ppc_deps)) +@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'known failure in trace replay') +class ReplayLinuxPPC64(ReplayLinux): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=accel:tcg + """ + + hdd = 'scsi-hd' + cd = 'scsi-cd' + bus = None + + def setUp(self): + super().setUp() + + # kernel, initramfs, and kernel cmdline are all taken by hand from + # the Fedora image. + self.kernel="vmlinuz-5.3.7-301.fc31.ppc64le" + self.initramfs="initramfs-5.3.7-301.fc31.ppc64le.img" + cmd = "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=machine:pseries + """ + kernel=os.path.normpath(os.path.join(self.workdir, self.kernel)) + initramfs=os.path.normpath(os.path.join(self.workdir, self.initramfs)) + cmdline="root=UUID=8a409ee6-3cb3-4b06-a266-39e2dae3e5fa ro " + "no_timer_check net.ifnames=0 console=tty1 " + "console=ttyS0,115200n8" + self.run_rr(shift=1, args=("-device", "spapr-vscsi", + "-machine", "x-vof=on", + "-kernel", kernel, + "-initrd", initramfs, + "-append", cmdline)) From patchwork Sun Jan 7 17:01:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Q1AyRAHh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7Nmj3TRtz1yPH for ; Mon, 8 Jan 2024 04:03:01 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add test for POWER10. Signed-off-by: Nicholas Piggin Reviewed-by: Cédric 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') + def test_ppc_powernv10(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:powernv10 + :avocado: tags=accel:tcg + """ + self.do_test_ppc64_powernv('P10') + def test_ppc_g3beige(self): """ :avocado: tags=arch:ppc From patchwork Sun Jan 7 17:01:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883393 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=TFupAU3e; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7Nmh5R4Hz1yPW for ; Mon, 8 Jan 2024 04:03:00 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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): timeout = 90 - KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' + KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 console=hvc0 ' panic_message = 'Kernel panic - not syncing' good_message = 'VFS: Cannot open root device' - def do_test_linux_boot(self): + def do_test_linux_boot(self, command_line = KERNEL_COMMON_COMMAND_LINE): self.require_accelerator("tcg") kernel_url = ('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 = self.fetch_asset(kernel_url, asset_hash=kernel_hash) self.vm.set_console() - kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' self.vm.add_args('-kernel', kernel_path, - '-append', kernel_command_line) + '-append', command_line) self.vm.launch() 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_message) + def test_linux_smp_hpt_boot(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:powernv + :avocado: tags=accel:tcg + """ + + self.vm.add_args('-smp', '4') + self.do_test_linux_boot(self.KERNEL_COMMON_COMMAND_LINE + + 'disable_radix') + console_pattern = '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_message) + def test_linux_smt_boot(self): """ :avocado: tags=arch: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): timeout = 90 - KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' + KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 console=hvc0 ' panic_message = 'Kernel panic - not syncing' good_message = 'VFS: Cannot open root device' - def do_test_ppc64_linux_boot(self): + def do_test_ppc64_linux_boot(self, kernel_command_line = KERNEL_COMMON_COMMAND_LINE): kernel_url = ('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 = self.fetch_asset(kernel_url, asset_hash=kernel_hash) self.vm.set_console() - kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' 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_message) + def test_ppc64_linux_hpt_smp_boot(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + """ + + self.vm.add_args('-smp', '4') + self.do_test_ppc64_linux_boot(self.KERNEL_COMMON_COMMAND_LINE + + 'disable_radix') + console_pattern = '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_message) + def test_ppc64_linux_smt_boot(self): """ :avocado: tags=arch:ppc64 From patchwork Sun Jan 7 17:01:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883402 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=eSpf1800; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7NnH1Lxnz1yPH for ; Mon, 8 Jan 2024 04:03:31 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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édric 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=False) + def test_pseries_kvm(self): + """ + :avocado: tags=machine:pseries + :avocado: tags=accel:kvm + """ + self.require_accelerator("kvm") + self.vm.add_args("-accel", "kvm") + self.launch_and_wait(set_up_ssh_connection=False) class BootLinuxS390X(LinuxTest): """ From patchwork Sun Jan 7 17:01:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883401 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=WPhOUb0y; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7NnD5rv4z1yPH for ; Mon, 8 Jan 2024 04:03:28 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 PowerNV (Non-Virtualized) M: Cédric 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 = ["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=os.getenv('PATH') + for p in paths.split(os.path.pathsep): + p = 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 = 1000 + KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 console=hvc0 ' + panic_message = 'Kernel panic - not syncing' + good_message = '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 = os.path.basename(path) + + cwd = os.getcwd() + os.chdir(self.workdir) + + with open(filename, "w") as outfile: + cmd = "xorriso -osirrox on -indev %s -cpx %s %s" % + (iso, path, filename) + subprocess.run(cmd.split(), + stdout=subprocess.DEVNULL, stderr=subprocess.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 part. + return os.path.normpath(os.path.join(self.workdir, filename)) + + def setUp(self): + super().setUp() + + iso_url = ('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 = 'c26b8d3e17c2f3f0fed02b4b1296589c2390e6d5548610099af75300edd7b3ff' + iso_path = self.fetch_asset(iso_url, asset_hash=iso_sha256, + algorithm = "sha256") + + self.iso_path = iso_path + self.vmlinuz = self.extract_from_iso(iso_path, '/boot/vmlinuz-lts') + self.initramfs = self.extract_from_iso(iso_path, '/boot/initramfs-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 = self.KERNEL_COMMON_COMMAND_LINE + self.require_accelerator("tcg") + + self.vm.add_args("-accel", "tcg,thread=multi") + self.vm.add_args("-smp", "4", "-m", "2g") + self.vm.add_args("-drive", f"file={self.iso_path},format=raw,if=none,id=drive0") + + 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 editing /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.18/main > /etc/apk/repositories') + wait_for_console_pattern(self, 'alpine:~#') + exec_command(self, 'echo http://dl-cdn.alpinelinux.org/alpine/v3.18/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=False): + if hpt: + append = 'disable_radix' + else: + append = '' + exec_command(self, 'qemu-system-ppc64 -nographic -smp 2 -m 1g ' + '-machine pseries,x-vof=on,accel=kvm ' + '-machine cap-cfpc=broken,cap-sbbc=broken,' + 'cap-ibs=broken,cap-ccf-assist=off ' + '-drive file=/dev/nvme0n1,format=raw,readonly=on ' + '-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 editing /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=arch:ppc64 + :avocado: tags=machine:pseries + :avocado: tags=accel:tcg + """ + self.vm.add_args('-device', 'nvme,serial=1234,drive=drive0') + self.vm.add_args("-machine", "x-vof=on,cap-nested-hv=on") + self.do_start_alpine() + self.do_setup_kvm() + self.do_test_kvm() + self.do_stop_alpine() + + def test_hv_pseries_kvm(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + :avocado: tags=accel:kvm + """ + self.vm.add_args('-device', 'nvme,serial=1234,drive=drive0') + self.vm.add_args("-machine", "x-vof=on,cap-nested-hv=on") + self.do_start_alpine() + self.do_setup_kvm() + self.do_test_kvm() + self.do_stop_alpine() + + def test_hv_powernv(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:powernv + :avocado: tags=accel:tcg + """ + self.vm.add_args('-device', 'nvme,bus=pcie.2,addr=0x0,serial=1234,drive=drive0', + '-device', 'e1000e,netdev=net0,mac=C0:FF:EE:00:00:02,bus=pcie.0,addr=0x0', + '-netdev', 'user,id=net0,hostfwd=::20022-:22,hostname=alpine') + self.do_start_alpine() + self.do_setup_kvm() + self.do_test_kvm() + self.do_test_kvm(True) + self.do_stop_alpine() From patchwork Sun Jan 7 17:01:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1883406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=H/7dwwlh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7NnT3sqsz1yPH for ; Mon, 8 Jan 2024 04:03:41 +1100 (AEDT) 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) 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) 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) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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=arch:ppc64 + """ + + timeout = 360 + + def setUp(self): + super().setUp() + + # We need zstd for all the tests + # See https://github.com/avocado-framework/avocado/issues/5609 + zstd = find_command('zstd', False) + if zstd is False: + self.cancel('Could not find "zstd", which is required to ' + 'decompress rootfs') + drive_url = ('https://artifact.ci.freebsd.org/snapshot/15.0-CURRENT/8a735ffdf04936c6785ac4fa31486639262dd416/powerpc/powerpc64le/disk.qcow2.zst') + drive_hash = '95d863dbbc4b60f4899d1ef21d6489fca05bf03d' + drive_path_zstd = self.fetch_asset(drive_url, asset_hash=drive_hash) + drive_path = os.path.join(self.workdir, 'disk.qcow2') + + cmd = f"{zstd} -d {drive_path_zstd} -o {drive_path}" + process.run(cmd) + + self.drive_opt = f"file={drive_path},format=qcow2,if=virtio" + + def run_pseries_test(self, force_HPT=False): + 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=virtio') + self.vm.set_console() + self.vm.launch() + + wait_for_console_pattern(self, 'Hit [Enter] to boot immediately, or 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=0') + exec_command(self, 'boot') + wait_for_console_pattern(self, 'cas: selected hash MMU', 'panic:') + else: + exec_command(self, '') + wait_for_console_pattern(self, 'cas: selected radix MMU', 'panic:') + + 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=arch:ppc64 + :avocado: tags=machine:pseries + :avocado: tags=accel:tcg + """ + self.require_accelerator("tcg") + self.run_pseries_test() + + def test_pseries_hpt_tcg(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + :avocado: tags=accel:tcg + """ + self.require_accelerator("tcg") + self.run_pseries_test(force_HPT=True) + + def test_pseries_kvm(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + :avocado: tags=accel:kvm + """ + self.require_accelerator("kvm") + self.run_pseries_test() + + def test_pseries_hpt_kvm(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + :avocado: tags=accel:kvm + """ + self.require_accelerator("kvm") + self.run_pseries_test(force_HPT=True)