From patchwork Tue Dec 31 19:06:15 2024 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: 854393 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7064787wrq; Tue, 31 Dec 2024 11:07:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXzZB33i8fwY0Itk6ktjUe+ivFAAVv7RwZH6QmTiox6GFPKxgoFHlCFCoHIS2opBjn/K4Cfdg==@linaro.org X-Google-Smtp-Source: AGHT+IGUpRcWAtW/HeasxOlec+fymcRaZ9mnT6rnx8BMY+LkRsE7LBuPQZHIc2VpFRpilLCoNHSs X-Received: by 2002:a05:620a:2806:b0:7b9:a387:3d03 with SMTP id af79cd13be357-7b9ba7e8065mr4693057985a.39.1735672039538; Tue, 31 Dec 2024 11:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735672039; cv=none; d=google.com; s=arc-20240605; b=hxjyOKhdf91l5+nR5vTydNfi5Ncj/ZyRDgNtgcq+dHOhOjMVmxDoOzNILbNk4ujD+3 UeIPeTH6Mgn61gQbdgJMlnzft5uEYd2RcujC1PAzy+nI6/CQj0kFNc7yxiYuWJvE7UyP QdNRluZCofHzIfoyR3jRWzOa/nG95Qlo1+9dv/Er39mxR4cbXrb6cGxYPxYdVFEb1ZWV y+2j5oOuboy9/AW9727mInkhrVnVEVf30jM/Q0mtDlylqY1j5unayqSx6QHC3zP3HWR1 CEiMvGfUShhX6+GDaPLEnTmddkYlZ9/7F6fHVEmdOQMnXkZ3gkzJRFct+bvd8ViK00UX hhwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i1yo4w5GnlAYj7AYGNPPXlqGurfVbdqR/bxTMgmzr3s=; fh=Pu80oL6pqNVhcxmoTE7CG5kT5lPd7R2XHVDIETOmhNw=; b=HQfeg1led8VRiTplUFqRj/x8RRUZvyQJvGhe5QZKyjzPSYqL8fLyBIrcRb6dz5sUGD E2gNQmgnLkDV6tmYmLMu9Ak4/h1gmjewYSb6l7KkTyN9D8KcmNwUFY7o+y1lQzZNPMkM SZ12hFcod/tFf+NkwnlVjSdNfqzn/wb5JmHninsp94JMBxtNxnUoAVUBDHVVMrzZsw3d 8GqVrsEka7JX+gQGEvBYpfWkHhRTmeV2yr+wBfhXwUIHcGTYWq7xTS8QnxBBpYOeVrRw by6L5fZL5Tz/uRNZaRWJkIsh/u0DoI15nA3SEiiGXfKGQ1CaUY76Oh49YVhDbiSS7sVd qFuA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jCIzmScE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac47a677si3369794685a.297.2024.12.31.11.07.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Dec 2024 11:07:19 -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=jCIzmScE; 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 1tShZZ-0004Hf-NL; Tue, 31 Dec 2024 14:06:33 -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 1tShZX-0004HU-Ft for qemu-devel@nongnu.org; Tue, 31 Dec 2024 14:06:31 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tShZV-000835-VV for qemu-devel@nongnu.org; Tue, 31 Dec 2024 14:06:31 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-388cae9eb9fso5627594f8f.3 for ; Tue, 31 Dec 2024 11:06:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735671988; x=1736276788; 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=i1yo4w5GnlAYj7AYGNPPXlqGurfVbdqR/bxTMgmzr3s=; b=jCIzmScE84tZdOUSl5NUjMpVV2lMfA/nSbuAXYX2EuuV79vHWmsXX73de7Ot1194YH qQVUbmF8WlslCmi8KgmerI1ekVJfIRza8aT4dF6AXff85VBZD6KSSBpziU4/bcYjA4aV rxTbRdrMI+9QkFftKNnKJYYiUpHwH6T1IiMzSd7lWC9tGj9cQjM7rlPLtSGgoOw303Dm lIOFIe/PS7vW44ZFSDHTL34k1ccpewUODDNBpB68Iip3/sdZtoSiN9syg6eHl7iwUQb0 gjf3asowzNoOdZlkbxVSksbj8fdWp7Ze0/kbokD9/T3ef4fsNWNZjRKJS9ka39KxIIFU AuKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735671988; x=1736276788; 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=i1yo4w5GnlAYj7AYGNPPXlqGurfVbdqR/bxTMgmzr3s=; b=v4+2RcX+LAOUw4UpV3l2FvPygHfOsNW3e2jZHOrFZtG+/SIpfCnPAeMai6KvOvFHZ6 WFN6Hi8UlkVTX/g6v9iMz2skN2hDkDCuvoklYYTHWiZU3d49ZYUAx0Vp3NTvaA4Q89mT AseWSk0HMYuBveH+7o7UJXn0MM3MSWYUrV9wBZFwT0GwBgVQRqOKMY3Bx1sLyIaKKwDb +TuMacbum2qPUXlEDuYEocQAkeYZygM7d8rYKil2GF+ppfB5SYsvT26c12WwD20Q4yLQ mf2AykXxEbuFYdHu7sHrS9TtQGQfI9LLkvsQ6CvvXzEyCGzxhVhbtemZ27/tNaVjPqlI V12A== X-Gm-Message-State: AOJu0Yy5lhpytnq3eckHXwDVCVQYdqO+el+z/hsQYkiz5y2FKLFIyb2K 90CqYHC/sXuSR68QJ7YUDMDUcrIFW0z9yiebBENdj81TqxJayJNknGwy1zukeyzvd+nJoaX/63c wXPU= X-Gm-Gg: ASbGncuOoLilX8X+NZ7e6FBneAbQ7CSDCgr5NJIe2qM49EotWKBilKKn+PcoJdoUeMY DJO2kzz1N/Ev1BFv0nlG57nEzjOsXkvKRdfFide3Ubb9P+2NRK+ZbrUWuiDK9s348oKPMQXOevX Jm7tuKq1zOv9gdKCLUda1Af5wQwie+v1f/4Dh2gdBkH691IA/T4f/1yOMS97uTImYlRbBgLeTRk tgrY1txWWzPvQ0FwJnPu9uITQjxy30DC88yEJC4k/P1KieAOlWyfXHu0vxmxQ+RuToo5j6LWkKS FxNVGttJoovEk9JZNJ5r3SJUIgnu6WE= X-Received: by 2002:a05:6000:4025:b0:388:e2a7:74c8 with SMTP id ffacd0b85a97d-38a223ff41dmr35459019f8f.44.1735671987956; Tue, 31 Dec 2024 11:06:27 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c832e53sm33389931f8f.27.2024.12.31.11.06.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 31 Dec 2024 11:06:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Helge Deller , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 1/6] tests: Add functional tests for HPPA machines Date: Tue, 31 Dec 2024 20:06:15 +0100 Message-ID: <20241231190620.24442-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241231190620.24442-1-philmd@linaro.org> References: <20241231190620.24442-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 1/4 qemu:func-quick+func-hppa / func-hppa-empty_cpu_model OK 0.13s 1 subtests passed 2/4 qemu:func-quick+func-hppa / func-hppa-version OK 0.14s 1 subtests passed 3/4 qemu:func-quick+func-hppa / func-hppa-info_usernet OK 0.22s 1 subtests passed 4/4 qemu:func-quick+func-hppa / func-hppa-hppa_seabios OK 0.22s 2 subtests passed Suggested-by: Helge Deller Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Helge Deller Tested-by: Helge Deller --- MAINTAINERS | 1 + tests/functional/meson.build | 4 +++ tests/functional/test_hppa_seabios.py | 35 +++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100755 tests/functional/test_hppa_seabios.py diff --git a/MAINTAINERS b/MAINTAINERS index 38a290e9c2c..17c720dd2b9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1201,6 +1201,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/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()