From nobody Wed Apr 16 05:33:59 2025 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733480746; cv=none; d=zohomail.com; s=zohoarc; b=EdMGUGEsAaI+XCpdRQTcWyhbOq0d2NQ0YXhTtvb58HrxdB39Ht7IrpENxtFQTsKtbaGfO6yNysEaIpgzDUR3uTkuXc2hTEnBZAY7F4yl5vymgtySJEQymsLi+A2ECDmJisWd3QPXBRrYRJYXTlN+xuFzgcCr71in+sOFfn+73BQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733480746; 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=GOOECmvCu9++h/pqmuDbl8ct5X1Y32mYSr3VFgIxu3I=; b=h1AJ/CSJmJ5zF4vAAUrEn2vzmnScYJ+yqzLXk95iS8ob8/MAX5bjGSsg209LpbtWgZ8KxeKk+ka5AA9eWaZEH600h9KBgI2GCJx6/3i0pRpSOrnsvWTiNT0a5aYfkt07UJhLtZSXDQIaSusWK/Y9Tbk4OM160KeTic40nFstjv0= 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 1733480746917974.7462867923086; Fri, 6 Dec 2024 02:25:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJVVb-0001Op-As; Fri, 06 Dec 2024 05:24: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 1tJVVZ-0001OR-KX for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:25 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJVVW-00047g-AW for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:23 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-90-pObNITcsP1mMRW-OpDO77w-1; Fri, 06 Dec 2024 05:24:14 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 469E119560AB; Fri, 6 Dec 2024 10:24:12 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.66]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 72C05300019E; Fri, 6 Dec 2024 10:24:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733480658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GOOECmvCu9++h/pqmuDbl8ct5X1Y32mYSr3VFgIxu3I=; b=SYceTW0TFN/vtXEnriwmzJfqRXFCokLR12TEDBT+Trikoma//nQ7N2mz/uGn+ZgFTrC4WH iPZDEmWfUXxAhxvTgcjHb5CnU+Rl+tHchqIdr+yXVzy+LOLXKNcKnAIDpO0X6rDeBzZdTK aVMgqSgat71EPb1QOdDRPLj0iXFu9wY= X-MC-Unique: pObNITcsP1mMRW-OpDO77w-1 X-Mimecast-MFC-AGG-ID: pObNITcsP1mMRW-OpDO77w From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: qemu-arm@nongnu.org, Alistair Francis , "Edgar E. Iglesias" , Peter Maydell , Beniamino Galvani , Strahinja Jankovic , Subbaraya Sundeep , Tyrone Ting , Hao Wu , Igor Mitsyanko , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 1/6] tests/functional: Convert the xlnx_versal_virt avocado test Date: Fri, 6 Dec 2024 11:23:51 +0100 Message-ID: <20241206102358.1186644-2-thuth@redhat.com> In-Reply-To: <20241206102358.1186644-1-thuth@redhat.com> References: <20241206102358.1186644-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 @redhat.com) X-ZM-MESSAGEID: 1733480747852116600 Content-Type: text/plain; charset="utf-8" A straight-forward conversion of the xlnx_versal_virt boot test to the functional framework. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 27 -------------- tests/functional/meson.build | 1 + tests/functional/test_aarch64_xlnx_versal.py | 37 ++++++++++++++++++++ 4 files changed, 39 insertions(+), 27 deletions(-) create mode 100755 tests/functional/test_aarch64_xlnx_versal.py diff --git a/MAINTAINERS b/MAINTAINERS index 727f18fae5..86cac83221 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1025,6 +1025,7 @@ F: hw/display/dpcd.c F: include/hw/display/dpcd.h F: docs/system/arm/xlnx-versal-virt.rst F: docs/system/arm/xlnx-zcu102.rst +F: tests/functional/test_aarch64_xlnx_versal.py =20 Xilinx Versal OSPI M: Francisco Iglesias diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 12e24bb05a..44ee50c469 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -116,33 +116,6 @@ def test_x86_64_pc(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_aarch64_xlnx_versal_virt(self): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:xlnx-versal-virt - :avocado: tags=3Ddevice:pl011 - :avocado: tags=3Ddevice:arm_gicv3 - :avocado: tags=3Daccel:tcg - """ - images_url =3D ('http://ports.ubuntu.com/ubuntu-ports/dists/' - 'bionic-updates/main/installer-arm64/' - '20101020ubuntu543.19/images/') - kernel_url =3D images_url + 'netboot/ubuntu-installer/arm64/linux' - kernel_hash =3D 'e167757620640eb26de0972f578741924abb3a82' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - - initrd_url =3D images_url + 'netboot/ubuntu-installer/arm64/initrd= .gz' - initrd_hash =3D 'cab5cb3fcefca8408aa5aae57f24574bfce8bdb9' - initrd_path =3D self.fetch_asset(initrd_url, asset_hash=3Dinitrd_h= ash) - - self.vm.set_console() - self.vm.add_args('-m', '2G', - '-accel', 'tcg', - '-kernel', kernel_path, - '-initrd', initrd_path) - self.vm.launch() - self.wait_for_console_pattern('Checked W+X mappings: passed') - def test_arm_virt(self): """ :avocado: tags=3Darch:arm diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 0558d0aa4e..698fb4976d 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -58,6 +58,7 @@ tests_aarch64_system_thorough =3D [ 'aarch64_sbsaref_freebsd', 'aarch64_tuxrun', 'aarch64_virt', + 'aarch64_xlnx_versal', 'multiprocess', ] =20 diff --git a/tests/functional/test_aarch64_xlnx_versal.py b/tests/functiona= l/test_aarch64_xlnx_versal.py new file mode 100755 index 0000000000..4b9c49e5d6 --- /dev/null +++ b/tests/functional/test_aarch64_xlnx_versal.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset + +class XlnxVersalVirtMachine(LinuxKernelTest): + + ASSET_KERNEL =3D Asset( + ('http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/' + 'installer-arm64/20101020ubuntu543.19/images/netboot/' + 'ubuntu-installer/arm64/linux'), + 'ce54f74ab0b15cfd13d1a293f2d27ffd79d8a85b7bb9bf21093ae9513864ac79') + + ASSET_INITRD =3D Asset( + ('http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/' + 'installer-arm64/20101020ubuntu543.19/images/netboot/' + '/ubuntu-installer/arm64/initrd.gz'), + 'e7a5e716b6f516d8be315c06e7331aaf16994fe4222e0e7cfb34bc015698929e') + + def test_aarch64_xlnx_versal_virt(self): + self.set_machine('xlnx-versal-virt') + kernel_path =3D self.ASSET_KERNEL.fetch() + initrd_path =3D self.ASSET_INITRD.fetch() + + self.vm.set_console() + self.vm.add_args('-m', '2G', + '-accel', 'tcg', + '-kernel', kernel_path, + '-initrd', initrd_path) + self.vm.launch() + self.wait_for_console_pattern('Checked W+X mappings: passed') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.47.1 From nobody Wed Apr 16 05:33:59 2025 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733480756; cv=none; d=zohomail.com; s=zohoarc; b=hLV73+IxQEYbsPN9liCrXZ4IFmMRMzfFIhXwlyHnsRc5901d/8BWNhyrIF8T3rFHYC7cFCz7ZFB8xwQ7P/ruzU4PQ+jNNU/bU+D/ZRXWSvWLrIRjnQ9G6JJfwAm4o4fvI83f+5rSapVqZfK1idVpDlor25kNSkSww2BIaZ9gLCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733480756; 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=YF6PX4GBhgJRow6Z2bw19cW9w6iFe6Y64EiR//jyUVw=; b=VYqS+F62A8sQ1/Rqx2vBNVlaO8HeHmWBUwDp+ltHCNZo5rGJeVpoG5Y/qsyc7Wg3blisSGk0Zn0i6BERnNXUeEKle+uT7Ql6tO+rE3OsManZSLYdktermQbRqcHCAlp+VrtJN3F632xZkqhVCeaIS9GyuFQLV8FxaqeCn1SFLpQ= 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 1733480756093360.0870017720654; Fri, 6 Dec 2024 02:25:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJVVc-0001Ot-PR; Fri, 06 Dec 2024 05:24:28 -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 1tJVVa-0001Og-E0 for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJVVX-00048I-Ew for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:25 -0500 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-59-BDsgWuA6OJuF3oKTNdnTXg-1; Fri, 06 Dec 2024 05:24:19 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9F1A91956066; Fri, 6 Dec 2024 10:24:17 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.66]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BE9753000238; Fri, 6 Dec 2024 10:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733480662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YF6PX4GBhgJRow6Z2bw19cW9w6iFe6Y64EiR//jyUVw=; b=B2ttm9bFBWYpJeW46Xt0JUMWnyk1pwNAv9lvu2Y3E0zDi/j3J0FHzD7plQjMX0Y/7jD42Y Czx/GtMxEwBWoMOMJ1hk78KX9vWIrf3EIiP5bgin5GaTBcCmTuPyPVQ7Ywku4TOMw6+XOc 7v2F/EC4Y9NwtuvvN4tilKDfB0x6qh0= X-MC-Unique: BDsgWuA6OJuF3oKTNdnTXg-1 X-Mimecast-MFC-AGG-ID: BDsgWuA6OJuF3oKTNdnTXg From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: qemu-arm@nongnu.org, Alistair Francis , "Edgar E. Iglesias" , Peter Maydell , Beniamino Galvani , Strahinja Jankovic , Subbaraya Sundeep , Tyrone Ting , Hao Wu , Igor Mitsyanko , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 2/6] tests/functional: Convert the emcraft_sf2 avocado test Date: Fri, 6 Dec 2024 11:23:52 +0100 Message-ID: <20241206102358.1186644-3-thuth@redhat.com> In-Reply-To: <20241206102358.1186644-1-thuth@redhat.com> References: <20241206102358.1186644-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733480757992116600 A pretty straight-forward conversion of the emcraft_sf2 boot test to the functional framework. This was the last test that used file_truncate() in boot_linux_console.py, so we can remove that function from that file now, too. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 44 -------------------- tests/functional/meson.build | 1 + tests/functional/test_arm_emcraft_sf2.py | 52 ++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 44 deletions(-) create mode 100755 tests/functional/test_arm_emcraft_sf2.py diff --git a/MAINTAINERS b/MAINTAINERS index 86cac83221..435a87b146 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1116,6 +1116,7 @@ L: qemu-arm@nongnu.org S: Maintained F: hw/arm/msf2-som.c F: docs/system/arm/emcraft-sf2.rst +F: tests/functional/test_arm_emcraft_sf2.py =20 ASPEED BMCs M: C=C3=A9dric Le Goater diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 44ee50c469..5d5795e41b 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -30,11 +30,6 @@ def pow2ceil(x): return 1 if x =3D=3D 0 else 2**(x - 1).bit_length() =20 -def file_truncate(path, size): - if size !=3D os.path.getsize(path): - with open(path, 'ab+') as fd: - fd.truncate(size) - """ Expand file size to next power of 2 """ @@ -137,45 +132,6 @@ def test_arm_virt(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_arm_emcraft_sf2(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:emcraft-sf2 - :avocado: tags=3Dendian:little - :avocado: tags=3Du-boot - :avocado: tags=3Daccel:tcg - """ - self.require_netdev('user') - - uboot_url =3D ('https://raw.githubusercontent.com/' - 'Subbaraya-Sundeep/qemu-test-binaries/' - 'fe371d32e50ca682391e1e70ab98c2942aeffb01/u-boot') - uboot_hash =3D 'cbb8cbab970f594bf6523b9855be209c08374ae2' - uboot_path =3D self.fetch_asset(uboot_url, asset_hash=3Duboot_hash) - spi_url =3D ('https://raw.githubusercontent.com/' - 'Subbaraya-Sundeep/qemu-test-binaries/' - 'fe371d32e50ca682391e1e70ab98c2942aeffb01/spi.bin') - spi_hash =3D '65523a1835949b6f4553be96dec1b6a38fb05501' - spi_path =3D self.fetch_asset(spi_url, asset_hash=3Dspi_hash) - spi_path_rw =3D os.path.join(self.workdir, os.path.basename(spi_pa= th)) - shutil.copy(spi_path, spi_path_rw) - - file_truncate(spi_path_rw, 16 << 20) # Spansion S25FL128SDPBHICO i= s 16 MiB - - self.vm.set_console() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE - self.vm.add_args('-kernel', uboot_path, - '-append', kernel_command_line, - '-drive', 'file=3D' + spi_path_rw + ',if=3Dmtd,fo= rmat=3Draw', - '-no-reboot') - self.vm.launch() - self.wait_for_console_pattern('Enter \'help\' for a list') - - exec_command_and_wait_for_pattern(self, 'ifconfig eth0 10.0.2.15', - 'eth0: link becomes ready= ') - exec_command_and_wait_for_pattern(self, 'ping -c 3 10.0.2.2', - '3 packets transmitted, 3 packets received, 0% packet loss') - def test_arm_exynos4210_initrd(self): """ :avocado: tags=3Darch:arm diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 698fb4976d..22b50b7fb3 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -75,6 +75,7 @@ tests_arm_system_thorough =3D [ 'arm_bpim2u', 'arm_canona1100', 'arm_collie', + 'arm_emcraft_sf2', 'arm_integratorcp', 'arm_orangepi', 'arm_raspi2', diff --git a/tests/functional/test_arm_emcraft_sf2.py b/tests/functional/te= st_arm_emcraft_sf2.py new file mode 100755 index 0000000000..ada4dfd82e --- /dev/null +++ b/tests/functional/test_arm_emcraft_sf2.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import shutil + +from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern +from qemu_test.utils import file_truncate + +class EmcraftSf2Machine(LinuxKernelTest): + + ASSET_UBOOT =3D Asset( + ('https://raw.githubusercontent.com/Subbaraya-Sundeep/qemu-test-bi= naries/' + 'fe371d32e50ca682391e1e70ab98c2942aeffb01/u-boot'), + '5c6a15103375db11b21f2236473679a9dbbed6d89652bfcdd501c263d68ab725') + + ASSET_SPI =3D Asset( + ('https://raw.githubusercontent.com/Subbaraya-Sundeep/qemu-test-bi= naries/' + 'fe371d32e50ca682391e1e70ab98c2942aeffb01/spi.bin'), + 'cd9bdd2c4cb55a59c3adb6bcf74881667c4500dde0570a43aa3be2b17eecfdb6') + + def test_arm_emcraft_sf2(self): + self.set_machine('emcraft-sf2') + self.require_netdev('user') + + uboot_path =3D self.ASSET_UBOOT.fetch() + spi_path =3D self.ASSET_SPI.fetch() + spi_path_rw =3D os.path.join(self.workdir, 'spi.bin') + shutil.copy(spi_path, spi_path_rw) + os.chmod(spi_path_rw, 0o600) + + file_truncate(spi_path_rw, 16 << 20) # Spansion S25FL128SDPBHICO i= s 16 MiB + + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + self.vm.add_args('-kernel', uboot_path, + '-append', kernel_command_line, + '-drive', 'file=3D' + spi_path_rw + ',if=3Dmtd,fo= rmat=3Draw', + '-no-reboot') + self.vm.launch() + self.wait_for_console_pattern('Enter \'help\' for a list') + + exec_command_and_wait_for_pattern(self, 'ifconfig eth0 10.0.2.15', + 'eth0: link becomes ready= ') + exec_command_and_wait_for_pattern(self, 'ping -c 3 10.0.2.2', + '3 packets transmitted, 3 packets received, 0% packet loss') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.47.1 From nobody Wed Apr 16 05:33:59 2025 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733480725; cv=none; d=zohomail.com; s=zohoarc; b=aQ626xoCA1ol5uZMxYaEA5bGSUf1ToulHBxRBFWG4vx1Fz2vejWZR1cYrj5ugRZ/Tr2HyHdXEwbW5sQCs/Fh2ZMOj9YmeLhUfv6lWzwWDueACO8+5nPkJLL1xpS6jf4ZKylUly2k4HnMfNkRz611Mq5zdO/IP2Q1QR1T9U5xY70= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733480725; 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=uC8g8QFglKDuw2tkL7SpqlLG+vvgnZy77t5eIEjM6i0=; b=ElEGOpw9LoXJxccQxGzsCo/ykGN3xePjm9aB2BHAlNlcuFVSm8eWlVH8wRBCCXv3kCJ6r1izfTr5i2192Tef44D5lLmSBnfIAZMhffXlMeg5hJ+seopFZM6cGRlszhDkp5amjfYNf0I2vgMl9YIUoh3Nw078YKkUoqqtA9DpXKY= 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 1733480725031378.4247126722248; Fri, 6 Dec 2024 02:25:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJVVh-0001Ql-70; Fri, 06 Dec 2024 05:24: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 1tJVVf-0001Pq-2M for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:31 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJVVd-00049M-6b for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:30 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-7LQWefXdN_Of8aQwQp0iMg-1; Fri, 06 Dec 2024 05:24:24 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3D2BA195608C; Fri, 6 Dec 2024 10:24:23 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.66]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 24522300019E; Fri, 6 Dec 2024 10:24:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733480668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uC8g8QFglKDuw2tkL7SpqlLG+vvgnZy77t5eIEjM6i0=; b=XyUmP+bQTrnGW68aMOKB1e0uBytwu1tREbRnMgYkgBUB/6Vt0tiS3xyUK+ykNhkO0f5CX6 LmBte7+d+OP29wvymEq60XQS5vhC2nfU3WOzk46UI9BR+eaid9FaZljJ//2MWWNmp713Lf eBi3dS1qcGS7hPhdFnxGQKVpTSKu9EE= X-MC-Unique: 7LQWefXdN_Of8aQwQp0iMg-1 X-Mimecast-MFC-AGG-ID: 7LQWefXdN_Of8aQwQp0iMg From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: qemu-arm@nongnu.org, Alistair Francis , "Edgar E. Iglesias" , Peter Maydell , Beniamino Galvani , Strahinja Jankovic , Subbaraya Sundeep , Tyrone Ting , Hao Wu , Igor Mitsyanko , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 3/6] tests/functional: Convert the smdkc210 avocado test Date: Fri, 6 Dec 2024 11:23:53 +0100 Message-ID: <20241206102358.1186644-4-thuth@redhat.com> In-Reply-To: <20241206102358.1186644-1-thuth@redhat.com> References: <20241206102358.1186644-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 @redhat.com) X-ZM-MESSAGEID: 1733480725994116600 Content-Type: text/plain; charset="utf-8" A straight forward conversion, just the hashsums needed to be updated to sha256 now. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 41 ------------------- tests/functional/meson.build | 1 + tests/functional/test_arm_smdkc210.py | 57 +++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 41 deletions(-) create mode 100755 tests/functional/test_arm_smdkc210.py diff --git a/MAINTAINERS b/MAINTAINERS index 435a87b146..9b1c3459b4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -720,6 +720,7 @@ S: Odd Fixes F: hw/*/exynos* F: include/hw/*/exynos* F: docs/system/arm/exynos.rst +F: tests/functional/test_arm_smdkc210.py =20 Calxeda Highbank M: Rob Herring diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 5d5795e41b..3250168ccf 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -132,47 +132,6 @@ def test_arm_virt(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_arm_exynos4210_initrd(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:smdkc210 - :avocado: tags=3Daccel:tcg - """ - deb_url =3D ('https://snapshot.debian.org/archive/debian/' - '20190928T224601Z/pool/main/l/linux/' - 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.deb= ') - deb_hash =3D 'fa9df4a0d38936cb50084838f2cb933f570d7d82' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, - '/boot/vmlinuz-4.19.0-6-armmp') - dtb_path =3D '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv= 310.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) - - initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' - '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' - 'arm/rootfs-armv5.cpio.gz') - initrd_hash =3D '2b50f1873e113523967806f4da2afe385462ff9b' - initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_hash) - initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') - archive.gzip_uncompress(initrd_path_gz, initrd_path) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'earlycon=3Dexynos4210,0x13800000 earlyprin= tk ' + - 'console=3DttySAC0,115200n8 ' + - 'random.trust_cpu=3Doff cryptomgr.notests '= + - 'cpuidle.off=3D1 panic=3D-1 noreboot') - - self.vm.add_args('-kernel', kernel_path, - '-dtb', dtb_path, - '-initrd', initrd_path, - '-append', kernel_command_line, - '-no-reboot') - self.vm.launch() - - self.wait_for_console_pattern('Boot successful.') - # TODO user command, for now the uart is stuck - def test_arm_cubieboard_initrd(self): """ :avocado: tags=3Darch:arm diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 22b50b7fb3..905afba4a6 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -79,6 +79,7 @@ tests_arm_system_thorough =3D [ 'arm_integratorcp', 'arm_orangepi', 'arm_raspi2', + 'arm_smdkc210', 'arm_sx1', 'arm_vexpress', 'arm_tuxrun', diff --git a/tests/functional/test_arm_smdkc210.py b/tests/functional/test_= arm_smdkc210.py new file mode 100755 index 0000000000..967752feeb --- /dev/null +++ b/tests/functional/test_arm_smdkc210.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import shutil + +from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern +from qemu_test.utils import gzip_uncompress + +class Smdkc210Machine(LinuxKernelTest): + + ASSET_DEB =3D Asset( + ('https://snapshot.debian.org/archive/debian/20190928T224601Z/pool= /' + 'main/l/linux/linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.= deb'), + '421804e7579ef40d554c962850dbdf1bfc79f7fa7faec9d391397170dc806c3e') + + ASSET_ROOTFS =3D Asset( + ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/arm/' + 'rootfs-armv5.cpio.gz'), + '334b8d256db67a3f2b3ad070aa08b5ade39624e0e7e35b02f4359a577bc8f39b') + + def test_arm_exynos4210_initrd(self): + self.set_machine('smdkc210') + + deb_path =3D self.ASSET_DEB.fetch() + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-4.19.0-6-armmp') + dtb_path =3D '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv= 310.dtb' + dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + + initrd_path_gz =3D self.ASSET_ROOTFS.fetch() + initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') + gzip_uncompress(initrd_path_gz, initrd_path) + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dexynos4210,0x13800000 earlyprin= tk ' + + 'console=3DttySAC0,115200n8 ' + + 'random.trust_cpu=3Doff cryptomgr.notests '= + + 'cpuidle.off=3D1 panic=3D-1 noreboot') + + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + + self.wait_for_console_pattern('Boot successful.') + # TODO user command, for now the uart is stuck + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.47.1 From nobody Wed Apr 16 05:33:59 2025 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733480759; cv=none; d=zohomail.com; s=zohoarc; b=YvF0YqDiVFiUbPOLbwSIPZHyxv1uNySw9+iYFnOk6MG/5RjkqxpnSBv6flixk6b7vOmfh5S8WEpYr0W+/GM3yk7Ik0vcOAsJbWb/UASCKSOVzLMUBD8ZlljVkNIJEiOP0YS295FuL1KglJSSDOJ/PmHQxN2owTdjcehby+oZpXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733480759; 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=s+im4OO3hCjJQgqD3GiQCbQKHWzu0C0Dxbxj7TZu/uQ=; b=EIPzsVEDMOCcjAkqr6rbgHu7E6j1VbX4Dgw9Tfl4z8urBYd49J6onGLGHyvF09iLeruELJxaE5xlTLnCIcWv1i5GNGuZq5akhOtBhRHJ32Xrnzz9uTrazy1HKhYUeBGZdJ2l71UaQBr03XOOoW4iRmc6KkXlScdT995QJHOeyP4= 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 1733480759366479.9657720490617; Fri, 6 Dec 2024 02:25:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJVVl-0001Rh-Cd; Fri, 06 Dec 2024 05:24:37 -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 1tJVVk-0001RQ-C0 for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJVVi-00049v-20 for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:36 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-Gus4826VPUOV6GlZiaQs4w-1; Fri, 06 Dec 2024 05:24:30 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A6E9D1955F39; Fri, 6 Dec 2024 10:24:28 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.66]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C18BF3000238; Fri, 6 Dec 2024 10:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733480673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s+im4OO3hCjJQgqD3GiQCbQKHWzu0C0Dxbxj7TZu/uQ=; b=Rin7AQ4YNiHcIBQl6g6SWbWxM8o/Z00t3Zbz/uTRoJDLqmKKDKnwwE5+Xye230O2g4un25 hJ0+C5a7Yz2nTAJYwRWGoPIHpZRcssnrBTnw2EEDMqHFurrNcqE11/F11XTRvtKpsFlOdS kQRYYjsLbsvgZ71sXQ64YM9jjq7p9uA= X-MC-Unique: Gus4826VPUOV6GlZiaQs4w-1 X-Mimecast-MFC-AGG-ID: Gus4826VPUOV6GlZiaQs4w From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: qemu-arm@nongnu.org, Alistair Francis , "Edgar E. Iglesias" , Peter Maydell , Beniamino Galvani , Strahinja Jankovic , Subbaraya Sundeep , Tyrone Ting , Hao Wu , Igor Mitsyanko , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 4/6] tests/functional: Convert the cubieboard avocado tests Date: Fri, 6 Dec 2024 11:23:54 +0100 Message-ID: <20241206102358.1186644-5-thuth@redhat.com> In-Reply-To: <20241206102358.1186644-1-thuth@redhat.com> References: <20241206102358.1186644-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733480760136116600 Content-Type: text/plain; charset="utf-8" Straight forward conversion, just the hashsums needed to be updated to sha256 now. These were the last tests that used image_pow2ceil_expand in boot_linux_console.py, so we can remove that function from that file now, too. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 157 ------------------------ tests/functional/meson.build | 2 + tests/functional/test_arm_cubieboard.py | 150 ++++++++++++++++++++++ 4 files changed, 153 insertions(+), 157 deletions(-) create mode 100755 tests/functional/test_arm_cubieboard.py diff --git a/MAINTAINERS b/MAINTAINERS index 9b1c3459b4..dc583d5853 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -633,6 +633,7 @@ F: include/hw/*/allwinner* F: hw/arm/cubieboard.c F: docs/system/arm/cubieboard.rst F: hw/misc/axp209.c +F: tests/functional/test_arm_cubieboard.py =20 Allwinner-h3 M: Niek Linnenbank diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 3250168ccf..ea31f154e3 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -24,22 +24,6 @@ from avocado.utils import process from avocado.utils import archive =20 -""" -Round up to next power of 2 -""" -def pow2ceil(x): - return 1 if x =3D=3D 0 else 2**(x - 1).bit_length() - -""" -Expand file size to next power of 2 -""" -def image_pow2ceil_expand(path): - size =3D os.path.getsize(path) - size_aligned =3D pow2ceil(size) - if size !=3D size_aligned: - with open(path, 'ab+') as fd: - fd.truncate(size_aligned) - class LinuxKernelTest(QemuSystemTest): KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' =20 @@ -132,147 +116,6 @@ def test_arm_virt(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_arm_cubieboard_initrd(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:cubieboard - :avocado: tags=3Daccel:tcg - """ - deb_url =3D ('https://apt.armbian.com/pool/main/l/' - 'linux-6.6.16/linux-image-current-sunxi_24.2.1_armhf__6= .6.16-Seb3e-D6b4a-P2359-Ce96bHfe66-HK01ba-V014b-B067e-R448a.deb') - deb_hash =3D 'f7c3c8c5432f765445dc6e7eab02f3bbe668256b' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, - '/boot/vmlinuz-6.6.16-current-= sunxi') - dtb_path =3D '/usr/lib/linux-image-6.6.16-current-sunxi/sun4i-a10-= cubieboard.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) - initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' - '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' - 'arm/rootfs-armv5.cpio.gz') - initrd_hash =3D '2b50f1873e113523967806f4da2afe385462ff9b' - initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_hash) - initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') - archive.gzip_uncompress(initrd_path_gz, initrd_path) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyS0,115200 ' - 'usbcore.nousb ' - 'panic=3D-1 noreboot') - self.vm.add_args('-kernel', kernel_path, - '-dtb', dtb_path, - '-initrd', initrd_path, - '-append', kernel_command_line, - '-no-reboot') - self.vm.launch() - self.wait_for_console_pattern('Boot successful.') - - exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', - 'Allwinner sun4i/sun5i') - exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'system-control@1c00000') - exec_command_and_wait_for_pattern(self, 'reboot', - 'reboot: Restarting system= ') - # Wait for VM to shut down gracefully - self.vm.wait() - - def test_arm_cubieboard_sata(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:cubieboard - :avocado: tags=3Daccel:tcg - """ - deb_url =3D ('https://apt.armbian.com/pool/main/l/' - 'linux-6.6.16/linux-image-current-sunxi_24.2.1_armhf__6= .6.16-Seb3e-D6b4a-P2359-Ce96bHfe66-HK01ba-V014b-B067e-R448a.deb') - deb_hash =3D 'f7c3c8c5432f765445dc6e7eab02f3bbe668256b' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, - '/boot/vmlinuz-6.6.16-current-= sunxi') - dtb_path =3D '/usr/lib/linux-image-6.6.16-current-sunxi/sun4i-a10-= cubieboard.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) - rootfs_url =3D ('https://github.com/groeck/linux-build-test/raw/' - '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' - 'arm/rootfs-armv5.ext2.gz') - rootfs_hash =3D '093e89d2b4d982234bf528bc9fb2f2f17a9d1f93' - rootfs_path_gz =3D self.fetch_asset(rootfs_url, asset_hash=3Drootf= s_hash) - rootfs_path =3D os.path.join(self.workdir, 'rootfs.cpio') - archive.gzip_uncompress(rootfs_path_gz, rootfs_path) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyS0,115200 ' - 'usbcore.nousb ' - 'root=3D/dev/sda ro ' - 'panic=3D-1 noreboot') - self.vm.add_args('-kernel', kernel_path, - '-dtb', dtb_path, - '-drive', 'if=3Dnone,format=3Draw,id=3Ddisk0,file= =3D' - + rootfs_path, - '-device', 'ide-hd,bus=3Dide.0,drive=3Ddisk0', - '-append', kernel_command_line, - '-no-reboot') - self.vm.launch() - self.wait_for_console_pattern('Boot successful.') - - exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', - 'Allwinner sun4i/sun5i') - exec_command_and_wait_for_pattern(self, 'cat /proc/partitions', - 'sda') - exec_command_and_wait_for_pattern(self, 'reboot', - 'reboot: Restarting system= ') - # Wait for VM to shut down gracefully - self.vm.wait() - - @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited= ') - def test_arm_cubieboard_openwrt_22_03_2(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:cubieboard - :avocado: tags=3Ddevice:sd - """ - - # This test download a 7.5 MiB compressed image and expand it - # to 126 MiB. - image_url =3D ('https://downloads.openwrt.org/releases/22.03.2/tar= gets/' - 'sunxi/cortexa8/openwrt-22.03.2-sunxi-cortexa8-' - 'cubietech_a10-cubieboard-ext4-sdcard.img.gz') - image_hash =3D ('94b5ecbfbc0b3b56276e5146b899eafa' - '2ac5dc2d08733d6705af9f144f39f554') - image_path_gz =3D self.fetch_asset(image_url, asset_hash=3Dimage_h= ash, - algorithm=3D'sha256') - image_path =3D archive.extract(image_path_gz, self.workdir) - image_pow2ceil_expand(image_path) - - self.vm.set_console() - self.vm.add_args('-drive', 'file=3D' + image_path + ',if=3Dsd,form= at=3Draw', - '-nic', 'user', - '-no-reboot') - self.vm.launch() - - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'usbcore.nousb ' - 'noreboot') - - self.wait_for_console_pattern('U-Boot SPL') - - interrupt_interactive_console_until_pattern( - self, 'Hit any key to stop autoboot:', '=3D>') - exec_command_and_wait_for_pattern(self, "setenv extraargs '" + - kernel_command_line + "'",= '=3D>') - exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel .= ..'); - - self.wait_for_console_pattern( - 'Please press Enter to activate this console.') - - exec_command_and_wait_for_pattern(self, ' ', 'root@') - - exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', - 'Allwinner sun4i/sun5i') - exec_command_and_wait_for_pattern(self, 'reboot', - 'reboot: Restarting system= ') - # Wait for VM to shut down gracefully - self.vm.wait() - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') def test_arm_quanta_gsj(self): """ diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 905afba4a6..8457b14b37 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -21,6 +21,7 @@ test_timeouts =3D { 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180, + 'arm_cubieboard' : 360, 'arm_orangepi' : 540, 'arm_raspi2' : 120, 'arm_tuxrun' : 240, @@ -75,6 +76,7 @@ tests_arm_system_thorough =3D [ 'arm_bpim2u', 'arm_canona1100', 'arm_collie', + 'arm_cubieboard', 'arm_emcraft_sf2', 'arm_integratorcp', 'arm_orangepi', diff --git a/tests/functional/test_arm_cubieboard.py b/tests/functional/tes= t_arm_cubieboard.py new file mode 100755 index 0000000000..2b33a1b50b --- /dev/null +++ b/tests/functional/test_arm_cubieboard.py @@ -0,0 +1,150 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import shutil + +from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern +from qemu_test import interrupt_interactive_console_until_pattern +from qemu_test.utils import gzip_uncompress, image_pow2ceil_expand +from unittest import skipUnless + +class CubieboardMachine(LinuxKernelTest): + + ASSET_DEB =3D Asset( + ('https://apt.armbian.com/pool/main/l/linux-6.6.16/' + 'linux-image-current-sunxi_24.2.1_armhf__6.6.16-Seb3e-D6b4a-P2359= -Ce96bHfe66-HK01ba-V014b-B067e-R448a.deb'), + '3d968c15b121ede871dce49d13ee7644d6f74b6b121b84c9a40f51b0c80d6d22') + + ASSET_INITRD =3D Asset( + ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' + 'arm/rootfs-armv5.cpio.gz'), + '334b8d256db67a3f2b3ad070aa08b5ade39624e0e7e35b02f4359a577bc8f39b') + + ASSET_SATA_ROOTFS =3D Asset( + ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' + 'arm/rootfs-armv5.ext2.gz'), + '17fc750da568580b39372133051ef2f0a963c0c0b369b845614442d025701745') + + ASSET_OPENWRT =3D Asset( + ('https://downloads.openwrt.org/releases/22.03.2/targets/sunxi/cor= texa8/' + 'openwrt-22.03.2-sunxi-cortexa8-cubietech_a10-cubieboard-ext4-sdc= ard.img.gz'), + '94b5ecbfbc0b3b56276e5146b899eafa2ac5dc2d08733d6705af9f144f39f554') + + def test_arm_cubieboard_initrd(self): + self.set_machine('cubieboard') + deb_path =3D self.ASSET_DEB.fetch() + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-6.6.16-current-= sunxi') + dtb_path =3D '/usr/lib/linux-image-6.6.16-current-sunxi/sun4i-a10-= cubieboard.dtb' + dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + initrd_path_gz =3D self.ASSET_INITRD.fetch() + initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') + gzip_uncompress(initrd_path_gz, initrd_path) + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0,115200 ' + 'usbcore.nousb ' + 'panic=3D-1 noreboot') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + self.wait_for_console_pattern('Boot successful.') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'Allwinner sun4i/sun5i') + exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', + 'system-control@1c00000') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') + # Wait for VM to shut down gracefully + self.vm.wait() + + def test_arm_cubieboard_sata(self): + self.set_machine('cubieboard') + deb_path =3D self.ASSET_DEB.fetch() + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-6.6.16-current-= sunxi') + dtb_path =3D '/usr/lib/linux-image-6.6.16-current-sunxi/sun4i-a10-= cubieboard.dtb' + dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + + rootfs_path_gz =3D self.ASSET_SATA_ROOTFS.fetch() + rootfs_path =3D os.path.join(self.workdir, 'rootfs.cpio') + gzip_uncompress(rootfs_path_gz, rootfs_path) + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0,115200 ' + 'usbcore.nousb ' + 'root=3D/dev/sda ro ' + 'panic=3D-1 noreboot') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-drive', 'if=3Dnone,format=3Draw,id=3Ddisk0,file= =3D' + + rootfs_path, + '-device', 'ide-hd,bus=3Dide.0,drive=3Ddisk0', + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + self.wait_for_console_pattern('Boot successful.') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'Allwinner sun4i/sun5i') + exec_command_and_wait_for_pattern(self, 'cat /proc/partitions', + 'sda') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') + # Wait for VM to shut down gracefully + self.vm.wait() + + @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited= ') + def test_arm_cubieboard_openwrt_22_03_2(self): + # This test download a 7.5 MiB compressed image and expand it + # to 126 MiB. + self.set_machine('cubieboard') + image_path_gz =3D self.ASSET_OPENWRT.fetch() + image_path =3D os.path.join(self.workdir, 'sdcard.img') + gzip_uncompress(image_path_gz, image_path) + image_pow2ceil_expand(image_path) + + self.vm.set_console() + self.vm.add_args('-drive', 'file=3D' + image_path + ',if=3Dsd,form= at=3Draw', + '-nic', 'user', + '-no-reboot') + self.vm.launch() + + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'usbcore.nousb ' + 'noreboot') + + self.wait_for_console_pattern('U-Boot SPL') + + interrupt_interactive_console_until_pattern( + self, 'Hit any key to stop autoboot:', '=3D>') + exec_command_and_wait_for_pattern(self, "setenv extraargs '" + + kernel_command_line + "'",= '=3D>') + exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel .= ..'); + + self.wait_for_console_pattern( + 'Please press Enter to activate this console.') + + exec_command_and_wait_for_pattern(self, ' ', 'root@') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'Allwinner sun4i/sun5i') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') + # Wait for VM to shut down gracefully + self.vm.wait() + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.47.1 From nobody Wed Apr 16 05:34:00 2025 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733480755; cv=none; d=zohomail.com; s=zohoarc; b=MMFS+JmiTZdlZF8JtveaLtT4CuJq8l9dpXiXEmb8MsmDEc4JuudDpJ7Eo37klwynCXdOhKRdnyVHksXhenuZMSpA09hjH94yf0eS14qpmqqeYcAsn2aQt7EMgcTkPoXsKyg0NdYQsUdNdvxDmIge8bjHoffePiHJyGVsK61eeJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733480755; 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=NGlSdVUVdG6wWXKx3osSCH6R4CRYkMVM5MP6idPnZfo=; b=f4XThvr6Y4JsFvEY6X1csHx05VNEosaPPl+WLDHJz356zV/E09NVDvta3RKVwZZEt5jOm7xDbpxuBL479RC7b5J+pcwsUiGVm5N7og4TZjliToAj/gxhdv+G1T58qq/UKf420CYKX1usezlll2WCeip+MTZ2b6JkXBKHkkO8rAg= 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 1733480755677961.6741707972241; Fri, 6 Dec 2024 02:25:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJVVq-0001Sb-6v; Fri, 06 Dec 2024 05:24:42 -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 1tJVVo-0001SS-Op for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJVVm-0004AT-Qh for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:40 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-7kZ15-N3NhSZCYH5V45qqA-1; Fri, 06 Dec 2024 05:24:36 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3F4871956054; Fri, 6 Dec 2024 10:24:34 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.66]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1FDCF300019E; Fri, 6 Dec 2024 10:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733480678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NGlSdVUVdG6wWXKx3osSCH6R4CRYkMVM5MP6idPnZfo=; b=YEMLXZZ6ilXojukCKzRHgG8gED8dW3a3H/Qiazt6E5DJ+DaFqiDGrjoZxfyXNFfVNCIohB uIcVP1Rz9RXhlc3MO2sEd6yHw4B8IUrPsSwN1/ywvqJ7Xa7u0JNU5dZ8ks8O/cnFJsHZBk RblBfokdZ1kiC0t1M9g22fP5uGQ7JsA= X-MC-Unique: 7kZ15-N3NhSZCYH5V45qqA-1 X-Mimecast-MFC-AGG-ID: 7kZ15-N3NhSZCYH5V45qqA From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: qemu-arm@nongnu.org, Alistair Francis , "Edgar E. Iglesias" , Peter Maydell , Beniamino Galvani , Strahinja Jankovic , Subbaraya Sundeep , Tyrone Ting , Hao Wu , Igor Mitsyanko , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 5/6] tests/functional: Convert the quanta-gsj avocado test Date: Fri, 6 Dec 2024 11:23:55 +0100 Message-ID: <20241206102358.1186644-6-thuth@redhat.com> In-Reply-To: <20241206102358.1186644-1-thuth@redhat.com> References: <20241206102358.1186644-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733480758102116600 Content-Type: text/plain; charset="utf-8" Straight forward conversion, basically just the hashsums needed to be updated to sha256 now. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 86 --------------------- tests/functional/meson.build | 2 + tests/functional/test_arm_quanta_gsj.py | 99 +++++++++++++++++++++++++ 4 files changed, 102 insertions(+), 86 deletions(-) create mode 100755 tests/functional/test_arm_quanta_gsj.py diff --git a/MAINTAINERS b/MAINTAINERS index dc583d5853..a62659b330 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -872,6 +872,7 @@ F: tests/qtest/adm1266-test.c F: pc-bios/npcm7xx_bootrom.bin F: roms/vbootrom F: docs/system/arm/nuvoton.rst +F: tests/functional/test_arm_quanta_gsj.py =20 Raspberry Pi M: Peter Maydell diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index ea31f154e3..5bc1c68af9 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -116,92 +116,6 @@ def test_arm_virt(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') - def test_arm_quanta_gsj(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:quanta-gsj - :avocado: tags=3Daccel:tcg - """ - # 25 MiB compressed, 32 MiB uncompressed. - image_url =3D ( - 'https://github.com/hskinnemoen/openbmc/releases/download/' - '20200711-gsj-qemu-0/obmc-phosphor-image-gsj.static.mtd.gz= ') - image_hash =3D '14895e634923345cb5c8776037ff7876df96f6b1' - image_path_gz =3D self.fetch_asset(image_url, asset_hash=3Dimage_h= ash) - image_name =3D 'obmc.mtd' - image_path =3D os.path.join(self.workdir, image_name) - archive.gzip_uncompress(image_path_gz, image_path) - - self.vm.set_console() - drive_args =3D 'file=3D' + image_path + ',if=3Dmtd,bus=3D0,unit=3D= 0' - self.vm.add_args('-drive', drive_args) - self.vm.launch() - - # Disable drivers and services that stall for a long time during b= oot, - # to avoid running past the 90-second timeout. These may be removed - # as the corresponding device support is added. - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + ( - 'console=3D${console} ' - 'mem=3D${mem} ' - 'initcall_blacklist=3Dnpcm_i2c_bus_driver_init ' - 'systemd.mask=3Dsystemd-random-seed.service ' - 'systemd.mask=3Ddropbearkey.service ' - ) - - self.wait_for_console_pattern('> BootBlock by Nuvoton') - self.wait_for_console_pattern('>Device: Poleg BMC NPCM730') - self.wait_for_console_pattern('>Skip DDR init.') - self.wait_for_console_pattern('U-Boot ') - interrupt_interactive_console_until_pattern( - self, 'Hit any key to stop autoboot:', 'U-Boot>') - exec_command_and_wait_for_pattern( - self, "setenv bootargs ${bootargs} " + kernel_command_line, - 'U-Boot>') - exec_command_and_wait_for_pattern( - self, 'run romboot', 'Booting Kernel from flash') - self.wait_for_console_pattern('Booting Linux on physical CPU 0x0') - self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0') - self.wait_for_console_pattern('OpenBMC Project Reference Distro') - self.wait_for_console_pattern('gsj login:') - - def test_arm_quanta_gsj_initrd(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:quanta-gsj - :avocado: tags=3Daccel:tcg - """ - initrd_url =3D ( - 'https://github.com/hskinnemoen/openbmc/releases/download/' - '20200711-gsj-qemu-0/obmc-phosphor-initramfs-gsj.cpio.xz') - initrd_hash =3D '98fefe5d7e56727b1eb17d5c00311b1b5c945300' - initrd_path =3D self.fetch_asset(initrd_url, asset_hash=3Dinitrd_h= ash) - kernel_url =3D ( - 'https://github.com/hskinnemoen/openbmc/releases/download/' - '20200711-gsj-qemu-0/uImage-gsj.bin') - kernel_hash =3D 'fa67b2f141d56d39b3c54305c0e8a899c99eb2c7' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - dtb_url =3D ( - 'https://github.com/hskinnemoen/openbmc/releases/download/' - '20200711-gsj-qemu-0/nuvoton-npcm730-gsj.dtb') - dtb_hash =3D '18315f7006d7b688d8312d5c727eecd819aa36a4' - dtb_path =3D self.fetch_asset(dtb_url, asset_hash=3Ddtb_hash) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyS0,115200n8 ' - 'earlycon=3Duart8250,mmio32,0xf0001000') - self.vm.add_args('-kernel', kernel_path, - '-initrd', initrd_path, - '-dtb', dtb_path, - '-append', kernel_command_line) - self.vm.launch() - - self.wait_for_console_pattern('Booting Linux on physical CPU 0x0') - self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0') - self.wait_for_console_pattern( - 'Give root password for system maintenance') - def test_arm_ast2600_debian(self): """ :avocado: tags=3Darch:arm diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 8457b14b37..c7abda61d2 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -23,6 +23,7 @@ test_timeouts =3D { 'arm_collie' : 180, 'arm_cubieboard' : 360, 'arm_orangepi' : 540, + 'arm_quanta_gsj' : 240, 'arm_raspi2' : 120, 'arm_tuxrun' : 240, 'arm_sx1' : 360, @@ -80,6 +81,7 @@ tests_arm_system_thorough =3D [ 'arm_emcraft_sf2', 'arm_integratorcp', 'arm_orangepi', + 'arm_quanta_gsj', 'arm_raspi2', 'arm_smdkc210', 'arm_sx1', diff --git a/tests/functional/test_arm_quanta_gsj.py b/tests/functional/tes= t_arm_quanta_gsj.py new file mode 100755 index 0000000000..fd921c8c92 --- /dev/null +++ b/tests/functional/test_arm_quanta_gsj.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import shutil + +from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern +from qemu_test import interrupt_interactive_console_until_pattern +from qemu_test.utils import gzip_uncompress +from unittest import skipUnless + +class EmcraftSf2Machine(LinuxKernelTest): + + ASSET_IMAGE =3D Asset( + ('https://github.com/hskinnemoen/openbmc/releases/download/' + '20200711-gsj-qemu-0/obmc-phosphor-image-gsj.static.mtd.gz'), + 'eccd4e375cde53034c84aece5c511932cacf838d9fd3f63da368a511757da72b') + + ASSET_INITRD =3D Asset( + ('https://github.com/hskinnemoen/openbmc/releases/download/' + '20200711-gsj-qemu-0/obmc-phosphor-initramfs-gsj.cpio.xz'), + '37b05009fc54db1434beac12bd7ff99a2e751a2f032ee18d9042f991dd0cdeaa') + + ASSET_KERNEL =3D Asset( + ('https://github.com/hskinnemoen/openbmc/releases/download/' + '20200711-gsj-qemu-0/uImage-gsj.bin'), + 'ce6d6b37bff46c74fc7b1e90da10a431cc37a62cdb35ec199fa73473d0790110') + + ASSET_DTB =3D Asset( + ('https://github.com/hskinnemoen/openbmc/releases/download/' + '20200711-gsj-qemu-0/nuvoton-npcm730-gsj.dtb'), + '3249b2da787d4b9ad4e61f315b160abfceb87b5e1895a7ce898ce7f40c8d4045') + + @skipUnless(os.getenv('QEMU_TEST_TIMEOUT_EXPECTED'), 'Test might timeo= ut') + def test_arm_quanta_gsj(self): + self.set_machine('quanta-gsj') + image_path_gz =3D self.ASSET_IMAGE.fetch() + image_name =3D 'obmc.mtd' + image_path =3D os.path.join(self.workdir, image_name) + gzip_uncompress(image_path_gz, image_path) + + self.vm.set_console() + drive_args =3D 'file=3D' + image_path + ',if=3Dmtd,bus=3D0,unit=3D= 0' + self.vm.add_args('-drive', drive_args) + self.vm.launch() + + # Disable drivers and services that stall for a long time during b= oot, + # to avoid running past the 90-second timeout. These may be removed + # as the corresponding device support is added. + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + ( + 'console=3D${console} ' + 'mem=3D${mem} ' + 'initcall_blacklist=3Dnpcm_i2c_bus_driver_init ' + 'systemd.mask=3Dsystemd-random-seed.service ' + 'systemd.mask=3Ddropbearkey.service ' + ) + + self.wait_for_console_pattern('> BootBlock by Nuvoton') + self.wait_for_console_pattern('>Device: Poleg BMC NPCM730') + self.wait_for_console_pattern('>Skip DDR init.') + self.wait_for_console_pattern('U-Boot ') + interrupt_interactive_console_until_pattern( + self, 'Hit any key to stop autoboot:', 'U-Boot>') + exec_command_and_wait_for_pattern( + self, "setenv bootargs ${bootargs} " + kernel_command_line, + 'U-Boot>') + exec_command_and_wait_for_pattern( + self, 'run romboot', 'Booting Kernel from flash') + self.wait_for_console_pattern('Booting Linux on physical CPU 0x0') + self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0') + self.wait_for_console_pattern('OpenBMC Project Reference Distro') + self.wait_for_console_pattern('gsj login:') + + def test_arm_quanta_gsj_initrd(self): + self.set_machine('quanta-gsj') + initrd_path =3D self.ASSET_INITRD.fetch() + kernel_path =3D self.ASSET_KERNEL.fetch() + dtb_path =3D self.ASSET_DTB.fetch() + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0,115200n8 ' + 'earlycon=3Duart8250,mmio32,0xf0001000') + self.vm.add_args('-kernel', kernel_path, + '-initrd', initrd_path, + '-dtb', dtb_path, + '-append', kernel_command_line) + self.vm.launch() + + self.wait_for_console_pattern('Booting Linux on physical CPU 0x0') + self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0') + self.wait_for_console_pattern( + 'Give root password for system maintenance') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.47.1 From nobody Wed Apr 16 05:34:00 2025 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733480706; cv=none; d=zohomail.com; s=zohoarc; b=eLnmFVJVLKNfMQMTE9voq7/cuUxarW4ceBPGlq2najw6CENOd4Q/ZeZSAxmG+cJ+C4pQXGuuSmNhnMv4fBYSXag+NpAh+pgMie4jDj2o260RpydrGhdZsvBAIQ6xc1gn19l9ntVjc4E1P6Ovn2lKT9dUtSZUtbSKwiwDtQOCST4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733480706; 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=+tFSsaOIj9ywxwE+5dMgKMIsb/GEwbLSEl1YETXlzQw=; b=XN6MDQ83KsqPFvJdXuyBvu1wl6jX4U+4M5sSKvZq4RpOTydbPTjfgtIWmAvROBZjjpGt+mTL8k65p8aGByqsUaFTyZE20d2jrhwsQzsT4NXZEwX+T3fPDXP5o0RrGmTWomZgG0yHuqmVgtpAcplYH4kWuAjnh2Z5W4r+74/Zsec= 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 173348070653333.8475293875; Fri, 6 Dec 2024 02:25:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJVVz-0001UN-4L; Fri, 06 Dec 2024 05:24:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJVVw-0001TX-QP for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJVVv-0004BA-7U for qemu-devel@nongnu.org; Fri, 06 Dec 2024 05:24:48 -0500 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-KRYg1TkOPiisCLDfh4QhVw-1; Fri, 06 Dec 2024 05:24:41 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9BEBA1956087; Fri, 6 Dec 2024 10:24:39 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.66]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EDA92300019E; Fri, 6 Dec 2024 10:24:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733480686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+tFSsaOIj9ywxwE+5dMgKMIsb/GEwbLSEl1YETXlzQw=; b=Z8GGRlkCTO5TqcvfiSNCW54ZswxB7MJUoMqRHN138/cjbuHFjpfPsRsWxpNw+tHhlEovSw aKbSNcEHoxpAt5KD14AeibCQHPJUrQh6BXrV5TYyt9zHVD35ve1yy8gxKkQhpQbgV+tLk+ E6kjRDTBZy8pu+XGNHPDTwO3M35SVI8= X-MC-Unique: KRYg1TkOPiisCLDfh4QhVw-1 X-Mimecast-MFC-AGG-ID: KRYg1TkOPiisCLDfh4QhVw From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: qemu-arm@nongnu.org, Alistair Francis , "Edgar E. Iglesias" , Peter Maydell , Beniamino Galvani , Strahinja Jankovic , Subbaraya Sundeep , Tyrone Ting , Hao Wu , Igor Mitsyanko , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 6/6] tests/functional: Convert the arm virt avocado test Date: Fri, 6 Dec 2024 11:23:56 +0100 Message-ID: <20241206102358.1186644-7-thuth@redhat.com> In-Reply-To: <20241206102358.1186644-1-thuth@redhat.com> References: <20241206102358.1186644-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733480707844116600 Content-Type: text/plain; charset="utf-8" Straight forward conversion, basically just the hashsums needed to be updated to sha256 now. Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 21 -------------------- tests/functional/meson.build | 1 + tests/functional/test_arm_virt.py | 30 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 21 deletions(-) create mode 100755 tests/functional/test_arm_virt.py diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 5bc1c68af9..3bedff0d1f 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -95,27 +95,6 @@ def test_x86_64_pc(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_arm_virt(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:virt - :avocado: tags=3Daccel:tcg - """ - kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/29/Everything/armhfp/os/images/pxeb= oot' - '/vmlinuz') - kernel_hash =3D 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyAMA0') - self.vm.add_args('-kernel', kernel_path, - '-append', kernel_command_line) - self.vm.launch() - console_pattern =3D 'Kernel command line: %s' % kernel_command_line - self.wait_for_console_pattern(console_pattern) - def test_arm_ast2600_debian(self): """ :avocado: tags=3Darch:arm diff --git a/tests/functional/meson.build b/tests/functional/meson.build index c7abda61d2..30c3eda7e4 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -86,6 +86,7 @@ tests_arm_system_thorough =3D [ 'arm_smdkc210', 'arm_sx1', 'arm_vexpress', + 'arm_virt', 'arm_tuxrun', ] =20 diff --git a/tests/functional/test_arm_virt.py b/tests/functional/test_arm_= virt.py new file mode 100755 index 0000000000..7b6549176f --- /dev/null +++ b/tests/functional/test_arm_virt.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset + +class ArmVirtMachine(LinuxKernelTest): + + ASSET_KERNEL =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' + 'releases/29/Everything/armhfp/os/images/pxeboot/vmlinuz'), + '18dd5f1a9a28bd539f9d047f7c0677211bae528e8712b40ca5a229a4ad8e2591') + + def test_arm_virt(self): + self.set_machine('virt') + kernel_path =3D self.ASSET_KERNEL.fetch() + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyAMA0') + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.47.1