From patchwork Thu Jan 2 09:23:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 854640 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7689475wrq; Thu, 2 Jan 2025 01:24:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU/rTJJH4GDb7iteC50Q6sQhtuEy1VVJRjrrW3uSI/z6+yyTZYureombWa0Jq9r8d91GxlmeQ==@linaro.org X-Google-Smtp-Source: AGHT+IFs3+x+MCPtT6trbDuyDoXmEKNBMZL61k0+SeYbrGAqUDd/SjaXSKibJBzjkWbvPFpSqk4d X-Received: by 2002:a05:6214:224d:b0:6d8:9ead:c665 with SMTP id 6a1803df08f44-6dd23356701mr761544886d6.27.1735809847071; Thu, 02 Jan 2025 01:24:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735809847; cv=none; d=google.com; s=arc-20240605; b=d+DN0P2dLl1UAKPw9sbmoRQJbtZWNwte3U2w3/NW++DPGO5PyxmhlmHJ4OHEv9TIj/ m/bpda+26b8CIY97jR2/wmrmphANCbb5ClLaHRN5Xn5NpOGPfry2ns7BfBs3mA/9P41c iXWcMzncr86CyUGEFtuL0sf6avqnazb9xFlB1KW/3l2mwVFf5UDNi4AIcRAQKj0uXtID A8pwdzJSYRG2LuppbTZvH5LjaOSMI1/XkL2UluPyBMjZqGnFa2TlnMkd5gMQIySOodF3 QzmIk7cA7NS8noezht9V8ho0ireZRiMXlx76wCie+0S7j+5txP1oqOhnY8D8dxaVgWwR n7tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=6zEuQv7QpF6Ie4cNcFdsaWLdFf2BXXaTH2NbRgASESA=; fh=m3MMMCvCKN1my0Rj//H0uRzHGzdChaosz/hHvWzs21w=; b=eilnQ1cDCobforDQS0pgQ78kf1Yo2Bf8S1g30svrHxzfCOUu1pPZr7PjXS0rYwZnUU aAX1hgUBiXV5u6qcxfC+Ukh1Wbop5HUiD52X/XuSNTiihxNL34xSD+QNZf5SB3yXORUo L7le713nJweyvCJD+6lemX5b9tGU1JWN3TGhX5WKLg9T3GGtdLvKm0V+PIDoTCMZlkbK bd/dPrE0S7/5T+yjfvT4oMdtBJuID/K7Q86StiWyKc0EqWlnjD9O4sknoKOD0/7y7imC ZsnbaDARlmbHhB6lM6KmtCNpv/Tkm+AdXsn1SAExm6OPK2hNm6n9tHnZ+Ay4v8knKVkR 4uDw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oU4grogY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd182364e9si364467256d6.236.2025.01.02.01.24.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jan 2025 01:24:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oU4grogY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTHQF-0004p5-D5; Thu, 02 Jan 2025 04:23:19 -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 1tTHQC-0004ow-E3 for qemu-devel@nongnu.org; Thu, 02 Jan 2025 04:23:16 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTHQA-0006tM-Dz for qemu-devel@nongnu.org; Thu, 02 Jan 2025 04:23:16 -0500 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2f441791e40so12441766a91.3 for ; Thu, 02 Jan 2025 01:23:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735809791; x=1736414591; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6zEuQv7QpF6Ie4cNcFdsaWLdFf2BXXaTH2NbRgASESA=; b=oU4grogY1aDYyu7OgH9bTOxX8WTIaazWXZdGGiNQXkHlKBfjcQAO4mL/LtAs9y2FT7 R0jNuC729JKFaeelmBqCMdq0UMOUfm8RpdNEBmvBwEoXm0QAvG38snJca7hAkVYoft9x 1NG9q4j52h+NUeJvMV2ED61t86jdhEeiONCYlvnZlx1kWBVuPB3fQtx3A65tCPqV5HIC BNOjFft+muYciwpvlIWRouV2sbzfBDmRK4pqmDFe3OjsvdKG0OeUIg0MGUI0m728gDSF gjpmg81PnZaGCtfwcBJ+Le9QW22dYagdkITHNTwEDBC2lzzAVu4p+LOZEwRtBaz4Sbwx NsNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735809791; x=1736414591; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6zEuQv7QpF6Ie4cNcFdsaWLdFf2BXXaTH2NbRgASESA=; b=OuMgEhsT2XPyf9cdLQxKwB9Z36GLkXj6I2Qwt0AKAK6YuYDzjMOpLrJq+xfY3mH3r4 y9NcBfnqdwWRH0uhTDdGpMTqQAUPwfT+5A0HrDK0EphyQjWKnRmnRSHxF5hdoXpeGRNy XxDgBfw1q+wLDjXeKMDOiAuK3kRon4y8URL2LI94GYS4Cm6mjnC2XZxk6S9v2ajplGcb Lq6eNMEN5hI5fM88Yb/cY6X6gizy0FSJtaNfl28WcAyc7fXJpGvdXDVP6dY+RIwV7PB+ 0RxR7IvA9NO7EFMNQwqlppcw2UmHsGM/To07haRNbq0WfTcCcqCRLiHzrgaybSl40a8U mMuQ== X-Gm-Message-State: AOJu0YzJV6eCzsffMXLWG8mXuJ+qLGNCY8PaMDAi+tNG0iRyQpgLLs/3 UB0rRSf9SxNeKM0JGP1hRsgdx+iIbiO6qjuWlGe3jmaQZ5E/355i6YeyYDmNwRQBjavdfbKFPgQ cggk= X-Gm-Gg: ASbGncuuADkaoPsa3amoAZ9dRM65mXNz2mw8/NmXBBSCJGeTtWpCCJNSZyeqGqvfmi/ WNJs4JVG92lFQUMLUu7x4JRu7xu+1dvW/t6H6D8QzC3n2D2Ia7oupd2EJ1CTOkSqKYsYNObD0Uw N9DZSG/SOrh6JnD/CNBc3IbLe2hxH9NLqhOTpV+ei4ngCK7UoQ+/b42q0rAz69nbHYJThlmYBJx AsR9mEk21K4t1yS/pbESefRBeY+w85TN3YwrlkRUQjlDsmQft6f93WcWdWazxZo13B3kVDCHNgq hq09PFMAr6floJ1VF6uFIraepD5TsSU= X-Received: by 2002:a17:90a:c2c7:b0:2ee:ee77:227c with SMTP id 98e67ed59e1d1-2f452dfaecdmr59747285a91.3.1735809791402; Thu, 02 Jan 2025 01:23:11 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f447882a3fsm26034602a91.38.2025.01.02.01.23.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 01:23:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Laurent Vivier , Fabiano Rosas , Richard Henderson , Helge Deller , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v5] tests: Add functional tests for HPPA machines Date: Thu, 2 Jan 2025 10:23:01 +0100 Message-ID: <20250102092301.42122-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=philmd@linaro.org; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Add quick firmware boot tests (less than 1sec) for the B160L (32-bit) and C3700 (64-bit) HPPA machines: $ make check-functional-hppa ... 4/4 qemu:func-quick+func-hppa / func-hppa-hppa_seabios OK 0.22s 2 subtests passed Remove the duplicated B160L test in qtest/boot-serial-test.c. Suggested-by: Helge Deller Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Helge Deller Tested-by: Helge Deller Reviewed-by: Thomas Huth --- v5: Remove duplicated qtest (th_huth) --- MAINTAINERS | 1 + tests/qtest/boot-serial-test.c | 2 -- tests/functional/meson.build | 4 +++ tests/functional/test_hppa_seabios.py | 35 +++++++++++++++++++++++++++ tests/qtest/meson.build | 2 +- 5 files changed, 41 insertions(+), 3 deletions(-) create mode 100755 tests/functional/test_hppa_seabios.py diff --git a/MAINTAINERS b/MAINTAINERS index 2101b512175..770bbf9f233 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1203,6 +1203,7 @@ F: include/hw/pci-host/astro.h F: include/hw/pci-host/dino.h F: pc-bios/hppa-firmware.img F: roms/seabios-hppa/ +F: tests/functional/test_hppa_seabios.py LoongArch Machines ------------------ diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 3b92fa5d506..7ea24855072 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -184,8 +184,6 @@ static const testdef_t tests[] = { { "microblazeel", "petalogix-ml605", "", "TT", sizeof(kernel_plml605), kernel_plml605 }, { "arm", "raspi2b", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 }, - /* For hppa, force bios to output to serial by disabling graphics. */ - { "hppa", "hppa", "-vga none", "SeaBIOS wants SYSTEM HALT" }, { "aarch64", "virt", "-cpu max", "TT", sizeof(kernel_aarch64), kernel_aarch64 }, { "arm", "microbit", "", "T", sizeof(kernel_nrf51), kernel_nrf51 }, diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 24f7f8f2f1c..71810a3aa82 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -104,6 +104,10 @@ tests_avr_system_thorough = [ 'avr_mega2560', ] +tests_hppa_system_quick = [ + 'hppa_seabios', +] + tests_i386_system_thorough = [ 'i386_tuxrun', ] diff --git a/tests/functional/test_hppa_seabios.py b/tests/functional/test_hppa_seabios.py new file mode 100755 index 00000000000..a44d1a3eebe --- /dev/null +++ b/tests/functional/test_hppa_seabios.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# +# SeaBIOS boot test for HPPA machines +# +# Copyright (c) 2024 Linaro, Ltd +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern + +class HppaSeabios(QemuSystemTest): + + timeout = 5 + MACH_BITS = {'B160L': 32, 'C3700': 64} + + def boot_seabios(self): + mach = self.machine + bits = self.MACH_BITS[mach] + self.vm.set_console() + self.vm.launch() + self.machine + wait_for_console_pattern(self, f'SeaBIOS PA-RISC {bits}-bit Firmware') + wait_for_console_pattern(self, f'Emulated machine: HP {mach} ({bits}-bit') + + def test_hppa_32(self): + self.set_machine('B160L') + self.boot_seabios() + + def test_hppa_64(self): + self.set_machine('C3700') + self.boot_seabios() + +if __name__ == '__main__': + QemuSystemTest.main() diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index c5a70021c50..ab296a97a78 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -140,7 +140,7 @@ qtests_alpha = ['boot-serial-test'] + \ qtests_avr = [ 'boot-serial-test' ] -qtests_hppa = ['boot-serial-test'] + \ +qtests_hppa = \ qtests_filter + \ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])