From nobody Sun Nov 10 21:19:34 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=1705500798; cv=none; d=zohomail.com; s=zohoarc; b=DuPrT0UzqTIgFqIKi84GeFkYOHMWV4Y48qLPlLxzTf0AIsSyQ37gwwovP29I9gHa/+dXpf1IWmb+BBSlVB70OU2cjJa18LCCY+8TuQCOKVAw9+LZeChNtdpYOs+gI3r84uEl2tUxuoqAoEtzoNvEQJTDuEkXsjzNcGq/F91vx40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705500798; 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=ZtUlfVC/CoXaXLT7OI7+r07dsTnTE47z6bChDQn+KEY=; b=EwCm6zvY8OtlTmyc3cgpkap/W5GaV0L2lSFXSFeBrct0MMxj69Gxb2cf1njcPy5um1qBAV00ICJJ3MtMmthaitw8WgrWFekfZDKDHvMPH6SLucJSu5/ByjROxD0jKm/t38oOkE2igJWcBY0LYXdeeC1EO9YOogBLepFCV0bSOSs= 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 1705500798646561.1824749781064; Wed, 17 Jan 2024 06:13:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ6ev-0004h6-9I; Wed, 17 Jan 2024 09:12:49 -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 1rQ6et-0004fm-Qp; Wed, 17 Jan 2024 09:12:47 -0500 Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ6es-0002lj-41; Wed, 17 Jan 2024 09:12:47 -0500 Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-3606dda206aso57612395ab.3; Wed, 17 Jan 2024 06:12:45 -0800 (PST) Received: from wheely.local0.net (124-171-76-150.tpgi.com.au. [124.171.76.150]) by smtp.gmail.com with ESMTPSA id i136-20020a636d8e000000b005cebb10e28fsm11812428pgc.69.2024.01.17.06.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:12:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705500764; x=1706105564; 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=ZtUlfVC/CoXaXLT7OI7+r07dsTnTE47z6bChDQn+KEY=; b=PIy4AylvYzOlNRC+CB0Jt7q4zp2XwfoQ0t/ks8WQ6oN/6BIpCao83J+jEFGAT2NT3F 9/qhgmIM6PLx0yUKF/U3VGkSKZNpEqJciEK+HH+smkjhxNUUQZkG3wr/GJjrO9+jhV0x QxFvwYn8VIDeiE3RyZ8a+E6rUloMkjl+4kL8SUZOp9jjF2IA/M8cDVL6pkJHj8ThINR/ FUME4VXmJ9RpFbK49L8bCtqt89qgBjwHkp6+BhB0FVeqV8dsPldpQyo0HExtwz+U2hhZ AUl+ympthsY+xwoPgmLnX0GnfoTDBz4VnL31kwcbAkgfwaWTJbahLCXtGX1IwNylXVk+ 2v/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500764; x=1706105564; 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=ZtUlfVC/CoXaXLT7OI7+r07dsTnTE47z6bChDQn+KEY=; b=gBZj7qpsIJICPwZVurMEB7Xh7c36STlBpmXMXqREIBA/QcWC034bjeutXmcw6UzU4I FJPrqkWxi7Jy0unZfbLp4Sf3nVIbULr0fEdFhhdsgeQVcBJeWuocgD9g/IVW9qcTdZat gQu5UUrtcyX+japroEFvUOc29lJ5E4xkPpaMBoPLemshu6Qq4wF5iQQOi7NciaQS0Xor Nrk7+k+R4bXk+9ft9Vgyjp1aSNEGXX0Has+gBblC7e3uOzjW6cGnwRSQttrxb9h/Z/R+ KozAAYJvnBB3XgPIWgEIgn8659K/iWNKMW4DxExUGhz4HT9Xf4s/l7o608XbPlyBfVE0 jL+A== X-Gm-Message-State: AOJu0YzM3U4j4T88l43Kh61dD2fOip1mnYWklSLmfX/H1NXRqiQN5QGH ZseYE65zNLdUDku1sKrLQEpW8fiBDs4= X-Google-Smtp-Source: AGHT+IHHBpGNESDzp2UNWd1vJ/+Wg0p0UkOfoJ6XcN/QAX79xGtTCdZ4PZQGGHA3PY3gKZUZbduWKg== X-Received: by 2002:a92:c561:0:b0:35f:f02f:8fe4 with SMTP id b1-20020a92c561000000b0035ff02f8fe4mr12470425ilj.43.1705500764208; Wed, 17 Jan 2024 06:12: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 Subject: [PATCH v2 1/8] tests/avocado: mark boot_linux.py long runtime instead of flaky Date: Thu, 18 Jan 2024 00:12:16 +1000 Message-ID: <20240117141224.90462-2-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117141224.90462-1-npiggin@gmail.com> References: <20240117141224.90462-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::131; envelope-from=npiggin@gmail.com; helo=mail-il1-x131.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: 1705500798926100001 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 take the SPEED=3Dslow variable from qtests and introduce it to avocado, and make these tests require it. Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Nicholas Piggin --- docs/devel/testing.rst | 11 +++++++++++ tests/avocado/boot_linux.py | 8 ++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index bd132306c1..5cdc23b90f 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -1346,6 +1346,17 @@ 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 +SPEED +^^^^^ +Tests which have a long runtime will not be run unless ``SPEED=3Dslow`` is +exported on the environment. + +The definition of *long* is a bit arbitrary here, and it depends on the +usefulness of the test too. A unique test is worth spending more time on, +small variations on existing tests perhaps less so. As a rough guide, +a test or set of similar tests which take 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..de4c8805f7 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('SPEED') =3D=3D 'slow', '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('SPEED') =3D=3D 'slow', '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 Sun Nov 10 21:19:34 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=1705500780; cv=none; d=zohomail.com; s=zohoarc; b=ZntmsVWTKV8PbtJGxiMg40FAMj+GsP0/Aa9XYtUzzJ4puqlCEFPYBLifGmGiPna2uccV7lN0nzfofe2FO9lMiETEXLT8+FmcD1oa4jawMtDS5NIlMqoOl2M8MF+gp23EdXHiTMg8xj6+kYk0929+5fANd69bDln/utIcoFS5F6s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705500780; 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=24tQcxqPqeU/relh2eghfjT90bWoGXR7lUeha6JIv0o=; b=MJYXCFJ2B1Mt7wKh9vXAywzTvY/wJTLuJjjysnrT2kSGXoDIm/Juw180JdTWWsIxvqGe3G1mj/Bd6OnvfvESeJoDSUD8l9IGrrCfOPLad8M4FvkiRlWsgYTmZMHQdmu4PYjoJUZCeejIKubnghX8u4XBC2i/3Im06CEWPguzN8g= 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 1705500780659541.6459584206069; Wed, 17 Jan 2024 06:13:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ6f2-0004od-GG; Wed, 17 Jan 2024 09:12: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 1rQ6f1-0004kb-0C; Wed, 17 Jan 2024 09:12:55 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ6ex-0002na-RT; Wed, 17 Jan 2024 09:12:54 -0500 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6dac8955af0so6355766b3a.0; Wed, 17 Jan 2024 06:12:51 -0800 (PST) Received: from wheely.local0.net (124-171-76-150.tpgi.com.au. [124.171.76.150]) by smtp.gmail.com with ESMTPSA id i136-20020a636d8e000000b005cebb10e28fsm11812428pgc.69.2024.01.17.06.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705500770; x=1706105570; 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=24tQcxqPqeU/relh2eghfjT90bWoGXR7lUeha6JIv0o=; b=NK9OOPPVkk7t0ognlxR7Wio0yOxHCDTXxVw4dnmzNRdxB2/2HaAIXhXATwOOqI6fwQ 48H/rQSaSYCTgCciOij+7ko11jNid0VerUqsJJJ06iMfkcGNIh50IxAFWy1cBE0TpsvR wd0dtsDiVqv05yBkWBZYqIQld0MMDpTnXMdpUzrxlZIzkB3FhI9HOGrKR+cMo/rmfH0e kIE9KWZhNqrlrrGLqCcmB30t3A+jKKHUCJJnl6CHXjDuYbqVKsWR9iRjMv9/SdQ2YHei luW8zfbwi3h6LUBM7yrvBI6aheOFh7whzSOemB6mCGkW9lUAqppXUsFblFnvoooaFx0Q VaCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500770; x=1706105570; 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=24tQcxqPqeU/relh2eghfjT90bWoGXR7lUeha6JIv0o=; b=ojivvfybj1t8hjzy9rOqCPiPcvHVSsxV6/fXbFPWdSDmAtYs6lBJDqiRGm2lPATosh UcMNIKjar6l6EKjrZ12T+zJQfmha9M2abwZxkb1fJvNFXVe0UHDIMsMid8KYyH8vMGyW 05DLQgxsG2gRotZaZAAMCri0V+KVg5s9GQXamwLZPVPq0Y9EWsF/ogr/elbzk8TRTKf7 nNQkP+k+aTS0ngoUs5QyoX/idBTjiOu90wYB6AG4JEwvZVGfFF49J2cZEIHyyyPbqtmG 9NUJtVmFiIoZ57lbrHN2xSPvFclu2+dVhe32G7w8DEX+vf99OoSkG126x3eskAm4JRAM Fq2A== X-Gm-Message-State: AOJu0Yz8SXyOCql71iORZA604LNsqoAnUMcVppAO95jjct/Y11SJ5szb 4i0kKNzoYMtzQscCh/SMsDBygqUn9SY= X-Google-Smtp-Source: AGHT+IHkx5dYI2jcp4eJk4GKngvt63wyWQixHNQduzSYm3H//fA+0SC1/5MYmsagVIf6ch4OeNiF5w== X-Received: by 2002:a05:6a20:ce4d:b0:19a:e502:1624 with SMTP id id13-20020a056a20ce4d00b0019ae5021624mr2999987pzb.10.1705500769627; Wed, 17 Jan 2024 06:12:49 -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 v2 2/8] tests/avocado: Mark x86-64 boot_linux.py TCG tests as long runtime Date: Thu, 18 Jan 2024 00:12:17 +1000 Message-ID: <20240117141224.90462-3-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117141224.90462-1-npiggin@gmail.com> References: <20240117141224.90462-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::433; envelope-from=npiggin@gmail.com; helo=mail-pf1-x433.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: 1705500782873100003 Content-Type: text/plain; charset="utf-8" Re-testing gitlab CI shows the ppc64 and s390x boot_linux tests take 100-150 seconds each. The x86-64 TCG tests take a similar ~100s each, and are the longest-running avocado tests in gitlab. 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 mark the x86-64 tests as SPEED=3Dslow 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. [https://gitlab.com/npiggin/qemu/-/jobs/5842257510 for results] Reviewed-by: C=C3=A9dric Le Goater --- 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 de4c8805f7..7c9cf6ae15 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('SPEED') =3D=3D 'slow', '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('SPEED') =3D=3D 'slow', '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('SPEED') =3D=3D 'slow', '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('SPEED') =3D=3D 'slow', 'runtime limited') def test_s390_ccw_virtio_tcg(self): --=20 2.42.0 From nobody Sun Nov 10 21:19:34 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=1705500827; cv=none; d=zohomail.com; s=zohoarc; b=FiVhGlCEikAhkyCg06N1Wu2osyWNn+hfRnRLhd0goBIGLIReRG+Ympbje822qRWR9PwBE15AegoXnMB/xHPHfI2yD9sHWmYr3oF+hDp8BDfwT5IjYqWdQ/SssVr9nKqwbWFcVJCsRBMdG714ieyEwL6ujleb3xGiJMpSs5MC+iM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705500827; 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=GXhcWhDx2TddmKjfU3X1E7OWdRVTkV38ZDTIkwpRXgc=; b=HxuK+Gi/WcVDCFWbr9qnRq610jMiEZja4y9NhyiE4S8dIdmlqEKyTMXfDU44i+Zd9yMCzHHSiRb4tB8qivVOPbNJChgN9vl6Nwh/GgEVHUISJTEuX+5DiLk1HEn52g0IhzS7Ae1+Kf0RvVtnWRA/jfd1xy+mlCtEjRxVWD3gjFo= 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 1705500827314561.7636281466964; Wed, 17 Jan 2024 06:13:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ6f6-00052Y-CK; Wed, 17 Jan 2024 09:13:00 -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 1rQ6f5-0004yh-7n; Wed, 17 Jan 2024 09:12:59 -0500 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ6f3-0002o5-DA; Wed, 17 Jan 2024 09:12:58 -0500 Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-7bc32b04d16so414752339f.0; Wed, 17 Jan 2024 06:12:56 -0800 (PST) Received: from wheely.local0.net (124-171-76-150.tpgi.com.au. [124.171.76.150]) by smtp.gmail.com with ESMTPSA id i136-20020a636d8e000000b005cebb10e28fsm11812428pgc.69.2024.01.17.06.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705500775; x=1706105575; 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=GXhcWhDx2TddmKjfU3X1E7OWdRVTkV38ZDTIkwpRXgc=; b=jDhDuZbn/fMWH9BWJsLSPmS2zq1GI48EasGvbh3vgU9CbaL+TaCBuvhZL+EHe2o2jG PzOWK5H+bYtJsL4rcOetfJY7XZJ83Qx0CuhgTbQPX5VoBmkFx8p0VMIor4cNQ1Zeau9Y 0tw1ae3Re4gr6LiTNKcP88FZWr5PQsA4lEFi0da+zeobonIFmHVs5512kyrrU2sJqIn3 R16NwMM2O2flAHcKRm2k8TJC60YRGuNIwhgtTgMgzOjCqg1Ya/ySIrvxd762s5BuaijB wbUeEmqK69LvoGUQ52ckOg9GCsbuuq4ovnVoQkqffp+GbaXxhNF10YbGI+Wa1jwyCMaA AKdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500775; x=1706105575; 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=GXhcWhDx2TddmKjfU3X1E7OWdRVTkV38ZDTIkwpRXgc=; b=Jrd5rJkoU1+Fht0oGpV8ee+liRZTnx/PeM/X4s29cGGL489BdbOw+mM+lIUaD4MYte iHJ4JJe+qJ6RswQR/qmCYRQ1J90XnaBd8y0/LGcCSlH234GKmA2RrPqsdBR1HfXnmFIG Y8L6yMKJsw3aLF8LJ2EDqrNwugmXnNleZZMJTD8xJwUUJ7EeRM2T2YHYCp97/Kq2FIF3 zTp2ysfIp/gR2v5xkEvgelF8QWL5JTuNUd4XIatzJTCixkh8iBwPfMMIE/zSkiNfiAil ELoRl753anI/fmRSCYiV+Qc/fFQgGWay0850RED59CAM8+RBE89Dci0y8uDzm45i8H9K RLbQ== X-Gm-Message-State: AOJu0Ywmw52wOKxnK2BEcYA64JC4RUxdaRlmJ+1sm4JGPDJ8al97hWEi cjTXaC2RXMrpoBokC36Ne3ARg4v/Zpg= X-Google-Smtp-Source: AGHT+IFZr21bKuXTCL5szrVAA1cYsGn+XBuQ6aRdswCrf8o37pBKKUXJuz0hrPcwoc1eUjHTJDindg== X-Received: by 2002:a5e:8619:0:b0:7bc:1bf9:fd83 with SMTP id z25-20020a5e8619000000b007bc1bf9fd83mr9693275ioj.3.1705500774908; Wed, 17 Jan 2024 06:12:54 -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 v2 3/8] tests/avocado: Enable replay_linux.py on ppc64 pseries Date: Thu, 18 Jan 2024 00:12:18 +1000 Message-ID: <20240117141224.90462-4-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117141224.90462-1-npiggin@gmail.com> References: <20240117141224.90462-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::d2a; envelope-from=npiggin@gmail.com; helo=mail-io1-xd2a.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: 1705500829096100001 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 f3a43dc98c..1408d13eeb 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 @@ -194,3 +195,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 Sun Nov 10 21:19:34 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=1705500793; cv=none; d=zohomail.com; s=zohoarc; b=Jrop1+bzVKYVQlWxbuwUIl05jRYdjv3BoiAD79guTWSk0ngoZpvUiX3XEuOqT/aStnYxfPz795re6NbKUR7B3HKSN06rNqbV9K60u+SzmhXDXpFGs09pPIg/dEghtd+VMXeghM2VBkHXLb7SVmqBs/A92MFAYM0FnsqUjx+P8Xs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705500793; 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=sBSkXRxSZoelpdPAumnSWtIKBOY3tYds/IcNxS81yBo=; b=KZ/iRn3pqWz159OFwS3GGyQMmdIMKXKDJOj54JUhM3XQGIcEu2Xotk4ORfKUG86kDfVk+SO1UYhIVIpO4GxIMVPPC10athEqlXtQOjhErvFOz26XsJ61kfqt9e60r3DtvbpI/+kCOaCHEC+Bc35YEGFeswSsK1a1HAYb6lcPpxM= 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 1705500793561379.58225533314885; Wed, 17 Jan 2024 06:13:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ6fG-0005PU-22; Wed, 17 Jan 2024 09:13:10 -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 1rQ6fE-0005Kg-UT; Wed, 17 Jan 2024 09:13:08 -0500 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ6fA-0002oW-5j; Wed, 17 Jan 2024 09:13:08 -0500 Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-7bf2a5cf9cbso159561839f.1; Wed, 17 Jan 2024 06:13:01 -0800 (PST) Received: from wheely.local0.net (124-171-76-150.tpgi.com.au. [124.171.76.150]) by smtp.gmail.com with ESMTPSA id i136-20020a636d8e000000b005cebb10e28fsm11812428pgc.69.2024.01.17.06.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705500780; x=1706105580; 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=sBSkXRxSZoelpdPAumnSWtIKBOY3tYds/IcNxS81yBo=; b=S+Bp+cCxxJpjOn7eNBPj+x9MTuOwjXka0eEk09jr9zLqQhlhhQqnSTeUukJuPtyd+L RTGJQBjPC/dClDKiK/8bjRlUb+nfXLmBINSmgZlryLdy9VqFGC+F2OInqVf7hrQ8P0eS TEJPrV9hYnMY/B6sIkgndFoVA7NgAkF0Ti7bThM/OREjdJM2qhqpOCkFk3p7HwNlIeGr YH48z5g6uR1lcL6V4ihPiI+yiWeUrjJc7YKcsxrnKOWFYkkYZ6XSeYi3A9Hp4gH+BZsR sTp7qkYPyVg7bHoLbmlkg4UD03UF/fPTTPPagvuI4CilLslUmHUMgbDkLSQjgd6nJH4W E5ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500780; x=1706105580; 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=sBSkXRxSZoelpdPAumnSWtIKBOY3tYds/IcNxS81yBo=; b=LoSizSC0z7AtXpU6rxy1yHtF1Es5QNjRF8dCwVFKVmg9IneYemvpxtabna+xoSvuK8 Pri4pvVOKHrhW0dW2f5pzW32LfMYdXl4DgFkkDd36Y7+GLNGrAqm1MplHixSaHh7jLLx +W817Ynkme87JKav95IctlsZKQdp+vy1DwMrfDB6EByiQQOPbUfpemYgJbGtTMQ+tKZL YxluSm8RcqFNtMUc8FQHFFgt13zdr4XPyaxhc6oszBCoiSjs2U4NSC2if2bc59shCXrE 1lc6aWW9PmCl3IxCei6g15CfwpCQ5UFd/cejxWfTX3xSm0tH+p+bL42puTLx+D5mBuII OHJg== X-Gm-Message-State: AOJu0Yyh8laBTgJYkDiAsP2gb5C1qyzaNumm0P6/S+pum9exmJn0luJh skWh0+Um/dvoYQGgHKDHoPPxKqt196k= X-Google-Smtp-Source: AGHT+IE7mn85vvH2j8Zg2s84zIbQSXYGhBpJov+eTaupqAEWapC2Ca04zCUuAAvxN/Km78pZ9O/MLA== X-Received: by 2002:a05:6e02:68b:b0:360:e6b:bc44 with SMTP id o11-20020a056e02068b00b003600e6bbc44mr8719219ils.3.1705500780273; Wed, 17 Jan 2024 06:13:00 -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 v2 4/8] tests/avocado: ppc add powernv10 boot_linux_console test Date: Thu, 18 Jan 2024 00:12:19 +1000 Message-ID: <20240117141224.90462-5-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117141224.90462-1-npiggin@gmail.com> References: <20240117141224.90462-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::d2a; envelope-from=npiggin@gmail.com; helo=mail-io1-xd2a.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: 1705500794969100001 Add test for POWER10. Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Nicholas Piggin --- 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 Sun Nov 10 21:19:34 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=1705500862; cv=none; d=zohomail.com; s=zohoarc; b=FcwEC7NC5qmkFk0ip3+z8Ki4NqVIVMNqONf/uvm8XAYudl7XS6vwD01wse/+LP3+m16n/lT5TH6TOmhGlOsq3R5O6KUSsM/VUuDS/HV9gWo4taijtT6CLf9dI3k6TfwbDvDc8s0j24g4APEgtnNnknr4chPcSRj36XZr+2eIbPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705500862; 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=CCmxRyXKAxaQxESCsyAEpHRKO9cIDLTChrbVPUfudF1SIrbckp6iv8q/oM5bH78bkW1j+bzuqsWleZJUi/ay23vn4EerNQrMRS8FzMKScbuoAjp5OUeFLZ1t6i16Eyhotg3hcjeowkHBLMz5QGct5qtbI1/6Y9PVUCzPycjNc60= 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 1705500862068170.38892388251713; Wed, 17 Jan 2024 06:14:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ6fJ-0005Wb-JO; Wed, 17 Jan 2024 09:13:13 -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 1rQ6fF-0005PG-Qe; Wed, 17 Jan 2024 09:13:09 -0500 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ6fD-0002oh-NF; Wed, 17 Jan 2024 09:13:09 -0500 Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-3606f507efeso53971865ab.3; Wed, 17 Jan 2024 06:13:06 -0800 (PST) Received: from wheely.local0.net (124-171-76-150.tpgi.com.au. [124.171.76.150]) by smtp.gmail.com with ESMTPSA id i136-20020a636d8e000000b005cebb10e28fsm11812428pgc.69.2024.01.17.06.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:13:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705500785; x=1706105585; 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=cWkrZcYigI+P0gHq7yCLhTzfylDK/i4+KUKDBDqWeM0tRQyYVlFUetGmADVa4EYN2p VWV4R4HJPtjX/O5XqzHLWpi+n9kSPFaz8aEq80tAZmb5c2CpkvWRLzhkvHb8hl6ylBaJ tZ9QcORKUGMabzBDAsFg2bpFgyrzbqhJc7+jzKd7z6YyRHnGMf45OSR9b+N+ZI3lJcOM iIHa5ydJhPPoL/17nsvrTcyVszQdtCAb9lFg29XOKK1xpo+Or2sgZMKIgbZtooXwx322 9Yk9ElwEVULIZdrHoEo5lJ/lp+CyuAA+0AgSh2pf+PHUO/NzPlEss/RY42XpU29Hl8cW i+DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500785; x=1706105585; 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=q1yosg5HKmFJSARImsO1IXNkrM2RKdbgryOmFkGz9BpKHXpXpzuEuVk6cEPyNkkV43 8zF0502db+Dg8ZzmoWocYA1SD8egK+59Ogs3QOFPe5u+fEdhuzk5FBathe4hXf1hrhPd KVZ2Jnu4OJfraplJze1hv4gs924mGI0Gt1R6CcmiXyXKQzlxrCuply8GPFWkMHHBoZT6 /TPpFY7JY6On6zv54kgzk9ViGSdgDf9VJDffr1MWsoGPk1fi48gZzIcWimutpMs2QZPW mkPXAVfM2Z9XRk/sT9BUVs+31kI+R5fFvgZPU8kLptYtnuX5iYFLkTeN0t+ClfHQ97pJ oJqg== X-Gm-Message-State: AOJu0Yzo85WqXfVkapcprYWC4w6nGr9RYpGg+X2UiOPEfC5WTiaqmxZS ISFYEtCGB1tprt1ltTcqkcPQPDS1mig= X-Google-Smtp-Source: AGHT+IEQglE7SJ1Oa6n12Kl0ghdVGhJMfAlB/e4xtxvuM3kB7h4IM9Ez0Fj2mTihGL7lGj94cBam5w== X-Received: by 2002:a05:6e02:605:b0:361:962f:ba0d with SMTP id t5-20020a056e02060500b00361962fba0dmr1112261ils.39.1705500785640; Wed, 17 Jan 2024 06:13:05 -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 v2 5/8] tests/avocado: Add ppc pseries and powernv hash MMU tests Date: Thu, 18 Jan 2024 00:12:20 +1000 Message-ID: <20240117141224.90462-6-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117141224.90462-1-npiggin@gmail.com> References: <20240117141224.90462-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::132; envelope-from=npiggin@gmail.com; helo=mail-il1-x132.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: 1705500863428100001 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 Reviewed-by: C=C3=A9dric Le Goater --- 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 Sun Nov 10 21:19:34 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=1705500873; cv=none; d=zohomail.com; s=zohoarc; b=YgEn7LYBbLXrQZZt/ozUzps4Tp207UoRVKvG87r7hMIU4oLM635YGY8BauOoTmGf74cpmAXh1srWHJ0n9TRqTUTaVXvKvysBDWYm4ApE08ignxEXCLFNGgQALAxt1BywQYmJo5B2+A4P1NRGw4SaQjNzE/bbZAgSil/UtBj5M6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705500872; 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=YutzPG8zZ0lU+po8EJCck+iZJ2Ot/PSkmFSXXLP8+Zw=; b=TqmF9xDLsFd7+cv0yWA0ygJaQYrXmzA7+zWmub6dNkLM0boswvWzI05JxCUXw6MNdVJ1EWvFIpwDLD+tn0a5UB2ayhO/6Ca/Zcd8MUCrymcYpaaNCLGwKgDM0GYDibQpciIarfzZf0/X9ysq0rk+NlS60wO1fOgVP5hFE/c4U94= 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 1705500872991542.2503513688445; Wed, 17 Jan 2024 06:14:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ6fM-0005id-UQ; Wed, 17 Jan 2024 09:13:16 -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 1rQ6fK-0005bd-MV; Wed, 17 Jan 2024 09:13:15 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ6fJ-0002pK-4U; Wed, 17 Jan 2024 09:13:14 -0500 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6daf9d5f111so8980885b3a.0; Wed, 17 Jan 2024 06:13:11 -0800 (PST) Received: from wheely.local0.net (124-171-76-150.tpgi.com.au. [124.171.76.150]) by smtp.gmail.com with ESMTPSA id i136-20020a636d8e000000b005cebb10e28fsm11812428pgc.69.2024.01.17.06.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:13:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705500791; x=1706105591; 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=YutzPG8zZ0lU+po8EJCck+iZJ2Ot/PSkmFSXXLP8+Zw=; b=Zg8h6IuN+bqAecHdti52o8jS/0dpH5cHKTQmqCZhiksOS8Dtwia7GTMjXBHyi2du3f +Jf1hYsvTUA0zX3cCYJ0YHQogWKHRqw1PHcKOo+EUj0uPNHkrs1GxiZxFs/3GVHw3H8/ U5Fg4HqUWrzaRgXNIVUlagW2xnky1En7z6R6JyAsFmGDw77rL4eM2IbFhpO0WVgJ+opC jLvIM/tJ+GD9MkcLRqwcybwkNTXOd5OYXblP023hmaQPpVZJaGDF4axSdK6H0PAY51BT GAM6q1+NUHWozBxo36RUp8EwJK/eElWJSTZDkm87CkQCynfpjAMkAJFPkn4r+ZgFClmg jiUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500791; x=1706105591; 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=YutzPG8zZ0lU+po8EJCck+iZJ2Ot/PSkmFSXXLP8+Zw=; b=devY6d8Z3gtcPmLu9lBeX1GwBnSfnMXdwV/NbmduKmqqMT/YIPBacbj+BmugEbm8rP F6/qs/8MVlCNVfrKiNCHitIifDKOFkmEjzb9r3ChpufQHxsbWo5vXCXXpcuqopHs6vcf TTfcz6BTrwkZxGcRT1CVrW/AAC5gx0kOuRhF7IPZAluZGrPJCGyLFtzRZo3Cmtdf6WEb GsCipmaxyisoZpfDwWEwn11jK4FNgiCqIdqrh4VNe2rYGZH4W6pGz6MkQcT8bYjIrNr7 4vZ5zJ81t6TC8xg/7DvKEs/qZhcYlmC0vwEU4zn//zUmO7rsOsnc7ang8QJf6LVZbDe9 QGKw== X-Gm-Message-State: AOJu0YyOA3CTk13iB8qoZnHLu9jdBUM59rS9tWwev+IQide2g7TNUq4j krUyZ22Fg2pjigCQCJul2vad0K/f/0o= X-Google-Smtp-Source: AGHT+IGBW/6Kn/G5y0+9KHW9PonH5+xAh8KAEDhuU6Td9GCdzhmvS2c8MvyRaTAEk5IxQw2fr+p9Dg== X-Received: by 2002:a05:6a20:94cc:b0:19a:e0cc:7e25 with SMTP id ht12-20020a056a2094cc00b0019ae0cc7e25mr6591916pzb.0.1705500790742; Wed, 17 Jan 2024 06:13:10 -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 v2 6/8] tests/avocado: Add pseries KVM boot_linux test Date: Thu, 18 Jan 2024 00:12:21 +1000 Message-ID: <20240117141224.90462-7-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117141224.90462-1-npiggin@gmail.com> References: <20240117141224.90462-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::431; envelope-from=npiggin@gmail.com; helo=mail-pf1-x431.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: 1705500873334100001 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 7c9cf6ae15..4c9b15ba06 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 Sun Nov 10 21:19:34 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=1705500866; cv=none; d=zohomail.com; s=zohoarc; b=bLIjNP7rDYEqXCFpXTIjlzRz18kduW1P+8UBosFjfO8AGyYTYR6QmRhiz+ywxESsSMn3WCxwMz9v6B4FkCxG3tYd0eT8EU51Fcvxhh6PPlAoG0BKrX9s4zz+pI1mSX9jnZSumVo6/VjieT0oEQFj0ASt/c4hd69AW+Oc2nKA+mM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705500866; 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=xiHHuj4kwhZGtwrNQLZcjOwLh7+4izxlGNDa/VHvDps=; b=BwGZCkA4FagoQnrSDDYZlvb8gkOPzDzkuSQc1BUKqE8m9a6T1s5vlVWdGBf21KYk+D7sbtVZ/vmv729W3e3lxjvyN/FxeE19h8YvPGuztkzL38vFVsuPLiETNsPMw37O3B12toUnbOqDlESmazkPTDgk0iov5iRv3ILeQP9qIys= 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 1705500866088164.77105956548723; Wed, 17 Jan 2024 06:14:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ6fS-00062P-3T; Wed, 17 Jan 2024 09:13:22 -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 1rQ6fQ-0005zj-Lx; Wed, 17 Jan 2024 09:13:20 -0500 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ6fO-0002pr-5t; Wed, 17 Jan 2024 09:13:20 -0500 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6e0af93fdaaso3158663a34.3; Wed, 17 Jan 2024 06:13:17 -0800 (PST) Received: from wheely.local0.net (124-171-76-150.tpgi.com.au. [124.171.76.150]) by smtp.gmail.com with ESMTPSA id i136-20020a636d8e000000b005cebb10e28fsm11812428pgc.69.2024.01.17.06.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705500796; x=1706105596; 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=xiHHuj4kwhZGtwrNQLZcjOwLh7+4izxlGNDa/VHvDps=; b=Nv0GKHDYhY7+VDX/8tuXDdcc4CUCoGaomBwGnJOd5NhbpVf5cjIDt8CSjOweifPIKH waE21w5yYSfVtWpMSwRRxRnMmcDFY3D/Fcy3X2fW8+bG3Riln1c8aY5dv4ggdRFi3Jc/ 9VK9V+S7DKhDFbEv4wc8vP1VruXFDPhd3Gw2/GNCR+qQTwyq/9P+yva3zFkj7T5Ju2Qu f5BXErENZ7ukJXdjsJZSuORzju4l1MmFd0dq7SZ1RGdEsPJg6ap4YSTh3P3wjnqc66tV odfreWneK5KHEww8dUVj9hJtN7MFG/OG4Dje4mjujP9ofS8vr5i+s2lLnsggoPIBBiCt PXeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500796; x=1706105596; 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=xiHHuj4kwhZGtwrNQLZcjOwLh7+4izxlGNDa/VHvDps=; b=Q83msGDKOBaRMVxpAUYHEQ6xmghvQQF1FoMfI6gfDua7BpAxcuaCqOeqHI1gUI4aAF VzVcQZwhDfKgb92BLpC8TTm54z0WCFrW2RDdTMz3L9xtmhS/gsKRXN3zsRZWj39aDx99 TYa2q95p0reLzuavySA1V7nB8zPaQkpifJ/xXuJawWcV4NoVyAqnCcLQczysBiswPAXk dRs2VyiKhUt5rBaikDn4h+am1CQFx3LB790P/dorJmNuDYcijsllFWsBfM6yHSBKa6rm DN+bq56qTt0brVcV8yoPNeH9ACKflLYtuDTSktSQD7+4BZwav6TKCLrGm3+v5UFK2ppE ynJw== X-Gm-Message-State: AOJu0YyirSjeZ0pcR/3ww+EmOi9q3+J1z0Wgdq2Zj1uExoWy2RLz4EPt WFQx8OGsy2tQ6KviBQaX4lDpykXPyyg= X-Google-Smtp-Source: AGHT+IEE/8piKxp7XdazCM8iXlNqAm9OAW+cWQfj3PdX8oqgIuDJh3mg3NxZ8qvMbTafyQ0vf68k9w== X-Received: by 2002:a05:6358:70d:b0:176:18ee:4e8b with SMTP id e13-20020a056358070d00b0017618ee4e8bmr219758rwj.8.1705500795904; Wed, 17 Jan 2024 06:13:15 -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 v2 7/8] tests/avocado: ppc add hypervisor tests Date: Thu, 18 Jan 2024 00:12:22 +1000 Message-ID: <20240117141224.90462-8-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117141224.90462-1-npiggin@gmail.com> References: <20240117141224.90462-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::333; envelope-from=npiggin@gmail.com; helo=mail-ot1-x333.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: 1705500867373100001 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 | 203 ++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 tests/avocado/ppc_hv_tests.py diff --git a/MAINTAINERS b/MAINTAINERS index b406fb20c0..bf41ac61c8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1523,6 +1523,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..2f80d0d176 --- /dev/null +++ b/tests/avocado/ppc_hv_tests.py @@ -0,0 +1,203 @@ +# 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('SPEED') =3D=3D 'slow', '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, pat= h, 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() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + self.vm.add_args("-kernel", self.vmlinuz) + self.vm.add_args("-initrd", self.initramfs) + 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.require_accelerator("tcg") + self.vm.add_args("-accel", "tcg,thread=3Dmulti") + 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.require_accelerator("kvm") + self.vm.add_args("-accel", "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.require_accelerator("tcg") + self.vm.add_args("-accel", "tcg,thread=3Dmulti") + 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 Sun Nov 10 21:19:34 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=1705500886; cv=none; d=zohomail.com; s=zohoarc; b=jCNTVhpZ2BzhD2UIghg7PhKqzT6d5XhiOIYvQPyCd8MN8IRGL4aTxCZoRkRzIlSp3so+OZz4M1GUgxTDo2w5e0YpgkZrsHaVGylC9pcYk43iFuJQdmgSs2njjuZoWpE5OvsB4i2rDOU2meKLkl+Ap1H1nzdpmo6dctP+S27K+bs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705500886; 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=+bA1RQL7GXjMfCEm7O5Bzn0f4i4pqBYPwrxSXO5B/V4=; b=E67e5Ie4E2sQqmc9xhqgWABg3kv1Y+y5T8GB90jIaZrksQX3M+UXG2JxHjckTiJdo1VtELX40kPICVohgrwpZ9y0W+OBsOFtUp0CI9o2NRmrYkIZoo326o8n4pKdYXig0kV55OZpdDw/JE62qC02cmwmKesDkGdsDu6mNn0wrIQ= 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 1705500886475438.0119845934437; Wed, 17 Jan 2024 06:14:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ6fX-0006Do-2l; Wed, 17 Jan 2024 09:13: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 1rQ6fV-0006Bh-Ph; Wed, 17 Jan 2024 09:13:25 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQ6fT-0002qR-J8; Wed, 17 Jan 2024 09:13:25 -0500 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6d9b37f4804so7195398b3a.1; Wed, 17 Jan 2024 06:13:22 -0800 (PST) Received: from wheely.local0.net (124-171-76-150.tpgi.com.au. [124.171.76.150]) by smtp.gmail.com with ESMTPSA id i136-20020a636d8e000000b005cebb10e28fsm11812428pgc.69.2024.01.17.06.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705500801; x=1706105601; 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=+bA1RQL7GXjMfCEm7O5Bzn0f4i4pqBYPwrxSXO5B/V4=; b=GTBDNqgczCUC+YMSdhMY5edjLzkiTlsZb2HQBnc7IoYJP47LWt+0gkLNz5N++7i1tM Gqk7r7UYHTN6JIM1wVUI05NhWGXX4t3A/aTFgLhsBSV9+E52VsgnoK5AU3cEPD1BL3wS zA5APJlchdfTqMD5bjb9KMzDP1tllTyz44m8lSFZUaJMKa5OaJXSfGpYXiJkgQPzG2nl KT1NgGy8W3u+dskakf1CATcEYS2CmYf2opbhG900l6N0CSQWTMr/OPhv2I4sOxvRztBc E72HERJdI2VRwQg+jBflwUlWVhlY95LXVx011YRtu/Qt26iffa2ZlnRFhYQ/Emu5P/gv /NiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500801; x=1706105601; 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=+bA1RQL7GXjMfCEm7O5Bzn0f4i4pqBYPwrxSXO5B/V4=; b=uvZI2m52cml0HH7GKe93ZKs7WHQDRsAlwUEYJSLm1WOD1o7eMiPqBaWwrAW/HpkzHz q/fOpqpKtEStTFBlQyBFqdIIh3q0n75zfsnb5PZmE9ICk7IES4yJaDrSM+ZDa7YH5wet tFITQeYpWZPh6P4NTFvF5fF/jaCQ42oL7/y3mB8NyxzsItS5serlHC45lANPGggxH52X czbpkda0BAlUEWwbJW8sLyrJloovQX88eb9ZK5rN7OUU+xawBnbu6XIgF7lyRvuMNZsL N8I9ypT7oaBHlxAlZDDZLYlZdk0RNr+d48Ub69CQLWAkyYBcG8SGXHjpHoauHv0dcy43 Z4OQ== X-Gm-Message-State: AOJu0YxWEBIegB/uSZioMSgXJ9SMgbAofltg653k21HQlHPxS3yU0nhc GETmPDYwPPGY+BeMV9rxLs184idA3vPVyKNUiABmLeXLuZ1tdXY0W/qJ6Ds5 X-Google-Smtp-Source: AGHT+IGvGWr9MIkzg4KmaEkaJbJtrMTAqh8Ry/FsbBg28VDkMaZhTYPixuepc7ZavtGuZrgJqkzBcg== X-Received: by 2002:a05:6a21:3987:b0:19b:46c7:c986 with SMTP id ad7-20020a056a21398700b0019b46c7c986mr1435630pzc.16.1705500801301; Wed, 17 Jan 2024 06:13: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 v2 8/8] tests/avocado: Add FreeBSD distro boot tests for ppc Date: Thu, 18 Jan 2024 00:12:23 +1000 Message-ID: <20240117141224.90462-9-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240117141224.90462-1-npiggin@gmail.com> References: <20240117141224.90462-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::429; envelope-from=npiggin@gmail.com; helo=mail-pf1-x429.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: 1705500887429100001 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, and powernv9 tests. This uses short-term snapshot build artifacts, because FreeBSD has not set up long-term builds for ppc64 yet. 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 | 174 ++++++++++++++++++++++++++++++++++ 1 file changed, 174 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..c01cd06cca --- /dev/null +++ b/tests/avocado/boot_freebsd.py @@ -0,0 +1,174 @@ +# 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 +import subprocess + +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('SPEED') =3D=3D 'slow', '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') + tar =3D find_command('tar', False) + if tar is False: + self.cancel('Could not find "tar", 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) + self.drive_path =3D os.path.join(self.workdir, 'disk.qcow2') + + cmd =3D f"{zstd} -d {drive_path_zstd} -o {self.drive_path}" + process.run(cmd) + + kernel_url =3D ('https://artifact.ci.freebsd.org/snapshot/15.0-CUR= RENT/8a735ffdf04936c6785ac4fa31486639262dd416/powerpc/powerpc64le/kernel.tx= z') + kernel_hash =3D '31d14c2dc658858830a7acab5128a5b91ea548cf' + kernel_path_txz =3D self.fetch_asset(kernel_url, asset_hash=3Dkern= el_hash) + self.kernel_path =3D os.path.join(self.workdir, 'kernel') + + with open(self.kernel_path, "w") as outfile: + cmd =3D f"{tar} OJxf {kernel_path_txz} ./boot/kernel/kernel" + subprocess.run(cmd.split(), stdout=3Doutfile) + + def set_pseries_devices(self): + self.vm.add_args('-drive', f"file=3D{self.drive_path},format=3Dqco= w2,if=3Dvirtio") + self.vm.add_args('-net', 'nic,model=3Dvirtio') + + def set_powernv_devices(self): + 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=3Dfreebsd') + self.vm.add_args("-drive", f"file=3D{self.drive_path},format=3Dqco= w2,if=3Dnone,id=3Ddrive0") + self.vm.add_args("-kernel", self.kernel_path) + + 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.set_pseries_devices() + 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:') + exec_command(self, 'root') + wait_for_console_pattern(self, 'resizewin: timeout reading from te= rminal') + exec_command(self, 'poweroff') + wait_for_console_pattern(self, 'Uptime:', 'panic:') + self.vm.wait() + + # powernv does not have a bootloader so must load the kernel directly + # and work around manual specification of the root device. Also can't + # specify options like radix_mmu the same way (todo: work out how it + # is done, and add HPT test). + def run_powernv_test(self, force_HPT=3DFalse): + self.vm.add_args('-m', '8g') + self.vm.add_args('-smp', '4') + self.set_powernv_devices() + self.vm.set_console() + self.vm.launch() + + 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, ' Abort manual input= ') + exec_command(self, 'ufs:diskid/DISK-1234s3') + + wait_for_console_pattern(self, 'FreeBSD/powerpc (Amnesiac) (ttyu0)= ', 'panic:') + exec_command(self, 'root') + wait_for_console_pattern(self, 'resizewin: timeout reading from te= rminal') + exec_command(self, 'poweroff') + wait_for_console_pattern(self, 'Uptime:', 'panic:') + wait_for_console_pattern(self, 'OPAL: Shutdown request', 'panic:') + self.vm.wait() + + def test_pseries_tcg(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:tcg + """ + self.require_accelerator("tcg") + self.vm.add_args("-cpu", "power10") + self.vm.add_args("-accel", "tcg,thread=3Dmulti") + 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.vm.add_args("-accel", "tcg,thread=3Dmulti") + 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.vm.add_args("-accel", "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.vm.add_args("-accel", "kvm") + self.run_pseries_test(force_HPT=3DTrue) + + # powernv9 works, powernv10 fails + def test_powernv(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:powernv9 + :avocado: tags=3Daccel:tcg + """ + self.require_accelerator("tcg") + self.vm.add_args("-accel", "tcg,thread=3Dmulti") + self.run_powernv_test() --=20 2.42.0