From nobody Sun Nov 24 08:37:46 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1724752224; cv=none; d=zohomail.com; s=zohoarc; b=h6ZkYva3cVhY7s2n6tZ93FJWbNO1XzDlHSptR/vDubb9L++n3nSKjGAQfgaVn5Fi9aXOiyCeUEMCmt2XFXsP5VOXeKd0h+m4R/0K0vPGUVYhiLTqFEF5kqYp2/I+btua4DBO6T0YyWUi8ueb40rDaKa7UbCiJFd/GQS9Q/aAphc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724752224; 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=mK1gcEL6ki/5i9onc4ehh9ftnC10AvXevSPtX+HlMCQ=; b=K2ZWsvovJuUS3gj8bi31MFqH+TB8qVJEe0d4r1CJKGtEGy98XDeq3+A22I5SV3FIvHEfyASOmjrsq5vnijOrxAnfjB2HCEDYsi6Wr5I1hUMwJOQje6ddNpkiMZ8PwObUYdahEemXdpAn28MHxJri5ctkxWZmCGYp4YGaLkSHNrY= 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 1724752224018260.55823532684485; Tue, 27 Aug 2024 02:50:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sisps-0002PE-Q1; Tue, 27 Aug 2024 05:50:00 -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 1sispq-0002Oi-47 for qemu-devel@nongnu.org; Tue, 27 Aug 2024 05:49:58 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sispo-0008Bn-1G for qemu-devel@nongnu.org; Tue, 27 Aug 2024 05:49:57 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-5334c018913so5052937e87.0 for ; Tue, 27 Aug 2024 02:49:55 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.45]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a86e548620asm89128166b.8.2024.08.27.02.49.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Aug 2024 02:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724752194; x=1725356994; 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=mK1gcEL6ki/5i9onc4ehh9ftnC10AvXevSPtX+HlMCQ=; b=AmMgfw8fFUiNWfrf95mC+TQcQoKi4HQYtWHbQKlSTWmhnC7VGNnAT9Fay+W4RGbJxw WfBla2OJWrCaCGMgzAHwE0pjdKVsMNyGWNP3PDpNZy/WkWq8nFRQsCPeoVPI33SZYA75 qll3cv67uj98FHYrag0yLsInehjKJDvSsaFiUbd3kNvm7id+pD2qb72/IIfaOX3BL525 UfRzPe03va4+ZW1tQFIYdRnnmBv7thbOjucftvWTdZQEHQLqCwniBTkTXOofdkRgdu1L WDLlQXl59AueuObqUhPTaGRVJChE65n5V409dUnhNQm+ty/d5HJyOjdhvmVZtEukGYMA Ximw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752194; x=1725356994; 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=mK1gcEL6ki/5i9onc4ehh9ftnC10AvXevSPtX+HlMCQ=; b=VMu88k6P3TqGlzk157VmabzQEFMMpTTuhmOY7e7t44C0kcs9L4MOfSn0d9JlnpvGfW Y3ddDM7ClgI08ix5FyHpDEgV9lHlhJevFrE3J+kxxbTnU840vbSo4UZa00sTLdwBJPLh ShrKvWvV9KbPOLw41HxJlLdIuxWRLVOKd/ITngcaAPl7fu2Okbf4wwP+aaOwk3Z5BtAT Ad9BbOAGnHAhkgcq65NJQVhW1BMygsKJmi8MFYoaOnqQ6ZSuuJZQ73raKJ+cpIWEckGL key2PL2yip6u+GVAwGKp7DS8qhTlTv4IMUVAPhRpYgGK7OxzMhkyOYvyHkLvsVC3Zfnw +Mlg== X-Gm-Message-State: AOJu0Yx/2gZz0S6DxTt6/H7BP+hbtC5ZsuJnFd2ExjEOnEJWwaY46jW2 CNVLQX1BvWSYSZtXupJMsBhtKtUhNdc7QPxY475qyQ/od9EbcNN3p11zp3kYl1UuRr4VAeafpiJ R X-Google-Smtp-Source: AGHT+IEx7V/nVsSi+MYnhw6yqVZVybTIVsJk8zn7G69wM4w1kyFi9aNwgEvv2Ww2W4rxZ0SdLsIZ3g== X-Received: by 2002:a05:6512:ea2:b0:52e:9ebe:7325 with SMTP id 2adb3069b0e04-5343883b0ffmr8068059e87.31.1724752193761; Tue, 27 Aug 2024 02:49:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Huacai Chen , Beraldo Leal , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Thomas Huth , Cleber Rosa , Jiaxun Yang , Aurelien Jarno Subject: [PATCH v4 7/7] tests/functional: Convert mips32eb 4Kc Malta avocado tests Date: Tue, 27 Aug 2024 11:49:05 +0200 Message-ID: <20240827094905.80648-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240827094905.80648-1-philmd@linaro.org> References: <20240827094905.80648-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1724752225351116600 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 --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 63 ---------------------- tests/functional/meson.build | 4 ++ tests/functional/test_mips_malta.py | 84 +++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 63 deletions(-) create mode 100755 tests/functional/test_mips_malta.py diff --git a/MAINTAINERS b/MAINTAINERS index 4b480135f6..e2e62afcdc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1368,6 +1368,7 @@ F: hw/mips/malta.c F: hw/pci-host/gt64120.c F: include/hw/southbridge/piix.h F: tests/avocado/linux_ssh_mips_malta.py +F: tests/functional/test_mips_malta.py F: tests/functional/test_mipsel_malta.py F: tests/functional/test_mips64el_malta.py =20 diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 0756e49ded..370beb795a 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -116,69 +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_mips_malta(self): - """ - :avocado: tags=3Darch:mips - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dendian:big - """ - deb_url =3D ('http://snapshot.debian.org/archive/debian/' - '20130217T032700Z/pool/main/l/linux-2.6/' - 'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb') - deb_hash =3D 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04' - 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-4kc-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 - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dendian:big - """ - deb_url =3D ('http://snapshot.debian.org/archive/debian/' - '20160601T041800Z/pool/main/l/linux/' - 'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb') - deb_hash =3D 'a3c84f3e88b54e06107d65a410d1d1e8e0f340f8' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, - '/boot/vmlinux-4.5.0-2-4kc-mal= ta') - initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' - '8584a59ed9e5eb5ee7ca91f6d74bbb06619205b8/rootfs/' - 'mips/rootfs.cpio.gz') - initrd_hash =3D 'bf806e17009360a866bf537f6de66590de349a99' - initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_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() - self.wait_for_console_pattern('Boot successful.') - - exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', - 'BogoMIPS') - exec_command_and_wait_for_pattern(self, 'uname -a', - 'Debian') - exec_command_and_wait_for_pattern(self, 'reboot', - 'reboot: Restarting system= ') - # Wait for VM to shut down gracefully - self.vm.wait() - def test_aarch64_xlnx_versal_virt(self): """ :avocado: tags=3Darch:aarch64 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index f8e482a87c..175e88bb87 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -51,6 +51,10 @@ tests_microblazeel_thorough =3D [ 'microblazeel_s3adsp1800' ] =20 +tests_mips_thorough =3D [ + 'mips_malta', +] + tests_mipsel_thorough =3D [ 'mipsel_malta', ] diff --git a/tests/functional/test_mips_malta.py b/tests/functional/test_mi= ps_malta.py new file mode 100755 index 0000000000..2f26dd5884 --- /dev/null +++ b/tests/functional/test_mips_malta.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +# +# Functional tests for the little-endian 32-bit MIPS Malta board +# +# Copyright (c) Philippe Mathieu-Daud=C3=A9 +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import QemuSystemTest, Asset +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test.linux_kernel import linux_kernel_wait_for_pattern +from qemu_test.linux_kernel import KERNEL_COMMON_COMMAND_LINE +from qemu_test.utils import extract_from_deb +from qemu_test.utils import gzip_uncompress + + +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-4kc-malta_2.6.32-48_mips.deb'), + '16ca524148afb0626f483163e5edf352bc1ab0e4fc7b9f9d473252762f2c7a43') + + def test_mips_malta(self): + 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-4kc-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_4_5_0 =3D Asset( + ('http://snapshot.debian.org/archive/debian/' + '20160601T041800Z/pool/main/l/linux/' + 'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb'), + '526b17d5889840888b76fc2c36a0ebde182c9b1410a3a1e68203c3b160eb2027') + + ASSET_INITRD =3D Asset( + ('https://github.com/groeck/linux-build-test/raw/' + '8584a59ed9e5eb5ee7ca91f6d74bbb06619205b8/rootfs/' + 'mips/rootfs.cpio.gz'), + 'dcfe3a7fe3200da3a00d176b95caaa086495eb158f2bff64afc67d7e1eb2cddc') + + def test_mips_malta_cpio(self): + deb_path =3D self.ASSET_KERNEL_4_5_0.fetch() + kernel_path =3D extract_from_deb(deb_path, self.workdir, + '/boot/vmlinux-4.5.0-2-4kc-malta') + 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.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('-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', + 'BogoMIPS') + exec_command_and_wait_for_pattern(self, 'uname -a', + 'Debian') + 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__': + QemuSystemTest.main() --=20 2.45.2