From nobody Sun Nov 24 07:25:51 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1725646110; cv=none; d=zohomail.com; s=zohoarc; b=htqPeFbMPWF8Gxqo8iTuspd/IKgxqo4lP4kbyH4rxLHB3hk0XMDc52JMwUFV94oAQAxNfBEzB7RY87ufi5FJK1qrXz96tN9oIwaVN8JCyYGiD8f1J+MN8flIApNsDhMu+fWNiMc7H40+W6i6Mub8jUVpL3LoH29d7mS4Ele2FCk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725646110; 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=Bn26CJILuowLlCPHTr9uKb4QTnPB+nTCl2udc+l1qrc=; b=SiacbQaHm7PXwNZF7BMe0NSbIlcNx0QjvNnfWpHtbrpQmyHbYj9tnahcTMJ65KoZ2JVAxVk1vJGZ0tzkA+RA7uLPGeLNPrGa4W6LhDzrIOZ5/kCzZ3MIcjtEH+uV6Qqcd7Ey7Mg6DSYWEE8dS54Nf3Bw3sAQt/jMCpu2aZgs3aE= 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 1725646110855774.3698161750095; Fri, 6 Sep 2024 11:08:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smdLq-0007fu-Un; Fri, 06 Sep 2024 14:06:33 -0400 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 1smdLf-0007W5-Gp for qemu-devel@nongnu.org; Fri, 06 Sep 2024 14:06:19 -0400 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 1smdLd-000535-GH for qemu-devel@nongnu.org; Fri, 06 Sep 2024 14:06:19 -0400 Received: from mx-prod-mc-01.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-526-CHl1qFfANlKSR_S2EzKx6Q-1; Fri, 06 Sep 2024 14:06:12 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3E361196CE1C; Fri, 6 Sep 2024 18:06:11 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.194.70]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 49BFE19560AA; Fri, 6 Sep 2024 18:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725645975; 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=Bn26CJILuowLlCPHTr9uKb4QTnPB+nTCl2udc+l1qrc=; b=E+y5/l5kHCSA9QXvF/Sin+FQNuaLM1WdLJLZ5oYidRcV1ofZkxVpyvAE2zwIyyQBnw299q 6IYsssn26yEB51V0h7WUq2YOsMB/Qdk64KMyqP2rN4DSN1TzqVuYvmmb84MRQIUGavXXo0 A6JP47Jm2tqzA1o3pfpy8+sp2m+Av2c= X-MC-Unique: CHl1qFfANlKSR_S2EzKx6Q-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , "Daniel P . Berrange" Subject: [PATCH 05/14] tests/functional: Convert mips64el 5KEc Malta avocado tests Date: Fri, 6 Sep 2024 20:05:40 +0200 Message-ID: <20240906180549.792832-6-thuth@redhat.com> In-Reply-To: <20240906180549.792832-1-thuth@redhat.com> References: <20240906180549.792832-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.0 on 10.30.177.12 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: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_BTC_ID=0.499, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: 1725646113004116600 From: Philippe Mathieu-Daud=C3=A9 Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240827094905.80648-5-philmd@linaro.org> Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 74 ------------------------ tests/functional/test_mips64el_malta.py | 76 +++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 74 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index e1e20c36f7..84b31cb84e 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -138,38 +138,6 @@ def test_mips_malta(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_mips64el_malta(self): - """ - This test requires the ar tool to extract "data.tar.gz" from - the Debian package. - - The kernel can be rebuilt using this Debian kernel source [1] and - following the instructions on [2]. - - [1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/ - #linux-source-2.6.32_2.6.32-48 - [2] https://kernel-team.pages.debian.net/kernel-handbook/ - ch-common-tasks.html#s-common-official - - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:malta - """ - deb_url =3D ('http://snapshot.debian.org/archive/debian/' - '20130217T032700Z/pool/main/l/linux-2.6/' - 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb') - deb_hash =3D '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, - '/boot/vmlinux-2.6.32-5-5kc-ma= lta') - - self.vm.set_console() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' - 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_mips_malta_cpio(self): """ :avocado: tags=3Darch:mips @@ -211,48 +179,6 @@ def test_mips_malta_cpio(self): # Wait for VM to shut down gracefully self.vm.wait() =20 - @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code= ') - def test_mips64el_malta_5KEc_cpio(self): - """ - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dendian:little - :avocado: tags=3Dcpu:5KEc - """ - kernel_url =3D ('https://github.com/philmd/qemu-testing-blob/' - 'raw/9ad2df38/mips/malta/mips64el/' - 'vmlinux-3.19.3.mtoman.20150408') - kernel_hash =3D '00d1d268fb9f7d8beda1de6bebcc46e884d71754' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - initrd_url =3D ('https://github.com/groeck/linux-build-test/' - 'raw/8584a59e/rootfs/' - 'mipsel64/rootfs.mipsel64r1.cpio.gz') - initrd_hash =3D '1dbb8a396e916847325284dbe2151167' - initrd_path_gz =3D self.fetch_asset(initrd_url, algorithm=3D'md5', - asset_hash=3Dinitrd_hash) - initrd_path =3D 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 console=3Dtty ' - + 'rdinit=3D/sbin/init noreboot') - self.vm.add_args('-kernel', kernel_path, - '-initrd', initrd_path, - '-append', kernel_command_line, - '-no-reboot') - self.vm.launch() - wait_for_console_pattern(self, 'Boot successful.') - - exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', - 'MIPS 5KE') - exec_command_and_wait_for_pattern(self, 'uname -a', - '3.19.3.mtoman.20150408') - exec_command_and_wait_for_pattern(self, 'reboot', - 'reboot: Restarting system= ') - # Wait for VM to shut down gracefully - self.vm.wait() - def do_test_mips_malta32el_nanomips(self, kernel_path_xz): kernel_path =3D self.workdir + "kernel" with lzma.open(kernel_path_xz, 'rb') as f_in: diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/tes= t_mips64el_malta.py index 0c4e9a00ef..1be93d7ff0 100755 --- a/tests/functional/test_mips64el_malta.py +++ b/tests/functional/test_mips64el_malta.py @@ -30,6 +30,82 @@ CV2_AVAILABLE =3D False =20 =20 +class MaltaMachineConsole(QemuSystemTest): + + ASSET_KERNEL_2_63_2 =3D Asset( + ('http://snapshot.debian.org/archive/debian/' + '20130217T032700Z/pool/main/l/linux-2.6/' + 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb'), + '35eb476f03be589824b0310358f1c447d85e645b88cbcd2ac02b97ef560f9f8d') + + def test_mips64el_malta(self): + """ + This test requires the ar tool to extract "data.tar.gz" from + the Debian package. + + The kernel can be rebuilt using this Debian kernel source [1] and + following the instructions on [2]. + + [1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/ + #linux-source-2.6.32_2.6.32-48 + [2] https://kernel-team.pages.debian.net/kernel-handbook/ + ch-common-tasks.html#s-common-official + """ + deb_path =3D self.ASSET_KERNEL_2_63_2.fetch() + kernel_path =3D extract_from_deb(deb_path, self.workdir, + '/boot/vmlinux-2.6.32-5-5kc-malta') + + self.set_machine('malta') + self.vm.set_console() + kernel_command_line =3D KERNEL_COMMON_COMMAND_LINE + 'console=3Dtt= yS0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + linux_kernel_wait_for_pattern(self, console_pattern) + + ASSET_KERNEL_3_19_3 =3D Asset( + ('https://github.com/philmd/qemu-testing-blob/' + 'raw/9ad2df38/mips/malta/mips64el/' + 'vmlinux-3.19.3.mtoman.20150408'), + '8d3beb003bc66051ead98e7172139017fcf9ce2172576541c57e86418dfa5ab8') + + ASSET_CPIO_R1 =3D Asset( + ('https://github.com/groeck/linux-build-test/' + 'raw/8584a59e/rootfs/mipsel64/' + 'rootfs.mipsel64r1.cpio.gz'), + '75ba10cd35fb44e32948eeb26974f061b703c81c4ba2fab1ebcacf1d1bec3b61') + + @skipUnless(os.getenv('QEMU_TEST_ALLOW_UNTRUSTED_CODE'), 'untrusted co= de') + def test_mips64el_malta_5KEc_cpio(self): + kernel_path =3D self.ASSET_KERNEL_3_19_3.fetch() + initrd_path_gz =3D self.ASSET_CPIO_R1.fetch() + initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') + gzip_uncompress(initrd_path_gz, initrd_path) + + self.set_machine('malta') + self.vm.set_console() + kernel_command_line =3D (KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 console=3Dtty ' + + 'rdinit=3D/sbin/init noreboot') + self.vm.add_args('-cpu', '5KEc', + '-kernel', kernel_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + linux_kernel_wait_for_pattern(self, 'Boot successful.') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'MIPS 5KE') + exec_command_and_wait_for_pattern(self, 'uname -a', + '3.19.3.mtoman.20150408') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') + # Wait for VM to shut down gracefully + self.vm.wait() + + @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed') @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed') class MaltaMachineFramebuffer(LinuxKernelTest): --=20 2.46.0