From nobody Sun Nov 24 06:46:06 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=1725971912; cv=none; d=zohomail.com; s=zohoarc; b=leBODYKoSOlvnwRJasaZm6eMgoY71w55NBqJ65LhgJbubtXk1BATDsyQ3x1r0wzgARirPZOEQsCa7WrU78kJmDahIcILzUnxWXqtr8gjHQylS2YAPEA9OL1b0rhhEKBcO6DsaZ6Np8lM/0IOHGHcidjzi7drkAZVg8rpKNLdGoo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971912; 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=Rju49n8Z3Hj8Bn7+6iZDm9Iio+jiWTk7ezdxQvx0KGo=; b=PjKGaRD1RWxFMxBzuM40Xq7iEO60vWveqhhLk7N3/nyO8MkY0Tee1Ype2MZrcsE/TCGdH5pHSKkkVmkx7t7k3FPXsUa7+4DxaIQ5K9JbIMw2305HFLOvT5lBhyE2fdWcjl8Y/850KRUke0CJoTpGdoxal0evIWQZqpp5i0jkV7Y= 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 1725971912238462.22890951530803; Tue, 10 Sep 2024 05:38:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so086-0001sk-R1; Tue, 10 Sep 2024 08:37:58 -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 1so07p-0008F7-Pr for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:43 -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 1so07n-00057q-4w for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:41 -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-486-xcfK1AWbNBSnW5p-0Xnmzw-1; Tue, 10 Sep 2024 08:37:34 -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 64D5C193E8DE; Tue, 10 Sep 2024 12:37:32 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C1C519560AB; Tue, 10 Sep 2024 12:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971855; 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=Rju49n8Z3Hj8Bn7+6iZDm9Iio+jiWTk7ezdxQvx0KGo=; b=jIsArbsU61l1+BVJiMSgjr3TSRKWlREx88Fprk/NDm+A+hRQN+Sx0BjZYNAJ8Vf+iBFvL2 kzP3nCmi0RcgoJIq9jzHX0Vv0SGUkZPEb1x3/TvTofxpov89uRVA4HhlvlGFGtOmtvLqcA NoE9SypfQI3U4wuSBzebD0iuX2tntbk= X-MC-Unique: xcfK1AWbNBSnW5p-0Xnmzw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 01/22] meson: Split --enable-sanitizers to --enable-{asan, ubsan} Date: Tue, 10 Sep 2024 14:37:02 +0200 Message-ID: <20240910123726.182975-2-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-1-thuth@redhat.com> MIME-Version: 1.0 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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1725971912648116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson We do not always want both address and undefined behavior sanitizers running at the same time. For the gitlab custom-runners, drop to only --enable-ubsan. These jobs are not run by default, but as will be obvious in the next patch, we don't run ASan on x86 either, and it seems wrong to hold aarch64 and s390x to a different standard. Signed-off-by: Richard Henderson Reviewed-by: Thomas Huth Message-ID: <20240813095216.306555-2-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- docs/devel/testing/fuzzing.rst | 4 ++-- meson.build | 15 +++++++++++---- tests/qtest/fdc-test.c | 2 +- .../custom-runners/ubuntu-22.04-aarch64.yml | 2 +- .../custom-runners/ubuntu-22.04-s390x.yml | 2 +- meson_options.txt | 6 ++++-- scripts/meson-buildoptions.sh | 9 ++++++--- tests/docker/test-debug | 4 ++-- 8 files changed, 28 insertions(+), 16 deletions(-) diff --git a/docs/devel/testing/fuzzing.rst b/docs/devel/testing/fuzzing.rst index 3bfcb33fc4..dfe1973cf8 100644 --- a/docs/devel/testing/fuzzing.rst +++ b/docs/devel/testing/fuzzing.rst @@ -24,8 +24,8 @@ Configure with (substitute the clang binaries with the ve= rsion you installed). Here, enable-sanitizers, is optional but it allows us to reliably detect b= ugs such as out-of-bounds accesses, use-after-frees, double-frees etc.:: =20 - CC=3Dclang-8 CXX=3Dclang++-8 /path/to/configure --enable-fuzzing \ - --enable-sanitizers + CC=3Dclang-8 CXX=3Dclang++-8 /path/to/configure \ + --enable-fuzzing --enable-asan --enable-ubsan =20 Fuzz targets are built similarly to system targets:: =20 diff --git a/meson.build b/meson.build index fbda17c987..f6b8060b72 100644 --- a/meson.build +++ b/meson.build @@ -479,24 +479,31 @@ if get_option('safe_stack') and coroutine_backend != =3D 'ucontext' error('SafeStack is only supported with the ucontext coroutine backend') endif =20 -if get_option('sanitizers') +if get_option('asan') if cc.has_argument('-fsanitize=3Daddress') qemu_cflags =3D ['-fsanitize=3Daddress'] + qemu_cflags qemu_ldflags =3D ['-fsanitize=3Daddress'] + qemu_ldflags + else + error('Your compiler does not support -fsanitize=3Daddress') endif +endif =20 - # Detect static linking issue with ubsan - https://gcc.gnu.org/bugzilla/= show_bug.cgi?id=3D84285 +if get_option('ubsan') + # Detect static linking issue with ubsan: + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D84285 if cc.links('int main(int argc, char **argv) { return argc + 1; }', args: [qemu_ldflags, '-fsanitize=3Dundefined']) qemu_cflags =3D ['-fsanitize=3Dundefined'] + qemu_cflags qemu_ldflags =3D ['-fsanitize=3Dundefined'] + qemu_ldflags + else + error('Your compiler does not support -fsanitize=3Dundefined') endif endif =20 # Thread sanitizer is, for now, much noisier than the other sanitizers; # keep it separate until that is not the case. if get_option('tsan') - if get_option('sanitizers') + if get_option('asan') or get_option('ubsan') error('TSAN is not supported with other sanitizers') endif if not cc.has_function('__tsan_create_fiber', @@ -2516,7 +2523,7 @@ if rdma.found() endif =20 have_asan_fiber =3D false -if get_option('sanitizers') and \ +if get_option('asan') and \ not cc.has_function('__sanitizer_start_switch_fiber', args: '-fsanitize=3Daddress', prefix: '#include ') diff --git a/tests/qtest/fdc-test.c b/tests/qtest/fdc-test.c index 5e8fbda9df..8645b080f7 100644 --- a/tests/qtest/fdc-test.c +++ b/tests/qtest/fdc-test.c @@ -552,7 +552,7 @@ static bool qtest_check_clang_sanitizer(void) #ifdef QEMU_SANITIZE_ADDRESS return true; #else - g_test_skip("QEMU not configured using --enable-sanitizers"); + g_test_skip("QEMU not configured using --enable-asan"); return false; #endif } diff --git a/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml b/.gitlab= -ci.d/custom-runners/ubuntu-22.04-aarch64.yml index 263a3c2140..ca2f140471 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml @@ -103,7 +103,7 @@ ubuntu-22.04-aarch64-clang: script: - mkdir build - cd build - - ../configure --disable-libssh --cc=3Dclang --cxx=3Dclang++ --enable-san= itizers + - ../configure --disable-libssh --cc=3Dclang --cxx=3Dclang++ --enable-ubs= an || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=3D40` - make --output-sync -j`nproc --ignore=3D40` check diff --git a/.gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml b/.gitlab-c= i.d/custom-runners/ubuntu-22.04-s390x.yml index 69ddd3e7d5..ca374acb8c 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml @@ -80,7 +80,7 @@ ubuntu-22.04-s390x-clang: script: - mkdir build - cd build - - ../configure --cc=3Dclang --cxx=3Dclang++ --enable-sanitizers + - ../configure --cc=3Dclang --cxx=3Dclang++ --enable-ubsan || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check diff --git a/meson_options.txt b/meson_options.txt index 0269fa0f16..98615c3c4e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -91,8 +91,10 @@ option('tcg_interpreter', type: 'boolean', value: false, description: 'TCG with bytecode interpreter (slow)') option('safe_stack', type: 'boolean', value: false, description: 'SafeStack Stack Smash Protection (requires clang/llvm= and coroutine backend ucontext)') -option('sanitizers', type: 'boolean', value: false, - description: 'enable default sanitizers') +option('asan', type: 'boolean', value: false, + description: 'enable address sanitizer') +option('ubsan', type: 'boolean', value: false, + description: 'enable undefined behaviour sanitizer') option('tsan', type: 'boolean', value: false, description: 'enable thread sanitizer') option('stack_protector', type: 'feature', value: 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index c97079a38c..a6ee2d9c01 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -21,6 +21,7 @@ meson_options_help() { printf "%s\n" ' --disable-relocatable toggle relocatable install' printf "%s\n" ' --docdir=3DVALUE Base directory for documenta= tion installation' printf "%s\n" ' (can be empty) [share/doc]' + printf "%s\n" ' --enable-asan enable address sanitizer' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' printf "%s\n" ' use block whitelist also in to= ols instead of only' printf "%s\n" ' QEMU' @@ -46,13 +47,13 @@ meson_options_help() { printf "%s\n" ' getrandom()' printf "%s\n" ' --enable-safe-stack SafeStack Stack Smash Protecti= on (requires' printf "%s\n" ' clang/llvm and coroutine backe= nd ucontext)' - printf "%s\n" ' --enable-sanitizers enable default sanitizers' printf "%s\n" ' --enable-strip Strip targets on install' printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter = (slow)' printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' printf "%s\n" ' --enable-tsan enable thread sanitizer' + printf "%s\n" ' --enable-ubsan enable undefined behaviour san= itizer' printf "%s\n" ' --firmwarepath=3DVALUES search PATH for firmware fil= es [share/qemu-' printf "%s\n" ' firmware]' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' @@ -230,6 +231,8 @@ _meson_option_parse() { --disable-af-xdp) printf "%s" -Daf_xdp=3Ddisabled ;; --enable-alsa) printf "%s" -Dalsa=3Denabled ;; --disable-alsa) printf "%s" -Dalsa=3Ddisabled ;; + --enable-asan) printf "%s" -Dasan=3Dtrue ;; + --disable-asan) printf "%s" -Dasan=3Dfalse ;; --enable-attr) printf "%s" -Dattr=3Denabled ;; --disable-attr) printf "%s" -Dattr=3Ddisabled ;; --audio-drv-list=3D*) quote_sh "-Daudio_drv_list=3D$2" ;; @@ -456,8 +459,6 @@ _meson_option_parse() { --disable-rutabaga-gfx) printf "%s" -Drutabaga_gfx=3Ddisabled ;; --enable-safe-stack) printf "%s" -Dsafe_stack=3Dtrue ;; --disable-safe-stack) printf "%s" -Dsafe_stack=3Dfalse ;; - --enable-sanitizers) printf "%s" -Dsanitizers=3Dtrue ;; - --disable-sanitizers) printf "%s" -Dsanitizers=3Dfalse ;; --enable-sdl) printf "%s" -Dsdl=3Denabled ;; --disable-sdl) printf "%s" -Dsdl=3Ddisabled ;; --enable-sdl-image) printf "%s" -Dsdl_image=3Denabled ;; @@ -505,6 +506,8 @@ _meson_option_parse() { --disable-u2f) printf "%s" -Du2f=3Ddisabled ;; --enable-uadk) printf "%s" -Duadk=3Denabled ;; --disable-uadk) printf "%s" -Duadk=3Ddisabled ;; + --enable-ubsan) printf "%s" -Dubsan=3Dtrue ;; + --disable-ubsan) printf "%s" -Dubsan=3Dfalse ;; --enable-usb-redir) printf "%s" -Dusb_redir=3Denabled ;; --disable-usb-redir) printf "%s" -Dusb_redir=3Ddisabled ;; --enable-vde) printf "%s" -Dvde=3Denabled ;; diff --git a/tests/docker/test-debug b/tests/docker/test-debug index f52f16328c..678ceccc27 100755 --- a/tests/docker/test-debug +++ b/tests/docker/test-debug @@ -1,6 +1,6 @@ #!/bin/bash -e # -# Compile and check with clang & --enable-debug --enable-sanitizers. +# Compile and check with clang & debug & sanitizers # # Copyright (c) 2016-2018 Red Hat Inc. # @@ -19,7 +19,7 @@ requires_binary clang cd "$BUILD_DIR" =20 OPTS=3D"--cxx=3Dclang++ --cc=3Dclang --host-cc=3Dclang" -OPTS=3D"--enable-debug --enable-sanitizers $OPTS" +OPTS=3D"--enable-debug --enable-asan --enable-ubsan $OPTS" =20 export ASAN_OPTIONS=3Ddetect_leaks=3D0 build_qemu $OPTS --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972116; cv=none; d=zohomail.com; s=zohoarc; b=cRP2JGD6Td5dtirB+QIXxrFhxCecKJUF/sEZkfYIGCP/rWFrVeg21lZ1TzPy+dEfr9o0SBWF0Qd8diVPN6Tix1VliuV3352570GOUyujw8n0rR+gS/1YLMolekuERJ9zVy8jqgh3dU/z5PDp+W2noBJ+kOGeFhIv6Jh4lteqr1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972116; 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=eZJnuK2h81KcY66kd08hYy3F+YH70C9Bsh4bBdmoAuQ=; b=lRTQxstNquhG0GAgojciIo5X3qfjD1LFRf5Pa2r0g0jCLrwy8Wgt/Ux/0BNqFDNMiKHRJiJI8+0xsCPt945R2v7hnmjHTEg81QvJdYWDj3hHUvs1vZr9GZxjVmGADLyqZfeo7Wp1yKAvkXYDmsSbXYiNA8iZhtbBod2xc8H+0Gk= 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 1725972116953920.4673941036834; Tue, 10 Sep 2024 05:41:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so084-0001RU-FQ; Tue, 10 Sep 2024 08:37:56 -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 1so07r-0008K0-0r for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:43 -0400 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 1so07n-000581-PD for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:42 -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-275-t_yedJesOGejhof5mDoQLg-1; Tue, 10 Sep 2024 08:37:35 -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 3B9F6193E8CE; Tue, 10 Sep 2024 12:37:34 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D640119560B0; Tue, 10 Sep 2024 12:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971857; 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=eZJnuK2h81KcY66kd08hYy3F+YH70C9Bsh4bBdmoAuQ=; b=dUbgZm3hfijWgJHEyI9dvMHyr/6uYcpPVoFV6E4x2Ym1VBnlvZBAr+wND/ToN41s7J8y1H b/cxW0CS6s5hqQlzbwKAj79B8T4mR4GsztPluF1sR/nDVfm4V/vvftkrN5sCw54Wm0UVML gSQ9Pyky5gNJHmfjuagrHGMLw133M5w= X-MC-Unique: t_yedJesOGejhof5mDoQLg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 02/22] meson: Move -fsanitize=undefined into normal configuraton Date: Tue, 10 Sep 2024 14:37:03 +0200 Message-ID: <20240910123726.182975-3-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-1-thuth@redhat.com> MIME-Version: 1.0 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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725972117552116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson With 8e466dd09246 and 23ef50ae2d0c, we disable function pointer sanitization in CI because the qemu code base does not support it. We must disable this for normal usage of --enable-ubsan as well, so move it there. Append options rather than prepend, since all of this requires proper ordering of options. Signed-off-by: Richard Henderson Reviewed-by: Thomas Huth Message-ID: <20240813095216.306555-3-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- meson.build | 11 +++++++++-- .gitlab-ci.d/buildtest.yml | 10 ++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index f6b8060b72..4701ee3aab 100644 --- a/meson.build +++ b/meson.build @@ -493,8 +493,15 @@ if get_option('ubsan') # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D84285 if cc.links('int main(int argc, char **argv) { return argc + 1; }', args: [qemu_ldflags, '-fsanitize=3Dundefined']) - qemu_cflags =3D ['-fsanitize=3Dundefined'] + qemu_cflags - qemu_ldflags =3D ['-fsanitize=3Dundefined'] + qemu_ldflags + qemu_cflags +=3D ['-fsanitize=3Dundefined'] + qemu_ldflags +=3D ['-fsanitize=3Dundefined'] + + # Suppress undefined behaviour from function call to mismatched type. + # In addition, tcg prologue does not emit function type prefix + # required by function call sanitizer. + if cc.has_argument('-fno-sanitize=3Dfunction') + qemu_cflags +=3D ['-fno-sanitize=3Dfunction'] + endif else error('Your compiler does not support -fsanitize=3Dundefined') endif diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 1d2afae996..9ac0776b94 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -428,9 +428,8 @@ clang-system: job: amd64-fedora-container variables: IMAGE: fedora - CONFIGURE_ARGS: --cc=3Dclang --cxx=3Dclang++ - --extra-cflags=3D-fsanitize=3Dundefined --extra-cflags=3D-fno-saniti= ze-recover=3Dundefined - --extra-cflags=3D-fno-sanitize=3Dfunction + CONFIGURE_ARGS: --cc=3Dclang --cxx=3Dclang++ --enable-ubsan + --extra-cflags=3D-fno-sanitize-recover=3Dundefined TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-s= oftmmu MAKE_CHECK_ARGS: check-qtest check-tcg =20 @@ -441,10 +440,9 @@ clang-user: timeout: 70m variables: IMAGE: debian-all-test-cross - CONFIGURE_ARGS: --cc=3Dclang --cxx=3Dclang++ --disable-system + CONFIGURE_ARGS: --cc=3Dclang --cxx=3Dclang++ --disable-system --enable= -ubsan --target-list-exclude=3Dalpha-linux-user,microblazeel-linux-user,aar= ch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xte= nsaeb-linux-user - --extra-cflags=3D-fsanitize=3Dundefined --extra-cflags=3D-fno-saniti= ze-recover=3Dundefined - --extra-cflags=3D-fno-sanitize=3Dfunction + --extra-cflags=3D-fno-sanitize-recover=3Dundefined MAKE_CHECK_ARGS: check-unit check-tcg =20 # Set LD_JOBS=3D1 because this requires LTO and ld consumes a large amount= of memory. --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725971985; cv=none; d=zohomail.com; s=zohoarc; b=GzRd37HTx9xyEodvkhAMAY28HbYbKAKWvQUZHo2PoqPWGYb23Rizx5Gm0WfMW1urBYWm9NIe1hV4KY+V9S3mwyIKAOSHEG6I2bTjXOw7tsAPo4K6wSxogH08NFVSehNEHVs+tKFNUPyXYHBTgdv7FdeQLmYIr8jJXJlIGj+G2HE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971985; 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=8Brn6cLGnhTP1KmrwwsRzuR+4YftSsDFHM3QZUWTvPE=; b=UI/GemilpTxSknVS4oQMxVJLl8+bkLcfgNMYxDW7n5oDZU6smtCTjlCr6UCPHkgVGGan0tvgzAGV+psZPFsarGCrapyPpU9MXP4gpH/6eqCtm50F2dZn0x6sa84v9sxfzupIV9LylpRyQ4OanLVRILN/Dl2l4a2KkmID0rT/t8k= 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 1725971985085195.6699421588354; Tue, 10 Sep 2024 05:39:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so081-000182-Ae; Tue, 10 Sep 2024 08:37:53 -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 1so07r-0008L6-AA for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:43 -0400 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 1so07p-00058F-Ng for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:43 -0400 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-427-wG5j9D-ZMniL_lZeiOz8VQ-1; Tue, 10 Sep 2024 08:37:37 -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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7ED4A1954B35; Tue, 10 Sep 2024 12:37:36 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E9D0919560AB; Tue, 10 Sep 2024 12:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971861; 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=8Brn6cLGnhTP1KmrwwsRzuR+4YftSsDFHM3QZUWTvPE=; b=gO1sVM87XWXgGimkUNmelEKcOLGxNv72pT6mEifU/0CC266pAuL2c5n4qQL5iJ9w9WXguj S0GTvUiTOtDmFb2FOoFmo5AXVVn5iHklmnMXjc0B3A0Q4FKiiyxpEGieP9fgdRy+tIYo9+ Efw4VSVI1KEQYpHYt7GKQsGprTThC40= X-MC-Unique: wG5j9D-ZMniL_lZeiOz8VQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 03/22] gitlab-ci: Build MSYS2 job using multiple CPUs Date: Tue, 10 Sep 2024 14:37:04 +0200 Message-ID: <20240910123726.182975-4-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725971987287116600 From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240819112141.13786-1-philmd@linaro.org> Signed-off-by: Thomas Huth --- .gitlab-ci.d/windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index 759e9a76b5..45ed0c96fe 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -88,6 +88,7 @@ msys2-64bit: mingw-w64-x86_64-python mingw-w64-x86_64-zstd" - Write-Output "Running build at $(Get-Date -Format u)" + - $env:JOBS =3D $(.\msys64\usr\bin\bash -lc nproc) - $env:CHERE_INVOKING =3D 'yes' # Preserve the current working directory - $env:MSYS =3D 'winsymlinks:native' # Enable native Windows symlink - $env:CCACHE_BASEDIR =3D "$env:CI_PROJECT_DIR" @@ -99,7 +100,7 @@ msys2-64bit: - cd build - ..\msys64\usr\bin\bash -lc "ccache --zero-stats" - ..\msys64\usr\bin\bash -lc "../configure $CONFIGURE_ARGS" - - ..\msys64\usr\bin\bash -lc "make" + - ..\msys64\usr\bin\bash -lc "make -j$env:JOBS" - ..\msys64\usr\bin\bash -lc "make check MTESTARGS=3D'$TEST_ARGS' || { c= at meson-logs/testlog.txt; exit 1; } ;" - ..\msys64\usr\bin\bash -lc "ccache --show-stats" - Write-Output "Finished build at $(Get-Date -Format u)" --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972041; cv=none; d=zohomail.com; s=zohoarc; b=c6CIIs7lgO1pOGnEa6afHu4vT6bjHPk+V+8e4huuWG6POQuZG4Qw+lhVl+Uh4OW8xQN8uPXPg5LATEGUAv6SnuTqz/b/4XkTYh7PMzoPkAUYe5tAkCqu7GqkA7PIEoKSZE0mvM8KalcnfVfjs3/NpZef+IJEWM/ph6od5IUVnpg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972041; 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=L7dFCKyGUkYu28b1nzEqtDF+fluqptoQqN4JKvtUwwU=; b=Hh5e8V0+IkSDZJgnTACleRVOHB2vI3aEaxJSfCZhQ0Jj4W9AmNHD0QMxJSFuitkiqKFZeHQwa2NJv0LROiShSoBdNeyKXhaAPxVQCFhIYIfbs2lPtTMfrlEW8g7HKhKX6F1YQRSRca4ki1Jtgodai/KY+S2o01+d5+jupBVQ28A= 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 1725972041827252.59991700148544; Tue, 10 Sep 2024 05:40:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so081-0001F6-UL; Tue, 10 Sep 2024 08:37:54 -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 1so07x-0000gV-Vv for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:50 -0400 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 1so07u-00058w-JK for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:48 -0400 Received: from mx-prod-mc-04.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-277-TG7eMdXUMOuXl7-Cx79GiA-1; Tue, 10 Sep 2024 08:37:41 -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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 32AC6193586F; Tue, 10 Sep 2024 12:37:39 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 63B8319560AB; Tue, 10 Sep 2024 12:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971863; 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=L7dFCKyGUkYu28b1nzEqtDF+fluqptoQqN4JKvtUwwU=; b=BAIFSy8bsRE26a3UQh0/9OOlJYXcnjn80PkwK37+Dli08kn9fNMOPR84cIMz3fWgpkxp54 5K9bgsX+qM5KjJbFrogRyYo6U4+SvgnODIjzyrqMSgjTF5Brb3dC+SX/Y3NTwoib60Kzzt ey+xmyfixWAHc4Y8oldvA3zUMQi9yjw= X-MC-Unique: TG7eMdXUMOuXl7-Cx79GiA-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 04/22] contrib/plugins/Makefile: Add a 'distclean' target Date: Tue, 10 Sep 2024 14:37:05 +0200 Message-ID: <20240910123726.182975-5-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-1-thuth@redhat.com> MIME-Version: 1.0 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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725972043221116600 Content-Type: text/plain; charset="utf-8" Running "make distclean" in the build tree currently fails since this tries to run the "distclean" target in the contrib/plugins/ folder, too, but the Makefile there is missing this target. Thus add 'distclean' there to fix this issue. And to avoid regressions with "make distclean", add this command to one of the build jobs, too. Message-ID: <20240902154749.73876-1-thuth@redhat.com> Reviewed-by: Pierrick Bouvier Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest.yml | 2 ++ contrib/plugins/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 9ac0776b94..98bac9e2c8 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -345,6 +345,8 @@ build-tcg-disabled: 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202 208 209 216 218 227 234 246 247 248 250 254 255 257 258 260 261 262 263 264 270 272 273 277 279 image-fleecing + - cd ../.. + - make distclean =20 build-user: extends: .native_build_job_template diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index edf256cd9d..05a2a45c5c 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -77,7 +77,7 @@ lib%$(SO_SUFFIX): %.o endif =20 =20 -clean: +clean distclean: rm -f *.o *$(SO_SUFFIX) *.d rm -Rf .libs =20 --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725971986; cv=none; d=zohomail.com; s=zohoarc; b=MWDVU56/z43GQBohu8my8xnpw5gJJCr5AdMj39aljXAVnM/lk07oBm1Yhr7QEw6WMkgFgAOHLxr9O9w7xrfEK5B2aI9dT3QVHW6/lHbVAnaH4hLTIiyxVq2+AlF+txBq3TyzcF6eKhmxJN/S+Ipb3RqP5gqulXab17JKiJTez00= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971986; 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=pmpaivHbf7hge/u0xUgdrifftfz3/LCQC9ueCThj/9I=; b=i6/rPMiNf6gGTVZmBVdesSkjJw1cgbVNcB5J8GlFer+1tbQj06JNbPp4BaAQHDhV4cPIYAD0lPcPB2B8nm57m948LytS54pB3qKFPxKulUx+kCM10WMPc5Ry5acoeOxHI6DLjcDGJCaSeDs6EDhSaRF8bLjsNC8ireMrSd0VAfY= 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 1725971986513699.8337361666249; Tue, 10 Sep 2024 05:39:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08J-0002sz-Ph; Tue, 10 Sep 2024 08:38:11 -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 1so080-00014a-GC for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:53 -0400 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 1so07w-000599-Pa for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:52 -0400 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-155-e5cWQGy6MQqL9O1HG-0a1g-1; Tue, 10 Sep 2024 08:37:41 -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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EBD391945CB7; Tue, 10 Sep 2024 12:37:40 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 856D619560AD; Tue, 10 Sep 2024 12:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971867; 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=pmpaivHbf7hge/u0xUgdrifftfz3/LCQC9ueCThj/9I=; b=JxjAr/S+JUSF8d26H9uMvUwWVA4aHxnhLxu7HsLr0Km8bQzJrH6NNGeiq7m4ydZtQuHrp8 OF5Y8Sw3gB68JF5PK0UV4NiiU3uc886iNyJWAUIs0gMiTcatD/bHK7s5t+XNxoKXj/WWff fOW0n7IYBdYTfX1GxbqL5oDAGiZ+Qow= X-MC-Unique: e5cWQGy6MQqL9O1HG-0a1g-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 05/22] MAINTAINERS: Remove myself as reviewer Date: Tue, 10 Sep 2024 14:37:06 +0200 Message-ID: <20240910123726.182975-6-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725971987325116600 From: Beraldo Leal Finally taking this off my to-do list. It=E2=80=99s been a privilege to be = part of this project, but I am no longer actively involved in reviewing Python code here, so I believe it's best to update the list to reflect the current maintainers. Please, feel free to reach out if any questions arise. Signed-off-by: Beraldo Leal Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240819150035.2180786-1-bleal@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0c1bc69828..8c7358fd5b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3188,7 +3188,6 @@ F: qapi/cryptodev.json Python library M: John Snow M: Cleber Rosa -R: Beraldo Leal S: Maintained F: python/ T: git https://gitlab.com/jsnow/qemu.git python @@ -4135,7 +4134,6 @@ M: Alex Benn=C3=A9e M: Philippe Mathieu-Daud=C3=A9 M: Thomas Huth R: Wainer dos Santos Moschetta -R: Beraldo Leal S: Maintained F: .github/workflows/lockdown.yml F: .gitlab-ci.yml @@ -4181,7 +4179,6 @@ W: https://trello.com/b/6Qi1pxVn/avocado-qemu R: Cleber Rosa R: Philippe Mathieu-Daud=C3=A9 R: Wainer dos Santos Moschetta -R: Beraldo Leal S: Odd Fixes F: tests/avocado/ =20 --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972006; cv=none; d=zohomail.com; s=zohoarc; b=mpGp5A0s2+sdgrf8pdxceTE4/KFUdLsiusTwoivauduFqJVUMhgI/sLcusw9aM95MqbZ/VKG5srowAjCmFpmJFDBROkmPs5K+DZDHroCojE/5oqsiLuhMbTzxoC3ON7ezwklMV7xPRwJjKuq5zy1dieBUnQiVO+RGgYhhZBg7gE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972006; 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=iIrIpJ8xCoVDhGsbI9RKUFy3uodlqvlFIf6MPCWaw0g=; b=TxznT2ETOsRifQfPe77A2pMocG5QTyDTiEn1/0XpKw1lMhlsw91IyZyzbewm3e+OY8MsoZpdqT5aOmZr9CL9sth+dTq2GMjY4qQK9hCuuXccqRqvPOTAMg+VFxFMn4shxDoaKgMt+d1jFuKlOygK8JhPdgNjdR4CVpGbSMhLuto= 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 1725972005984702.2375089209286; Tue, 10 Sep 2024 05:40:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08J-0002RL-Bm; Tue, 10 Sep 2024 08:38:11 -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 1so083-0001UF-Dj for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:55 -0400 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 1so07x-000598-Pp for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:54 -0400 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-199-dwIJqaKuNDKnCT88LFDLzQ-1; Tue, 10 Sep 2024 08:37:43 -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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8BC4119560B1; Tue, 10 Sep 2024 12:37:42 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4D9C919560AB; Tue, 10 Sep 2024 12:37:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971867; 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=iIrIpJ8xCoVDhGsbI9RKUFy3uodlqvlFIf6MPCWaw0g=; b=NMhDmVSsTQY/oF4o08yDpWvuyL9w0BmsipS/gnuAHsIwgLqHGjXY5t6TewcFquiScIxnJp s7qzKyOLjEUwd+o40pHwjPAWQpR8qPW4WJCSr95K/SB76lWB89URIi3XJwhI4SqpIr6AFt HZSCNHndtz2s3HYpWfqZBzoNrfP1Qx4= X-MC-Unique: dwIJqaKuNDKnCT88LFDLzQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 06/22] MAINTAINERS: Remove myself from the Meson section Date: Tue, 10 Sep 2024 14:37:07 +0200 Message-ID: <20240910123726.182975-7-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725972007092116600 The Meson section has plenty of reviewers, and in order to reduce the load on my Inbox a little bit, I'm stepping back as a reviewer here. Message-ID: <20240906155900.742157-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8c7358fd5b..822f89847b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4212,7 +4212,6 @@ Meson M: Paolo Bonzini R: Marc-Andr=C3=A9 Lureau R: Daniel P. Berrange -R: Thomas Huth R: Philippe Mathieu-Daud=C3=A9 S: Maintained F: meson.build --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972149; cv=none; d=zohomail.com; s=zohoarc; b=jOshoV1Zxh/75+t5tV/cEhMecY9uQkwdhCGKupLN0deYcwji67QGVCvZeJr0D+d+cC0KBfbCnVJmArN/5woqDRVJ0xSut/OtGy+/Fu1ehUTjr5HblDUra3CwGRPmDDod7ceRvYmkDPs8CHgiq8njqJcWrmroKFm13Qozsf8phgc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972149; 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=RtRLAuvqf+JeUxfTMm7H0IZIsVPZvbApHU6YhP9jrU0=; b=ITiGaTUMd6S6y3oLllgLd7QO6Q82j2NcZdFfMhiVUVU9t1U2ilkGNxK7Nh6p3/CdillT7jVX9hlAlCt+W0yllX7VQFKlH5QqXl7voYqJOrGUU8uqXR6RoGgy8PyLgJ2MOqExvh8XbDEBF7jggmN/Orrzv9HeGgfMKBt5SUcU7pI= 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 1725972149443625.7469736038151; Tue, 10 Sep 2024 05:42:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08R-0003fB-Qr; Tue, 10 Sep 2024 08:38:19 -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 1so08B-0002II-5K for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:05 -0400 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 1so084-00059U-6u for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:02 -0400 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-447-zyQliyLZPR23YntrdvbUhQ-1; Tue, 10 Sep 2024 08:37:46 -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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A368A1944DDE; Tue, 10 Sep 2024 12:37:44 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4012B19560AB; Tue, 10 Sep 2024 12:37:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971869; 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=RtRLAuvqf+JeUxfTMm7H0IZIsVPZvbApHU6YhP9jrU0=; b=i5hoUJZQEjmFZpCEbWibVGDOMtPecNSYBQ8Lmlwt5oqoxtvqdJmQjofgN/A+PsvJpLHjFq 4Y5r2ElcqYwNe8WR7L036ucsgCi1D2YA5RZ43KSapIiCg4UP3WfhBjsDRQAOU/Pxt+LqqO R+byrbv19mFKjYoVrRcJFyXZepzGWV8= X-MC-Unique: zyQliyLZPR23YntrdvbUhQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 07/22] tests/functional: Add the LinuxKernelTest for testing the Linux boot process Date: Tue, 10 Sep 2024 14:37:08 +0200 Message-ID: <20240910123726.182975-8-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725972149666116600 Copy the LinuxKernelTest from tests/acceptance/boot_linux_console.py to be able to convert the related tests to the functional test framework in the following patches. Message-ID: <20240906180549.792832-2-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 1 + tests/functional/qemu_test/linuxkernel.py | 41 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 tests/functional/qemu_test/linuxkernel.py diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu= _test/__init__.py index f33282efe8..67f87be9c4 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -12,3 +12,4 @@ interrupt_interactive_console_until_pattern, wait_for_console_pattern,= \ exec_command, exec_command_and_wait_for_pattern, get_qemu_img from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest +from .linuxkernel import LinuxKernelTest diff --git a/tests/functional/qemu_test/linuxkernel.py b/tests/functional/q= emu_test/linuxkernel.py new file mode 100644 index 0000000000..fdd5307629 --- /dev/null +++ b/tests/functional/qemu_test/linuxkernel.py @@ -0,0 +1,41 @@ +# Test class for testing the boot process of a Linux kernel +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import os + +from .testcase import QemuSystemTest +from .cmd import run_cmd, wait_for_console_pattern +from .utils import archive_extract + +class LinuxKernelTest(QemuSystemTest): + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + + def wait_for_console_pattern(self, success_message, vm=3DNone): + wait_for_console_pattern(self, success_message, + failure_message=3D'Kernel panic - not syn= cing', + vm=3Dvm) + + def extract_from_deb(self, deb_path, path): + """ + Extracts a file from a deb package into the test workdir + + :param deb_path: path to the deb archive + :param path: path within the deb archive of the file to be extract= ed + :returns: path of the extracted file + """ + cwd =3D os.getcwd() + os.chdir(self.workdir) + (stdout, stderr, ret) =3D run_cmd(['ar', 't', deb_path]) + file_path =3D stdout.split()[2] + run_cmd(['ar', 'x', deb_path, file_path]) + archive_extract(file_path, self.workdir) + os.chdir(cwd) + # Return complete path to extracted file. Because callers to + # extract_from_deb() specify 'path' with a leading slash, it is + # necessary to use os.path.relpath() as otherwise os.path.join() + # interprets it as an absolute path and drops the self.workdir par= t. + return os.path.normpath(os.path.join(self.workdir, + os.path.relpath(path, '/'))) + --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725971966; cv=none; d=zohomail.com; s=zohoarc; b=j9/e/HILDBQ5pLb0mUxGhKc3V+hMrEdRtpUCH71vkdWGw2sHI3tXvNzoab7mr5aNLUGVgWVbedjodRnobXM415p1tZdi6HGeZH4gGFe02lQYEW3OadFf3Tpssjsjrcp1SRzPsMuVPehyBnnl03IA0HscFo6GCsvrwlsLSJdRXWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971966; 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=mlabaCVvf/B/G7Lq44qPt5H9r63tvaxqvyFiA2TTRdw=; b=hbBL7oYwYFcx0TGUBS0euSn+22y8GROYG8yQjUaGN4ui+2ZAYDGCjJiLdwuVRDqDe6vHkSxtiFykaIJaYx9iA3dZm8vgzTVtNSsRrPChlEgb3CGURHDOA4/V0ntFfKF11sBYKaonRuayiEF6S5m7FYcIxfSi1ig3cR6mzUZihjg= 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 1725971966675320.39741828597835; Tue, 10 Sep 2024 05:39:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08N-0003E2-OT; Tue, 10 Sep 2024 08:38:17 -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 1so08A-0002HF-UI for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:03 -0400 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 1so084-00059j-5u for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:01 -0400 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-531-f8MojtspNy6m4p5n4vbsDQ-1; Tue, 10 Sep 2024 08:37:47 -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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1CE6E1977021; Tue, 10 Sep 2024 12:37:46 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EC60F19560B0; Tue, 10 Sep 2024 12:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971871; 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=mlabaCVvf/B/G7Lq44qPt5H9r63tvaxqvyFiA2TTRdw=; b=YIH32Zgh+KDK1hZt4ZxVw+fG3CbbUNjBit43QqkC4O7rGIz9F2ZqFXN4TP8/h3MtCoh2Z3 pDCQ1nR2OzqQmICRVspvvgWdnrzSsG+CShlJn8xvsl3LUu6zKheVJSaOUhJHwdMHUXQ5Rj euRlxoi4QlR7xHmBgzRtetSa9lZKLrE= X-MC-Unique: f8MojtspNy6m4p5n4vbsDQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 08/22] tests/functional: Convert the m68k Q800 Avocado test into a functional test Date: Tue, 10 Sep 2024 14:37:09 +0200 Message-ID: <20240910123726.182975-9-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725971967184116600 Just had to update the asset checksum to use SHA256 instead of SHA1, but apart from that it is a pretty much straightforward conversion. Message-ID: <20240906180549.792832-3-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 24 ------------------- tests/functional/meson.build | 3 ++- tests/functional/test_m68k_q800.py | 37 +++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 25 deletions(-) create mode 100755 tests/functional/test_m68k_q800.py diff --git a/MAINTAINERS b/MAINTAINERS index 822f89847b..a25022a77a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1310,6 +1310,7 @@ F: include/hw/m68k/q800-glue.h F: include/hw/misc/djmemc.h F: include/hw/misc/iosb.h F: include/hw/audio/asc.h +F: tests/functional/test_m68k_q800.py =20 virt M: Laurent Vivier diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 18c69d6acc..396836bf64 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -1325,30 +1325,6 @@ def test_alpha_clipper(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_m68k_q800(self): - """ - :avocado: tags=3Darch:m68k - :avocado: tags=3Dmachine:q800 - """ - deb_url =3D ('https://snapshot.debian.org/archive/debian-ports' - '/20191021T083923Z/pool-m68k/main' - '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.ude= b') - deb_hash =3D '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, - '/boot/vmlinux-5.3.0-1-m68k') - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyS0 vga=3Doff') - 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) - console_pattern =3D 'No filesystem could mount root' - self.wait_for_console_pattern(console_pattern) - def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=3D0): tar_url =3D ('https://qemu-advcal.gitlab.io' '/qac-best-of-multiarch/download/day' + day + '.tar.xz') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index cda89c4b0c..c6bb345d2c 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -57,7 +57,8 @@ tests_loongarch64_system_thorough =3D [ ] =20 tests_m68k_system_thorough =3D [ - 'm68k_nextcube' + 'm68k_nextcube', + 'm68k_q800', ] =20 tests_microblaze_system_thorough =3D [ diff --git a/tests/functional/test_m68k_q800.py b/tests/functional/test_m68= k_q800.py new file mode 100755 index 0000000000..3b17244b98 --- /dev/null +++ b/tests/functional/test_m68k_q800.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 +# +# Functional test for testing the q800 m68k machine +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from qemu_test import LinuxKernelTest, Asset + +class Q800MachineTest(LinuxKernelTest): + + ASSET_KERNEL =3D Asset( + ('https://snapshot.debian.org/' + 'archive/debian-ports/20191021T083923Z/pool-m68k/main/l/linux/' + 'kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.udeb'), + '949e50d74d4b9bc15d26c06d402717b7a4c0e32ff8100014f5930d8024de7b73') + + def test_m68k_q800(self): + self.set_machine('q800') + + deb_path =3D self.ASSET_KERNEL.fetch() + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinux-5.3.0-1-m68k') + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 vga=3Doff') + 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) + console_pattern =3D 'No filesystem could mount root' + self.wait_for_console_pattern(console_pattern) + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725971940; cv=none; d=zohomail.com; s=zohoarc; b=DzP9uJBuR7S0v6Z6Lj3XajLlEwlBzM22y20dWWe2R73xWJEe2/ORxKeINHMvdadCkvtYtJ7Sv7ZXo+a/m1KmBP64fvYgZa4M97wHfeVT2eTJXrbID7KdSE8tzMXM4AF/HlgWwoJceS2ArCga9t2ceplz5qtHG48RhyZvsLPXNes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971940; 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=DseQ+PNtGUI5GM+MFiMyUvwByq4R1FQSDsAnXzpfdD0=; b=K6eCoF/Ky9Yax6HD3hKuTxsh4lZm3/OtyfPK+78I/bxgSAXHqyuKqLWazT6gPDYTTV9hTDeDdUbDTwktczP6CG1fbCzdzE0dsFaGh78qgrZf25ZpLlynMflVHe1BZBYHhhDUrG49ofjfay1MkkEpIsCMV0F8vmphlqNT29iuUQQ= 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 1725971940670314.6707072030898; Tue, 10 Sep 2024 05:39:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so086-0001rX-Kt; Tue, 10 Sep 2024 08:37:59 -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 1so083-0001Wq-Os for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:55 -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 1so080-00059X-4N for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:37:55 -0400 Received: from mx-prod-mc-04.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-148-D7MuhjtfNTehQPQ4N1Q0Iw-1; Tue, 10 Sep 2024 08:37:48 -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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B7BFE1935876; Tue, 10 Sep 2024 12:37:47 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8BE2219560B1; Tue, 10 Sep 2024 12:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971869; 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=DseQ+PNtGUI5GM+MFiMyUvwByq4R1FQSDsAnXzpfdD0=; b=ieFltaHeEohe9ur7o7SFsM0G4oJum+XuSkSTEj8URhinsPxwUXqaVSIogkXzfdI1pPa4jp DzTE1SZvEu5xNlo0f0k9oVuvityWMHGQ6MLFS67EuPC8pAC/VN9gjRNzkwOQtyvh0o0VGL Gn8YmkZgtPg9EDfAHP1O0PMO70Vejxo= X-MC-Unique: D7MuhjtfNTehQPQ4N1Q0Iw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 09/22] tests/functional: Convert mips64el Fuloong2e avocado test (2/2) Date: Tue, 10 Sep 2024 14:37:10 +0200 Message-ID: <20240910123726.182975-10-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1725971942789116600 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-3-philmd@linaro.org> [thuth: Use LinuxKernelTest class for this test] Message-ID: <20240906180549.792832-4-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 21 ----------------- tests/functional/test_mips64el_fuloong2e.py | 25 ++++++++++++++++++--- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 396836bf64..e1e20c36f7 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -170,27 +170,6 @@ def test_mips64el_malta(self): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_mips64el_fuloong2e(self): - """ - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:fuloong2e - :avocado: tags=3Dendian:little - """ - deb_url =3D ('http://archive.debian.org/debian/pool/main/l/linux/' - 'linux-image-3.16.0-6-loongson-2e_3.16.56-1+deb8u1_mips= el.deb') - deb_hash =3D 'd04d446045deecf7b755ef576551de0c4184dd44' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, - '/boot/vmlinux-3.16.0-6-loongs= on-2e') - - 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 diff --git a/tests/functional/test_mips64el_fuloong2e.py b/tests/functional= /test_mips64el_fuloong2e.py index 7688a32713..a32d5f9d08 100755 --- a/tests/functional/test_mips64el_fuloong2e.py +++ b/tests/functional/test_mips64el_fuloong2e.py @@ -12,14 +12,33 @@ import os import subprocess =20 -from qemu_test import QemuSystemTest +from qemu_test import LinuxKernelTest, Asset from qemu_test import wait_for_console_pattern from unittest import skipUnless =20 -class MipsFuloong2e(QemuSystemTest): +class MipsFuloong2e(LinuxKernelTest): =20 timeout =3D 60 =20 + ASSET_KERNEL =3D Asset( + ('http://archive.debian.org/debian/pool/main/l/linux/' + 'linux-image-3.16.0-6-loongson-2e_3.16.56-1+deb8u1_mipsel.deb'), + '2a70f15b397f4ced632b0c15cb22660394190644146d804d60a4796eefbe1f50') + + def test_linux_kernel_3_16(self): + deb_path =3D self.ASSET_KERNEL.fetch() + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinux-3.16.0-6-loongs= on-2e') + + self.set_machine('fuloong2e') + 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) + @skipUnless(os.getenv('QEMU_TEST_ALLOW_UNTRUSTED_CODE'), 'untrusted co= de') @skipUnless(os.getenv('RESCUE_YL_PATH'), 'RESCUE_YL_PATH not available= ') def test_linux_kernel_2_6_27_isa_serial(self): @@ -42,4 +61,4 @@ def test_linux_kernel_2_6_27_isa_serial(self): =20 =20 if __name__ =3D=3D '__main__': - QemuSystemTest.main() + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725971947; cv=none; d=zohomail.com; s=zohoarc; b=HXpIRcJST8Z/CRbGrOMNBoshmr00+tAHBU9ikfmyTqa2M2/SDbtMv3P6kBPe6XT8CZOO4bI6VSS1nNyDjPRBqa0ZrFT+NaH2AjoFkyCeVaDXuId+MQHE0vtbqk6wCsK9kMerEZIxuydmYXSFKk6r4zGcMKS7+SdxvKlyp1w+by4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971947; 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=W6QHQJ48zpU4qGd3mkKxNWD3H8DD0ZEDdWZ1xYCdr60=; b=RHc46VOgCBqsQcPsBJidzNdI1oHavnYoXx2wRQ38OYGNyozkQzwz/DEWzWFVepeIGedXD6DlOnaZFw2KTg2Q6wMwacsfV1zRpW7FLWmKwr78N4nPFLH4nqNVlIcEPHM1Fn/DBN5XQkQgkP/i562Y9eU6HCtsLirF9+fIgsAuL4M= 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 1725971947468300.16309059050013; Tue, 10 Sep 2024 05:39:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08N-0003Cg-Oo; Tue, 10 Sep 2024 08:38:17 -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 1so08J-0002vp-RH for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:11 -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 1so088-0005AM-MQ for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:07 -0400 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-282-3OJDxxeKN3im1hL0OwuUHg-1; Tue, 10 Sep 2024 08:37:50 -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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C5AF71977025; Tue, 10 Sep 2024 12:37:49 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6A37919560AB; Tue, 10 Sep 2024 12:37:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971875; 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=W6QHQJ48zpU4qGd3mkKxNWD3H8DD0ZEDdWZ1xYCdr60=; b=YiH16JZvUrM4LyAkPyvBBJgg1hTHdN3eI0tpwjyJPcBLMJ6qsZp8sYiIgcabrr64ideAyK AOi1vkP+teGAAmW1vOZ3E+zMwubfKxjjTsWn3rEjVYfpC5mFKa7vniEQiP8GxUVLcMYMti lGuk7egaA5zrMQlQJkzr+Dj3uVxXyvY= X-MC-Unique: 3OJDxxeKN3im1hL0OwuUHg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 10/22] tests/functional: Convert mips64el I6400 Malta avocado tests Date: Tue, 10 Sep 2024 14:37:11 +0200 Message-ID: <20240910123726.182975-11-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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 @redhat.com) X-ZM-MESSAGEID: 1725971948896116600 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-4-philmd@linaro.org> Reviewed-by: Thomas Huth Message-ID: <20240906180549.792832-5-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/machine_mips_malta.py | 108 ------------------------ tests/functional/meson.build | 1 + tests/functional/test_mips64el_malta.py | 108 ++++++++++++++++++++++++ 4 files changed, 110 insertions(+), 108 deletions(-) create mode 100755 tests/functional/test_mips64el_malta.py diff --git a/MAINTAINERS b/MAINTAINERS index a25022a77a..dcf3823169 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1371,6 +1371,7 @@ F: hw/pci-host/gt64120.c F: include/hw/southbridge/piix.h F: tests/avocado/linux_ssh_mips_malta.py F: tests/avocado/machine_mips_malta.py +F: tests/functional/test_mips64el_malta.py =20 Mipssim R: Aleksandar Rikalo diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mi= ps_malta.py index 07a80633b5..05c64e18c4 100644 --- a/tests/avocado/machine_mips_malta.py +++ b/tests/avocado/machine_mips_malta.py @@ -8,121 +8,13 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 import os -import gzip -import logging =20 -from avocado import skipUnless -from avocado import skipUnless from avocado.utils import archive from avocado_qemu import QemuSystemTest -from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import interrupt_interactive_console_until_pattern from avocado_qemu import wait_for_console_pattern =20 =20 -NUMPY_AVAILABLE =3D True -try: - import numpy as np -except ImportError: - NUMPY_AVAILABLE =3D False - -CV2_AVAILABLE =3D True -try: - import cv2 -except ImportError: - CV2_AVAILABLE =3D False - - -@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed') -@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed') -class MaltaMachineFramebuffer(QemuSystemTest): - - timeout =3D 30 - - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' - - def do_test_i6400_framebuffer_logo(self, cpu_cores_count): - """ - Boot Linux kernel and check Tux logo is displayed on the framebuff= er. - """ - screendump_path =3D os.path.join(self.workdir, 'screendump.pbm') - - kernel_url =3D ('https://github.com/philmd/qemu-testing-blob/raw/' - 'a5966ca4b5/mips/malta/mips64el/' - 'vmlinux-4.7.0-rc1.I6400.gz') - kernel_hash =3D '096f50c377ec5072e6a366943324622c312045f6' - kernel_path_gz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) - kernel_path =3D self.workdir + "vmlinux" - archive.gzip_uncompress(kernel_path_gz, kernel_path) - - tuxlogo_url =3D ('https://github.com/torvalds/linux/raw/v2.6.12/' - 'drivers/video/logo/logo_linux_vga16.ppm') - tuxlogo_hash =3D '3991c2ddbd1ddaecda7601f8aafbcf5b02dc86af' - tuxlogo_path =3D self.fetch_asset(tuxlogo_url, asset_hash=3Dtuxlog= o_hash) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'clocksource=3DGIC console=3Dtty0 console= =3DttyS0') - self.vm.add_args('-kernel', kernel_path, - '-smp', '%u' % cpu_cores_count, - '-vga', 'std', - '-append', kernel_command_line) - self.vm.launch() - framebuffer_ready =3D 'Console: switching to colour frame buffer d= evice' - wait_for_console_pattern(self, framebuffer_ready, - failure_message=3D'Kernel panic - not syn= cing') - self.vm.cmd('human-monitor-command', command_line=3D'stop') - self.vm.cmd('human-monitor-command', - command_line=3D'screendump %s' % screendump_path) - logger =3D logging.getLogger('framebuffer') - - match_threshold =3D 0.95 - screendump_bgr =3D cv2.imread(screendump_path, cv2.IMREAD_COLOR) - tuxlogo_bgr =3D cv2.imread(tuxlogo_path, cv2.IMREAD_COLOR) - result =3D cv2.matchTemplate(screendump_bgr, tuxlogo_bgr, - cv2.TM_CCOEFF_NORMED) - loc =3D np.where(result >=3D match_threshold) - tuxlogo_count =3D 0 - h, w =3D tuxlogo_bgr.shape[:2] - debug_png =3D os.getenv('AVOCADO_CV2_SCREENDUMP_PNG_PATH') - for tuxlogo_count, pt in enumerate(zip(*loc[::-1]), start=3D1): - logger.debug('found Tux at position (x, y) =3D %s', pt) - cv2.rectangle(screendump_bgr, pt, - (pt[0] + w, pt[1] + h), (0, 0, 255), 2) - if debug_png: - cv2.imwrite(debug_png, screendump_bgr) - self.assertGreaterEqual(tuxlogo_count, cpu_cores_count) - - def test_mips_malta_i6400_framebuffer_logo_1core(self): - """ - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dcpu:I6400 - """ - self.do_test_i6400_framebuffer_logo(1) - - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_mips_malta_i6400_framebuffer_logo_7cores(self): - """ - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dcpu:I6400 - :avocado: tags=3Dmips:smp - :avocado: tags=3Dflaky - """ - self.do_test_i6400_framebuffer_logo(7) - - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_mips_malta_i6400_framebuffer_logo_8cores(self): - """ - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dcpu:I6400 - :avocado: tags=3Dmips:smp - :avocado: tags=3Dflaky - """ - self.do_test_i6400_framebuffer_logo(8) - class MaltaMachine(QemuSystemTest): =20 def do_test_yamon(self): diff --git a/tests/functional/meson.build b/tests/functional/meson.build index c6bb345d2c..9baf903e39 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -75,6 +75,7 @@ tests_mips64el_system_quick =3D [ =20 tests_mips64el_system_thorough =3D [ 'mips64el_loongson3v', + 'mips64el_malta', ] =20 tests_ppc_system_quick =3D [ diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/tes= t_mips64el_malta.py new file mode 100755 index 0000000000..0c4e9a00ef --- /dev/null +++ b/tests/functional/test_mips64el_malta.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 +# +# Functional tests for the little-endian 64-bit MIPS Malta board +# +# Copyright (c) Philippe Mathieu-Daud=C3=A9 +# +# This work is licensed under the terms of the GNU GPL, version 2 or later. +# See the COPYING file in the top-level directory. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import logging + +from qemu_test import LinuxKernelTest, Asset +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test.utils import gzip_uncompress +from unittest import skipUnless + +NUMPY_AVAILABLE =3D True +try: + import numpy as np +except ImportError: + NUMPY_AVAILABLE =3D False + +CV2_AVAILABLE =3D True +try: + import cv2 +except ImportError: + CV2_AVAILABLE =3D False + + +@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed') +@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed') +class MaltaMachineFramebuffer(LinuxKernelTest): + + timeout =3D 30 + + ASSET_KERNEL_4_7_0 =3D Asset( + ('https://github.com/philmd/qemu-testing-blob/raw/a5966ca4b5/' + 'mips/malta/mips64el/vmlinux-4.7.0-rc1.I6400.gz'), + '1f64efc59968a3c328672e6b10213fe574bb2308d9d2ed44e75e40be59e9fbc2') + + ASSET_TUXLOGO =3D Asset( + ('https://github.com/torvalds/linux/raw/v2.6.12/' + 'drivers/video/logo/logo_linux_vga16.ppm'), + 'b762f0d91ec018887ad1b334543c2fdf9be9fdfc87672b409211efaa3ea0ef79') + + def do_test_i6400_framebuffer_logo(self, cpu_cores_count): + """ + Boot Linux kernel and check Tux logo is displayed on the framebuff= er. + """ + screendump_path =3D os.path.join(self.workdir, 'screendump.pbm') + + kernel_path_gz =3D self.ASSET_KERNEL_4_7_0.fetch() + kernel_path =3D self.workdir + "vmlinux" + gzip_uncompress(kernel_path_gz, kernel_path) + + tuxlogo_path =3D self.ASSET_TUXLOGO.fetch() + + self.set_machine('malta') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'clocksource=3DGIC console=3Dtty0 console= =3DttyS0') + self.vm.add_args('-kernel', kernel_path, + '-cpu', 'I6400', + '-smp', '%u' % cpu_cores_count, + '-vga', 'std', + '-append', kernel_command_line) + self.vm.launch() + framebuffer_ready =3D 'Console: switching to colour frame buffer d= evice' + self.wait_for_console_pattern(framebuffer_ready) + self.vm.cmd('human-monitor-command', command_line=3D'stop') + self.vm.cmd('human-monitor-command', + command_line=3D'screendump %s' % screendump_path) + logger =3D logging.getLogger('framebuffer') + + match_threshold =3D 0.95 + screendump_bgr =3D cv2.imread(screendump_path, cv2.IMREAD_COLOR) + tuxlogo_bgr =3D cv2.imread(tuxlogo_path, cv2.IMREAD_COLOR) + result =3D cv2.matchTemplate(screendump_bgr, tuxlogo_bgr, + cv2.TM_CCOEFF_NORMED) + loc =3D np.where(result >=3D match_threshold) + tuxlogo_count =3D 0 + h, w =3D tuxlogo_bgr.shape[:2] + debug_png =3D os.getenv('AVOCADO_CV2_SCREENDUMP_PNG_PATH') + for tuxlogo_count, pt in enumerate(zip(*loc[::-1]), start=3D1): + logger.debug('found Tux at position (x, y) =3D %s', pt) + cv2.rectangle(screendump_bgr, pt, + (pt[0] + w, pt[1] + h), (0, 0, 255), 2) + if debug_png: + cv2.imwrite(debug_png, screendump_bgr) + self.assertGreaterEqual(tuxlogo_count, cpu_cores_count) + + def test_mips_malta_i6400_framebuffer_logo_1core(self): + self.do_test_i6400_framebuffer_logo(1) + + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') + def test_mips_malta_i6400_framebuffer_logo_7cores(self): + self.do_test_i6400_framebuffer_logo(7) + + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') + def test_mips_malta_i6400_framebuffer_logo_8cores(self): + self.do_test_i6400_framebuffer_logo(8) + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972106; cv=none; d=zohomail.com; s=zohoarc; b=KjaDREPtAlL8canaYx6pCGu4FMfNmtiU0ZY4gADzOvrffl9SJuhSx4KeDQ3rtZktvi4pQ8tKilcZ9Slf6b+6W2o5567YlnhfPj/Cex5BK0YveZXghdk74td1w+6CnwF+u3VmMhzWEyyZTw9P1ILXwH+6HupZM6QgUOmbJTQXDkw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972106; 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=iZe3dpPIOirOU0DqUL9wsE5Tn/WVqS1Vb/yx1VX2zk0=; b=egZ0Cu/DzQpNo8ciREmvtP2xcxdRrA3LTns/WO9purKqXts6m/Z3HrETL+NDxNMMzuEv/krLkia/By4BsYJdREynQKZ7DH2gGKykc3H0iYnjHJ2emEvKp77sDBNiJE+lPPO9Z7pJh92oEl9wRgZDZf+g9YgiiwjAcNPmcoWl32o= 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 1725972106843546.3789435042702; Tue, 10 Sep 2024 05:41:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08S-0003vC-Ow; Tue, 10 Sep 2024 08:38:21 -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 1so08G-0002bn-4t for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:09 -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 1so086-0005AR-Nw for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:06 -0400 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-668-gOeDVagRO9mKL6VtlbKmeA-1; Tue, 10 Sep 2024 08:37:52 -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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 298D4195604F; Tue, 10 Sep 2024 12:37:51 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2981B19560AD; Tue, 10 Sep 2024 12:37:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971875; 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=iZe3dpPIOirOU0DqUL9wsE5Tn/WVqS1Vb/yx1VX2zk0=; b=APMk5Sf8+ZsZw49PMQDIKs0OYVIW4eNDeKt2gxdLR6+Hq+LfPcgqpHbg6SXghG8PedoI2i vYlW7BOPSZQpZHPUPL0Jw+zF92RUuswkUoB/HQQW3K7FTLt/ZK9iRdO5DuNcxdM/O2xWhW knoJqLC2pRNyU/mlCR1q4b1ASJLGD9A= X-MC-Unique: gOeDVagRO9mKL6VtlbKmeA-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 11/22] tests/functional: Convert mips64el 5KEc Malta avocado tests Date: Tue, 10 Sep 2024 14:37:12 +0200 Message-ID: <20240910123726.182975-12-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_BTC_ID=0.156, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1725972107556116600 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> Message-ID: <20240906180549.792832-6-thuth@redhat.com> 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 From nobody Sun Nov 24 06:46:06 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=1725972097; cv=none; d=zohomail.com; s=zohoarc; b=SEqe+IC1j2END5pcU6JhNTqxCoM056Z3PoPcLwH4W1zf3GZZKCJTKca1Rb6WraUZzIn4U3G1oVK0yF9WPqzJF6PhR01hdBoOuywnvJHKfrKlO9VfBZSuJfj6h+dSN3bP8mtV6mzTpTo+IkpjrWMktWDxPoHoDHd7D+d/cNhW3+0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972097; 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=rUPlNmswNBNwGGbdP+FKNLR2RiuR+lcerOVxdPuz66Y=; b=mz3I3B23EDevhQo1Wb1SZLMgmvVpDTh/VYwH6Eh68mJ6C6ayd/QVX5uuqr8T8C2OTz+0uoC0PU6M2SILO5qwtFEEfwzfelkHNa7CtZMJkHoob8Iv3mMzY40X2SGr1RzhhGrA5WgliMHfOa2/3iEK+dJ3Hut6lZHNtpRYa1iOmjw= 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 172597209760140.02446696455229; Tue, 10 Sep 2024 05:41:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08T-00043t-K2; Tue, 10 Sep 2024 08:38:21 -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 1so08J-0002rM-CT for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:11 -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 1so08A-0005Ak-0i for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:06 -0400 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-694-yMBvp3hEM4qbzdzdTr8eWw-1; Tue, 10 Sep 2024 08:37:56 -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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4A44C197701A; Tue, 10 Sep 2024 12:37:55 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1C66519560AB; Tue, 10 Sep 2024 12:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971879; 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=rUPlNmswNBNwGGbdP+FKNLR2RiuR+lcerOVxdPuz66Y=; b=gwkQbNERtwFEKi9sHs0dGnFSp+n9lst6gNMC9iKFLQfp+Zki0kjDJYHrYunvRvZR2Z5ETl H5Rv2laj8YtLSgWRMFn8FfSd8rNS2Q79RDkR7lMsbP/Yu6Xv82U4WoJfTN2eHX7se94hIv 7PAqcHHoRb/55WYR7NP1yP13MLoTyU0= X-MC-Unique: yMBvp3hEM4qbzdzdTr8eWw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 12/22] tests/functional: Convert mips32el Malta YAMON avocado test Date: Tue, 10 Sep 2024 14:37:13 +0200 Message-ID: <20240910123726.182975-13-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1725972099741116600 From: Philippe Mathieu-Daud=C3=A9 Straight forward conversion using the Python standard zipfile module instead of avocado.utils package. 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-6-philmd@linaro.org> Reviewed-by: Thomas Huth Message-ID: <20240906180549.792832-7-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- tests/avocado/machine_mips_malta.py | 54 ------------------------- tests/functional/meson.build | 4 ++ tests/functional/test_mips64el_malta.py | 16 ++++---- tests/functional/test_mipsel_malta.py | 47 +++++++++++++++++++++ 5 files changed, 61 insertions(+), 62 deletions(-) delete mode 100644 tests/avocado/machine_mips_malta.py create mode 100755 tests/functional/test_mipsel_malta.py diff --git a/MAINTAINERS b/MAINTAINERS index dcf3823169..2f76098230 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1370,7 +1370,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/avocado/machine_mips_malta.py +F: tests/functional/test_mipsel_malta.py F: tests/functional/test_mips64el_malta.py =20 Mipssim diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mi= ps_malta.py deleted file mode 100644 index 05c64e18c4..0000000000 --- a/tests/avocado/machine_mips_malta.py +++ /dev/null @@ -1,54 +0,0 @@ -# Functional tests for the MIPS Malta board -# -# Copyright (c) Philippe Mathieu-Daud=C3=A9 -# -# This work is licensed under the terms of the GNU GPL, version 2 or later. -# See the COPYING file in the top-level directory. -# -# SPDX-License-Identifier: GPL-2.0-or-later - -import os - -from avocado.utils import archive -from avocado_qemu import QemuSystemTest -from avocado_qemu import interrupt_interactive_console_until_pattern -from avocado_qemu import wait_for_console_pattern - - -class MaltaMachine(QemuSystemTest): - - def do_test_yamon(self): - rom_url =3D ('https://s3-eu-west-1.amazonaws.com/' - 'downloads-mips/mips-downloads/' - 'YAMON/yamon-bin-02.22.zip') - rom_hash =3D '8da7ecddbc5312704b8b324341ee238189bde480' - zip_path =3D self.fetch_asset(rom_url, asset_hash=3Drom_hash) - - archive.extract(zip_path, self.workdir) - yamon_path =3D os.path.join(self.workdir, 'yamon-02.22.bin') - - self.vm.set_console() - self.vm.add_args('-bios', yamon_path) - self.vm.launch() - - prompt =3D 'YAMON>' - pattern =3D 'YAMON ROM Monitor' - interrupt_interactive_console_until_pattern(self, pattern, prompt) - wait_for_console_pattern(self, prompt) - self.vm.shutdown() - - def test_mipsel_malta_yamon(self): - """ - :avocado: tags=3Darch:mipsel - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dendian:little - """ - self.do_test_yamon() - - def test_mips64el_malta_yamon(self): - """ - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dendian:little - """ - self.do_test_yamon() diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 9baf903e39..daee61ec3c 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -69,6 +69,10 @@ tests_microblazeel_system_thorough =3D [ 'microblazeel_s3adsp1800' ] =20 +tests_mipsel_system_thorough =3D [ + 'mipsel_malta', +] + tests_mips64el_system_quick =3D [ 'mips64el_fuloong2e', ] diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/tes= t_mips64el_malta.py index 1be93d7ff0..6c6355b131 100755 --- a/tests/functional/test_mips64el_malta.py +++ b/tests/functional/test_mips64el_malta.py @@ -30,7 +30,7 @@ CV2_AVAILABLE =3D False =20 =20 -class MaltaMachineConsole(QemuSystemTest): +class MaltaMachineConsole(LinuxKernelTest): =20 ASSET_KERNEL_2_63_2 =3D Asset( ('http://snapshot.debian.org/archive/debian/' @@ -52,17 +52,17 @@ def test_mips64el_malta(self): 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') + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinux-2.6.32-5-5kc-ma= lta') =20 self.set_machine('malta') self.vm.set_console() - kernel_command_line =3D KERNEL_COMMON_COMMAND_LINE + 'console=3Dtt= yS0' + 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 - linux_kernel_wait_for_pattern(self, console_pattern) + self.wait_for_console_pattern(console_pattern) =20 ASSET_KERNEL_3_19_3 =3D Asset( ('https://github.com/philmd/qemu-testing-blob/' @@ -85,7 +85,7 @@ def test_mips64el_malta_5KEc_cpio(self): =20 self.set_machine('malta') self.vm.set_console() - kernel_command_line =3D (KERNEL_COMMON_COMMAND_LINE + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'console=3DttyS0 console=3Dtty ' + 'rdinit=3D/sbin/init noreboot') self.vm.add_args('-cpu', '5KEc', @@ -94,7 +94,7 @@ def test_mips64el_malta_5KEc_cpio(self): '-append', kernel_command_line, '-no-reboot') self.vm.launch() - linux_kernel_wait_for_pattern(self, 'Boot successful.') + self.wait_for_console_pattern('Boot successful.') =20 exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'MIPS 5KE') @@ -180,5 +180,7 @@ def test_mips_malta_i6400_framebuffer_logo_8cores(self): self.do_test_i6400_framebuffer_logo(8) =20 =20 +from test_mipsel_malta import MaltaMachineYAMON + if __name__ =3D=3D '__main__': LinuxKernelTest.main() diff --git a/tests/functional/test_mipsel_malta.py b/tests/functional/test_= mipsel_malta.py new file mode 100755 index 0000000000..f31f96b012 --- /dev/null +++ b/tests/functional/test_mipsel_malta.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python3 +# +# Functional tests for the little-endian 32-bit MIPS Malta board +# +# Copyright (c) Philippe Mathieu-Daud=C3=A9 +# +# This work is licensed under the terms of the GNU GPL, version 2 or later. +# See the COPYING file in the top-level directory. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import QemuSystemTest, Asset +from qemu_test import interrupt_interactive_console_until_pattern +from qemu_test import wait_for_console_pattern +from zipfile import ZipFile + + +class MaltaMachineYAMON(QemuSystemTest): + + ASSET_YAMON_ROM =3D Asset( + ('https://s3-eu-west-1.amazonaws.com/downloads-mips/mips-downloads= /' + 'YAMON/yamon-bin-02.22.zip'), + 'eef86f0eed0ef554f041dcd47b87eebea0e6f9f1184ed31f7e9e8b4a803860ab') + + def test_mipsel_malta_yamon(self): + yamon_bin =3D 'yamon-02.22.bin' + zip_path =3D self.ASSET_YAMON_ROM.fetch() + with ZipFile(zip_path, 'r') as zf: + zf.extract(yamon_bin, path=3Dself.workdir) + yamon_path =3D os.path.join(self.workdir, yamon_bin) + + self.set_machine('malta') + self.vm.set_console() + self.vm.add_args('-bios', yamon_path) + self.vm.launch() + + prompt =3D 'YAMON>' + pattern =3D 'YAMON ROM Monitor' + interrupt_interactive_console_until_pattern(self, pattern, prompt) + wait_for_console_pattern(self, prompt) + self.vm.shutdown() + + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725971985; cv=none; d=zohomail.com; s=zohoarc; b=GqhnBHKLUoz3mjjYth4tPUHwvz0j4jAASo43cGiYs95NakK7jkQAPLoZSQWTiur2U5CvVtbCRfS5M2/PXAd5UeqeP1lcTQ15wlCYFyyFHJjCIiy88FoMQBUq5u8101BKUYEiiWcFzZkFA22x1y5czItrocifcykxPNdFdi8R4uc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971985; 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=Mu586OZHFIJ1e8Osbpcd5hXz6qgD9J7Ny2j/lHBXvSY=; b=OT++gLP6xsHTbWLzuniR1wdwYk42Gbh6dxQwRVDc+SIPOwMp9w6Vp5rIJSHD+dNG53h7puV+MRdFPBUTInyg/TsIx+eafc4LJBHIeYqI0R4GF7pWLgPLNnqAvhBiKwB9V7oihboPpkkocVr8VJChN3qmlHtm75CWpfGzbOA5Aao= 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 1725971985099763.3528451083245; Tue, 10 Sep 2024 05:39:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08V-0004OX-ID; Tue, 10 Sep 2024 08:38:23 -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 1so08O-0003RJ-1K for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:17 -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 1so08F-0005B4-UY for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:14 -0400 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-392-lPetawyxP6Ohaqe8hr-nJA-1; Tue, 10 Sep 2024 08:38:00 -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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 35C541944D3C; Tue, 10 Sep 2024 12:37:59 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6006419560AB; Tue, 10 Sep 2024 12:37:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971883; 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=Mu586OZHFIJ1e8Osbpcd5hXz6qgD9J7Ny2j/lHBXvSY=; b=jPdPaL9xM0rbohxitLSY+KI5IJ7Vy4OxhxgaP+2G236auyQP8reJwE+7ontzHtSApvCdMj ZhWZBFr0DBLNNgQCuYkvPgk0qS9WtFuV0r62+J6s3L1QdsLyNUnLuYkKbcObtNdGVTsaG5 xDSMsvKTaH0qCI4L1qM8AIiBCgDws8o= X-MC-Unique: lPetawyxP6Ohaqe8hr-nJA-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 13/22] tests/functional: Convert nanomips Malta avocado tests Date: Tue, 10 Sep 2024 14:37:14 +0200 Message-ID: <20240910123726.182975-14-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1725971987407116600 From: Philippe Mathieu-Daud=C3=A9 Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. $ QEMU_TEST_ALLOW_UNTRUSTED_CODE=3D1 \ make check-functional-mipsel ... =E2=96=B6 4/4 test_mipsel_malta.MaltaMachineConsole.test_mips_malta32el_n= anomips_16k_up OK =E2=96=B6 4/4 test_mipsel_malta.MaltaMachineConsole.test_mips_malta32el_n= anomips_4k OK =E2=96=B6 4/4 test_mipsel_malta.MaltaMachineConsole.test_mips_malta32el_n= anomips_64k_dbg OK =E2=96=B6 4/4 test_mipsel_malta.MaltaMachineYAMON.test_mipsel_malta_yamon= OK 4/4 qemu:func-thorough+func-mipsel-thorough+thorough / func-mipsel-mipsel= _malta OK 9.95s 4 subtests passed Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240827094905.80648-7-philmd@linaro.org> [thuth: Use LinuxKernelTest] Message-ID: <20240906180549.792832-8-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 59 --------------------------- tests/functional/test_mipsel_malta.py | 51 ++++++++++++++++++++++- 2 files changed, 50 insertions(+), 60 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 84b31cb84e..34f4abadd0 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -179,65 +179,6 @@ def test_mips_malta_cpio(self): # Wait for VM to shut down gracefully self.vm.wait() =20 - 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: - with open(kernel_path, 'wb') as f_out: - shutil.copyfileobj(f_in, f_out) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE - + 'mem=3D256m@@0x0 ' - + 'console=3DttyS0') - self.vm.add_args('-no-reboot', - '-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_malta32el_nanomips_4k(self): - """ - :avocado: tags=3Darch:mipsel - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dendian:little - :avocado: tags=3Dcpu:I7200 - """ - kernel_url =3D ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' - 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' - 'generic_nano32r6el_page4k.xz') - kernel_hash =3D '477456aafd2a0f1ddc9482727f20fe9575565dd6' - kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) - self.do_test_mips_malta32el_nanomips(kernel_path_xz) - - def test_mips_malta32el_nanomips_16k_up(self): - """ - :avocado: tags=3Darch:mipsel - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dendian:little - :avocado: tags=3Dcpu:I7200 - """ - kernel_url =3D ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' - 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' - 'generic_nano32r6el_page16k_up.xz') - kernel_hash =3D 'e882868f944c71c816e832e2303b7874d044a7bc' - kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) - self.do_test_mips_malta32el_nanomips(kernel_path_xz) - - def test_mips_malta32el_nanomips_64k_dbg(self): - """ - :avocado: tags=3Darch:mipsel - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dendian:little - :avocado: tags=3Dcpu:I7200 - """ - kernel_url =3D ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' - 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' - 'generic_nano32r6el_page64k_dbg.xz') - kernel_hash =3D '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' - kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) - self.do_test_mips_malta32el_nanomips(kernel_path_xz) - def test_aarch64_xlnx_versal_virt(self): """ :avocado: tags=3Darch:aarch64 diff --git a/tests/functional/test_mipsel_malta.py b/tests/functional/test_= mipsel_malta.py index f31f96b012..b8dfddd856 100755 --- a/tests/functional/test_mipsel_malta.py +++ b/tests/functional/test_mipsel_malta.py @@ -11,12 +11,61 @@ =20 import os =20 -from qemu_test import QemuSystemTest, Asset +from qemu_test import QemuSystemTest, LinuxKernelTest, Asset from qemu_test import interrupt_interactive_console_until_pattern from qemu_test import wait_for_console_pattern +from qemu_test.utils import lzma_uncompress from zipfile import ZipFile =20 =20 +class MaltaMachineConsole(LinuxKernelTest): + + ASSET_KERNEL_4K =3D Asset( + ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' + 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' + 'generic_nano32r6el_page4k.xz'), + '019e034094ac6cf3aa77df5e130fb023ce4dbc804b04bfcc560c6403e1ae6bdb') + ASSET_KERNEL_16K =3D Asset( + ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' + 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' + 'generic_nano32r6el_page16k_up.xz'), + '3a54a10b3108c16a448dca9ea3db378733a27423befc2a45a5bdf990bd85e12c') + ASSET_KERNEL_64K =3D Asset( + ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' + 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' + 'generic_nano32r6el_page64k_dbg.xz'), + 'ce21ff4b07a981ecb8a39db2876616f5a2473eb2ab459c6f67465b9914b0c6b6') + + def do_test_mips_malta32el_nanomips(self, kernel_path_xz): + kernel_path =3D os.path.join(self.workdir, 'kernel') + lzma_uncompress(kernel_path_xz, kernel_path) + + self.set_machine('malta') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'mem=3D256m@@0x0 ' + + 'console=3DttyS0') + self.vm.add_args('-cpu', 'I7200', + '-no-reboot', + '-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_malta32el_nanomips_4k(self): + kernel_path_xz =3D self.ASSET_KERNEL_4K.fetch() + self.do_test_mips_malta32el_nanomips(kernel_path_xz) + + def test_mips_malta32el_nanomips_16k_up(self): + kernel_path_xz =3D self.ASSET_KERNEL_16K.fetch() + self.do_test_mips_malta32el_nanomips(kernel_path_xz) + + def test_mips_malta32el_nanomips_64k_dbg(self): + kernel_path_xz =3D self.ASSET_KERNEL_16K.fetch() + self.do_test_mips_malta32el_nanomips(kernel_path_xz) + + class MaltaMachineYAMON(QemuSystemTest): =20 ASSET_YAMON_ROM =3D Asset( --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972014; cv=none; d=zohomail.com; s=zohoarc; b=USDLk5pMQpm6Ml96v8gPfeeZ+ay0KSp4qHyznT/3d94WFvozBzCVgTrx8U5W7/hqR2g1AS3YN+d1h+w0KiFaybSfz/Rg7vlMzX+9BaB7v0ZD7S3v+17ka85Hdpi+U+mvXtrh2++rIFnLPuYG+KbVVH9aV+r1aNCxrs27sScZGFs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972014; 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=bMdOD3sPPSy1EnK30Zx5hlrtQNyWnAmBF/Lo0F4+p3A=; b=n0pw0wIaEszR8lwAdslN32CaAA7M7mVrHTIsSvGKTbFYfiZJs7btWF0aOQ4WVuooXRQ9hxk/OxEVpPUniYmckLds8Kr7HRA5swuQ6Wt6QUsvw8u6jGkN47nuHfmLX38vpGgCv5FmYMLwjDth37Pd/GR4aVpXbmVIiVEZRCqV8F8= 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 1725972014731348.94107175754186; Tue, 10 Sep 2024 05:40:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08W-0004bD-No; Tue, 10 Sep 2024 08:38:24 -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 1so08Q-0003aA-2Q for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38: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 1so08K-0005BJ-8y for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:17 -0400 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-614-x_4KqeQMMAu9h3iKLDM80Q-1; Tue, 10 Sep 2024 08:38:03 -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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 52EC41955D44; Tue, 10 Sep 2024 12:38:02 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 16E9419560AB; Tue, 10 Sep 2024 12:37:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971886; 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=bMdOD3sPPSy1EnK30Zx5hlrtQNyWnAmBF/Lo0F4+p3A=; b=E3MTa6qlfFLkyRSO3S1kqYIgQXsNddsSy5Pqf9pSrMb1gFPIetFcgOlQ/kKCt8Req09077 3i4gWpR3KU4dBv/VZ6bdxrfSR2/PD1SfG9bBylR0AJPjV72M+fUAZGsbJ+ytZNRT1InrDi GiKmzNr4A2X1TsHBbnmVf29CHomr7tA= X-MC-Unique: x_4KqeQMMAu9h3iKLDM80Q-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 14/22] tests/functional: Convert mips32eb 4Kc Malta avocado tests Date: Tue, 10 Sep 2024 14:37:15 +0200 Message-ID: <20240910123726.182975-15-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1725972015234116600 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-8-philmd@linaro.org> [thuth: Use LinuxKernelTest class] Message-ID: <20240906180549.792832-9-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 63 ---------------------- tests/functional/meson.build | 4 ++ tests/functional/test_mips_malta.py | 81 +++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 63 deletions(-) create mode 100755 tests/functional/test_mips_malta.py diff --git a/MAINTAINERS b/MAINTAINERS index 2f76098230..6e0044ab58 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1370,6 +1370,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 34f4abadd0..e3e4576099 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 daee61ec3c..eb2de2a8fd 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -69,6 +69,10 @@ tests_microblazeel_system_thorough =3D [ 'microblazeel_s3adsp1800' ] =20 +tests_mips_system_thorough =3D [ + 'mips_malta', +] + tests_mipsel_system_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..a012081382 --- /dev/null +++ b/tests/functional/test_mips_malta.py @@ -0,0 +1,81 @@ +#!/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 LinuxKernelTest, Asset +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test.utils import gzip_uncompress + + +class MaltaMachineConsole(LinuxKernelTest): + + 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 self.extract_from_deb(deb_path, + '/boot/vmlinux-2.6.32-5-4kc-ma= lta') + + self.set_machine('malta') + 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) + + 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 self.extract_from_deb(deb_path, + '/boot/vmlinux-4.5.0-2-4kc-mal= ta') + 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 (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() + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725971963; cv=none; d=zohomail.com; s=zohoarc; b=KuvT0ZnYztzeR0iHIuYHteN9GTH7HWzybZxGBav4cneDRtSZFAY4Z2stZq6N7IKSGHW2etevrqdS7NnBO2NWjnalV6Pi1mHwBx81u5P9F2otGp46WgrOO79XwOxRX6P2/G1UnBZbOTQ+RZ/al5bkrfTuonhN/PNCsyO8xOAJqPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971963; 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=gYCAB72LIDObuhz/xyvGtFtfuzS2OWK9xytfOq+zwyI=; b=mkTJNt/FIKLN+Vzs+0sN6fxAgnTkq0OQ3k/9Leeg+dCp5/1mr8Ve704Sa5A2WAUdSlun1sJ85g1qShnAw5qSUBCGS5NSe+mD57+vSjk1T3QQ/4kKAdXifqfECTlD3AGudvdBGtYU1GQ29uwQ+tHX8dKrYtbsd8p3wb/uZwiwvis= 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 1725971963555136.74678037870717; Tue, 10 Sep 2024 05:39:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08V-0004Nz-Hw; Tue, 10 Sep 2024 08:38:24 -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 1so08S-0003ya-Ru for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:21 -0400 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 1so08K-0005BX-UM for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:20 -0400 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-605-fePW1AxgNJedXonqmtbv8Q-1; Tue, 10 Sep 2024 08:38:05 -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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AB0991956083; Tue, 10 Sep 2024 12:38:04 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E51B219560AD; Tue, 10 Sep 2024 12:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971888; 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=gYCAB72LIDObuhz/xyvGtFtfuzS2OWK9xytfOq+zwyI=; b=aX1lMYakjX1anN8GouJGUQuRWPljr9A3nObAs4pInPBQ4lIpK4G5VouZblCvhMBCPNELYP UGDCLOWWEpffbBoZ+aVc94fne2nR0tOvBZBMwOql85Es+dKPBMaCA7mn1egBKlgu2+ry14 MdQTONVeLL6dxsJNAs6aXXaXhGGkmL0= X-MC-Unique: fePW1AxgNJedXonqmtbv8Q-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 15/22] tests/functional: Convert ARM Raspi2 avocado tests Date: Tue, 10 Sep 2024 14:37:16 +0200 Message-ID: <20240910123726.182975-16-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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 @redhat.com) X-ZM-MESSAGEID: 1725971965020116600 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: <20240826221058.75126-3-philmd@linaro.org> [thuth: Use LinuxKernelTest class] Message-ID: <20240906180549.792832-10-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 85 -------------------------- tests/functional/meson.build | 1 + tests/functional/test_arm_raspi2.py | 95 +++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 85 deletions(-) create mode 100755 tests/functional/test_arm_raspi2.py diff --git a/MAINTAINERS b/MAINTAINERS index 6e0044ab58..3cc9c19d02 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -911,6 +911,7 @@ F: hw/*/bcm283* F: include/hw/arm/rasp* F: include/hw/*/bcm283* F: docs/system/arm/raspi.rst +F: tests/functional/test_arm_raspi2.py =20 Real View M: Peter Maydell diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index e3e4576099..827a286429 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -203,91 +203,6 @@ def test_arm_emcraft_sf2(self): exec_command_and_wait_for_pattern(self, 'ping -c 3 10.0.2.2', '3 packets transmitted, 3 packets received, 0% packet loss') =20 - def do_test_arm_raspi2(self, uart_id): - """ - :avocado: tags=3Daccel:tcg - - The kernel can be rebuilt using the kernel source referenced - and following the instructions on the on: - https://www.raspberrypi.org/documentation/linux/kernel/building.md - """ - serial_kernel_cmdline =3D { - 0: 'earlycon=3Dpl011,0x3f201000 console=3DttyAMA0', - } - deb_url =3D ('http://archive.raspberrypi.org/debian/' - 'pool/main/r/raspberrypi-firmware/' - 'raspberrypi-kernel_1.20190215-1_armhf.deb') - deb_hash =3D 'cd284220b32128c5084037553db3c482426f3972' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') - dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - serial_kernel_cmdline[uart_id] + - ' root=3D/dev/mmcblk0p2 rootwait ' + - 'dwc_otg.fiq_fsm_enable=3D0') - self.vm.add_args('-kernel', kernel_path, - '-dtb', dtb_path, - '-append', kernel_command_line, - '-device', 'usb-kbd') - self.vm.launch() - console_pattern =3D 'Kernel command line: %s' % kernel_command_line - self.wait_for_console_pattern(console_pattern) - console_pattern =3D 'Product: QEMU USB Keyboard' - self.wait_for_console_pattern(console_pattern) - - def test_arm_raspi2_uart0(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:raspi2b - :avocado: tags=3Ddevice:pl011 - :avocado: tags=3Daccel:tcg - """ - self.do_test_arm_raspi2(0) - - def test_arm_raspi2_initrd(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:raspi2b - """ - deb_url =3D ('http://archive.raspberrypi.org/debian/' - 'pool/main/r/raspberrypi-firmware/' - 'raspberrypi-kernel_1.20190215-1_armhf.deb') - deb_hash =3D 'cd284220b32128c5084037553db3c482426f3972' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') - dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') - - initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' - '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' - 'arm/rootfs-armv7a.cpio.gz') - initrd_hash =3D '604b2e45cdf35045846b8bbfbf2129b1891bdc9c' - 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=3Dpl011,0x3f201000 console=3DttyA= MA0 ' - 'panic=3D-1 noreboot ' + - 'dwc_otg.fiq_fsm_enable=3D0') - 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', - 'BCM2835') - exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - '/soc/cprman@7e101000') - exec_command_and_wait_for_pattern(self, 'halt', 'reboot: System ha= lted') - # Wait for VM to shut down gracefully - self.vm.wait() - def test_arm_raspi4(self): """ :avocado: tags=3Darch:aarch64 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index eb2de2a8fd..ff3fe7981e 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -42,6 +42,7 @@ tests_aarch64_system_thorough =3D [ tests_arm_system_thorough =3D [ 'arm_canona1100', 'arm_integratorcp', + 'arm_raspi2', ] =20 tests_arm_linuxuser_thorough =3D [ diff --git a/tests/functional/test_arm_raspi2.py b/tests/functional/test_ar= m_raspi2.py new file mode 100755 index 0000000000..3bf079dc4d --- /dev/null +++ b/tests/functional/test_arm_raspi2.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on a Raspberry Pi machine +# and checks the console +# +# Copyright (c) 2019 Philippe Mathieu-Daud=C3=A9 +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import LinuxKernelTest, Asset +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test.utils import gzip_uncompress + + +class ArmRaspi2Machine(LinuxKernelTest): + + ASSET_KERNEL_20190215 =3D Asset( + ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20190215-1_armhf.deb'), + '9f1759f7228113da24f5ee2aa6312946ec09a83e076aba9406c46ff776dfb291') + + ASSET_INITRD =3D Asset( + ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' + 'arm/rootfs-armv7a.cpio.gz'), + '2c8dbdb16ea7af2dfbcbea96044dde639fb07d09fd3c4fb31f2027ef71e55ddd') + + def do_test_arm_raspi2(self, uart_id): + """ + The kernel can be rebuilt using the kernel source referenced + and following the instructions on the on: + https://www.raspberrypi.org/documentation/linux/kernel/building.md + """ + serial_kernel_cmdline =3D { + 0: 'earlycon=3Dpl011,0x3f201000 console=3DttyAMA0', + } + deb_path =3D self.ASSET_KERNEL_20190215.fetch() + kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') + dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') + + self.set_machine('raspi2b') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + serial_kernel_cmdline[uart_id] + + ' root=3D/dev/mmcblk0p2 rootwait ' + + 'dwc_otg.fiq_fsm_enable=3D0') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line, + '-device', 'usb-kbd') + self.vm.launch() + + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + self.wait_for_console_pattern('Product: QEMU USB Keyboard') + + def test_arm_raspi2_uart0(self): + self.do_test_arm_raspi2(0) + + def test_arm_raspi2_initrd(self): + deb_path =3D self.ASSET_KERNEL_20190215.fetch() + kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') + dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') + 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('raspi2b') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dpl011,0x3f201000 console=3DttyA= MA0 ' + 'panic=3D-1 noreboot ' + + 'dwc_otg.fiq_fsm_enable=3D0') + 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', + 'BCM2835') + exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', + '/soc/cprman@7e101000') + exec_command_and_wait_for_pattern(self, 'halt', 'reboot: System ha= lted') + # Wait for VM to shut down gracefully + self.vm.wait() + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972100; cv=none; d=zohomail.com; s=zohoarc; b=cX8a7KezECuv1L4M0EKM0qspDgFgE+nOqrlsUKFtMsTjl8IWmUZvh8mT9oF+VD/FdlvJEsT0xuVN6e5hmhwVRZaNBtOqSHQOEsipBUPS+NVLOymh/WJhWTbpgz17JQ5uYqZAZpySBSQFwU49MH2eB310gxPBbkC3thseTselixs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972100; 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=SwPTIzHpUeoFawqSwrNeTP5ILEUDpSh3nsV9yz+gTEc=; b=NgvsPeGlHYTlHwPDi6S4i3JQmEqp8Xi2rkhsB7+iSEcZccftPxRWqDHfECQzcmPB2arYC6DvIYoIwJYMESTJzBk+1Jf7eu909eGdS2uf286RVZZKlj1D3t4W46O7vlH+c18MHw35b5wCfl1kRa7u3+wz1VKD+kIIkS4KRLKxf20= 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 1725972100587704.0567127900749; Tue, 10 Sep 2024 05:41:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08X-0004oW-PJ; Tue, 10 Sep 2024 08:38:25 -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 1so08T-00048j-Ol for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:21 -0400 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 1so08L-0005Br-SA for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:21 -0400 Received: from mx-prod-mc-04.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-119-efpwD4y9MfiHJyMqozripg-1; Tue, 10 Sep 2024 08:38:08 -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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 429B01955D62; Tue, 10 Sep 2024 12:38:07 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 66C3019560B0; Tue, 10 Sep 2024 12:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971891; 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=SwPTIzHpUeoFawqSwrNeTP5ILEUDpSh3nsV9yz+gTEc=; b=IZipdZE4S5tdnS9Dh9fz6P/iLX1YjyR2FzniZJlLdZavYStq9ZmobJgCHCddhpGJM2BdYE R26VALM/1wz/CButXcL69La0S3NvUFPqVqGx9irDLXKJOBMhgC7wdSa77aIhw/s+qQg/PL LlvD3zcG9LCQvqsGdA5GchB0eYRJfhs= X-MC-Unique: efpwD4y9MfiHJyMqozripg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 16/22] tests/functional: Convert Aarch64 Raspi3 avocado tests Date: Tue, 10 Sep 2024 14:37:17 +0200 Message-ID: <20240910123726.182975-17-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725972101462116600 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: <20240826221058.75126-4-philmd@linaro.org> [thuth: Use the LinuxKernelTest class] Message-ID: <20240906180549.792832-11-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 23 -------------- tests/functional/meson.build | 1 + tests/functional/test_aarch64_raspi3.py | 41 +++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 23 deletions(-) create mode 100755 tests/functional/test_aarch64_raspi3.py diff --git a/MAINTAINERS b/MAINTAINERS index 3cc9c19d02..828c469478 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -912,6 +912,7 @@ F: include/hw/arm/rasp* F: include/hw/*/bcm283* F: docs/system/arm/raspi.rst F: tests/functional/test_arm_raspi2.py +F: tests/functional/test_aarch64_raspi3.py =20 Real View M: Peter Maydell diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 827a286429..e4caf34379 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -979,29 +979,6 @@ def test_arm_orangepi_uboot_netbsd9(self): # Wait for user-space wait_for_console_pattern(self, 'Starting root file system check') =20 - def test_aarch64_raspi3_atf(self): - """ - :avocado: tags=3Daccel:tcg - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:raspi3b - :avocado: tags=3Dcpu:cortex-a53 - :avocado: tags=3Ddevice:pl011 - :avocado: tags=3Datf - """ - zip_url =3D ('https://github.com/pbatard/RPi3/releases/download/' - 'v1.15/RPi3_UEFI_Firmware_v1.15.zip') - zip_hash =3D '74b3bd0de92683cadb14e008a7575e1d0c3cafb9' - zip_path =3D self.fetch_asset(zip_url, asset_hash=3Dzip_hash) - - archive.extract(zip_path, self.workdir) - efi_fd =3D os.path.join(self.workdir, 'RPI_EFI.fd') - - self.vm.set_console(console_index=3D1) - self.vm.add_args('-nodefaults', - '-device', 'loader,file=3D%s,force-raw=3Dtrue' % = efi_fd) - self.vm.launch() - self.wait_for_console_pattern('version UEFI Firmware v1.15') - def test_alpha_clipper(self): """ :avocado: tags=3Darch:alpha diff --git a/tests/functional/meson.build b/tests/functional/meson.build index ff3fe7981e..35eebbe9b9 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -35,6 +35,7 @@ tests_generic_bsduser =3D [ ] =20 tests_aarch64_system_thorough =3D [ + 'aarch64_raspi3', 'aarch64_sbsaref', 'aarch64_virt', ] diff --git a/tests/functional/test_aarch64_raspi3.py b/tests/functional/tes= t_aarch64_raspi3.py new file mode 100755 index 0000000000..369f95a3d9 --- /dev/null +++ b/tests/functional/test_aarch64_raspi3.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on a Raspberry Pi machine +# and checks the console +# +# Copyright (c) 2020 Philippe Mathieu-Daud=C3=A9 +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +from zipfile import ZipFile + +from qemu_test import LinuxKernelTest, Asset + + +class Aarch64Raspi3Machine(LinuxKernelTest): + + ASSET_RPI3_UEFI =3D Asset( + ('https://github.com/pbatard/RPi3/releases/download/' + 'v1.15/RPi3_UEFI_Firmware_v1.15.zip'), + '8cff2e979560048b4c84921f41a91893240b9fb71a88f0b5c5d6c8edd994bd5b') + + def test_aarch64_raspi3_atf(self): + efi_name =3D 'RPI_EFI.fd' + zip_path =3D self.ASSET_RPI3_UEFI.fetch() + + with ZipFile(zip_path, 'r') as zf: + zf.extract(efi_name, path=3Dself.workdir) + efi_fd =3D os.path.join(self.workdir, efi_name) + + self.set_machine('raspi3b') + self.vm.set_console(console_index=3D1) + self.vm.add_args('-cpu', 'cortex-a53', + '-nodefaults', + '-device', f'loader,file=3D{efi_fd},force-raw=3Dt= rue') + self.vm.launch() + self.wait_for_console_pattern('version UEFI Firmware v1.15') + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725971990; cv=none; d=zohomail.com; s=zohoarc; b=cEv28pLHF5FL9FhppXmdJhrWnMtnROC6U0Im7JBiq1zh9ycPh3gCz+9yww4ZmJRTXlyc/T2BlG2vuBjwi5anSKMLS2+QOzX/1yMr2kWC0qo9uy4ArbE9vtPBLDKebhgvvF4yayS3TAAzMM0NNcZVfi0frQ27Rsc0R5aQHLymtmE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725971990; 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=LVaaTJLyg1RTdI2f1wGKW2XRJiJ9kTbEGsOe2P0JmTg=; b=PSd/GMu8oILoyIgffLoh1U+nka+nqxBUg0DHvBLKeiQzeCMDbOPCYdxN2bmuR77c4iERQGGsj10DIuh6OwX8AmnNW95Vg5oGHHjVFueyvnLZpOnsRjPz5Pb2MWElZ0h/9bG5Qz97aiHxcmw/MqkT+cmY/iLEz9NV8Ef/4jVRpwA= 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 1725971990441664.0226704114275; Tue, 10 Sep 2024 05:39:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08a-00050O-23; Tue, 10 Sep 2024 08:38:29 -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 1so08W-0004XP-0g for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:24 -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 1so08N-0005Bv-Ne for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:23 -0400 Received: from mx-prod-mc-04.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-508-iZPSThNEPEe1-aIs8CG02w-1; Tue, 10 Sep 2024 08:38:10 -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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 56BBB1954233; Tue, 10 Sep 2024 12:38:09 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C474B19560AB; Tue, 10 Sep 2024 12:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971891; 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=LVaaTJLyg1RTdI2f1wGKW2XRJiJ9kTbEGsOe2P0JmTg=; b=XvzRfRGF5oOqVhLIhWkLpvHLb17nbeKRaJCZ5p8u7/Ob0h+uMrLUDyKgKASzknedEdjGZ/ ntFWEZjlPtoGlJxXnIxK1MJBlNzJTG+cBtQVIsw6EWjpTxNIc/X5QbfZu016dahacCZugU YQS+DrNakz9R9t1RmP1sH15NVw7XdB4= X-MC-Unique: iZPSThNEPEe1-aIs8CG02w-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 17/22] tests/functional: Convert Aarch64 Raspi4 avocado tests Date: Tue, 10 Sep 2024 14:37:18 +0200 Message-ID: <20240910123726.182975-18-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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 @redhat.com) X-ZM-MESSAGEID: 1725971991172116600 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: <20240826221058.75126-5-philmd@linaro.org> [thuth: Use LinuxKernelTest class] Message-ID: <20240906180549.792832-12-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 97 ------------------------ tests/functional/meson.build | 1 + tests/functional/test_aarch64_raspi4.py | 99 +++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 97 deletions(-) create mode 100755 tests/functional/test_aarch64_raspi4.py diff --git a/MAINTAINERS b/MAINTAINERS index 828c469478..c59f7b2538 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -913,6 +913,7 @@ F: include/hw/*/bcm283* F: docs/system/arm/raspi.rst F: tests/functional/test_arm_raspi2.py F: tests/functional/test_aarch64_raspi3.py +F: tests/functional/test_aarch64_raspi4.py =20 Real View M: Peter Maydell diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index e4caf34379..a8eac44d9f 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -203,103 +203,6 @@ def test_arm_emcraft_sf2(self): exec_command_and_wait_for_pattern(self, 'ping -c 3 10.0.2.2', '3 packets transmitted, 3 packets received, 0% packet loss') =20 - def test_arm_raspi4(self): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:raspi4b - :avocado: tags=3Ddevice:pl011 - :avocado: tags=3Daccel:tcg - :avocado: tags=3Drpi4b - - The kernel can be rebuilt using the kernel source referenced - and following the instructions on the on: - https://www.raspberrypi.org/documentation/linux/kernel/building.md - """ - - deb_url =3D ('http://archive.raspberrypi.org/debian/' - 'pool/main/r/raspberrypi-firmware/' - 'raspberrypi-kernel_1.20230106-1_arm64.deb') - deb_hash =3D '08dc55696535b18a6d4fe6fa10d4c0d905cbb2ed' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel8.img= ') - dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2711-rpi-4-= b.dtb') - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'earlycon=3Dpl011,mmio32,0xfe201000 ' + - 'console=3DttyAMA0,115200 ' + - 'root=3D/dev/mmcblk1p2 rootwait ' + - 'dwc_otg.fiq_fsm_enable=3D0') - self.vm.add_args('-kernel', kernel_path, - '-dtb', dtb_path, - '-append', kernel_command_line) - # When PCI is supported we can add a USB controller: - # '-device', 'qemu-xhci,bus=3Dpcie.1,id=3Dxhci', - # '-device', 'usb-kbd,bus=3Dxhci.0', - self.vm.launch() - console_pattern =3D 'Kernel command line: %s' % kernel_command_line - self.wait_for_console_pattern(console_pattern) - # When USB is enabled we can look for this - # console_pattern =3D 'Product: QEMU USB Keyboard' - # self.wait_for_console_pattern(console_pattern) - console_pattern =3D 'Waiting for root device' - self.wait_for_console_pattern(console_pattern) - - - def test_arm_raspi4_initrd(self): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:raspi4b - :avocado: tags=3Ddevice:pl011 - :avocado: tags=3Daccel:tcg - :avocado: tags=3Drpi4b - - The kernel can be rebuilt using the kernel source referenced - and following the instructions on the on: - https://www.raspberrypi.org/documentation/linux/kernel/building.md - """ - deb_url =3D ('http://archive.raspberrypi.org/debian/' - 'pool/main/r/raspberrypi-firmware/' - 'raspberrypi-kernel_1.20230106-1_arm64.deb') - deb_hash =3D '08dc55696535b18a6d4fe6fa10d4c0d905cbb2ed' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel8.img= ') - dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2711-rpi-4-= b.dtb') - - initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' - '86b2be1384d41c8c388e63078a847f1e1c4cb1de/rootfs/' - 'arm64/rootfs.cpio.gz') - initrd_hash =3D 'f3d4f9fa92a49aa542f1b44d34be77bbf8ca5b9d' - 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=3Dpl011,mmio32,0xfe201000 ' + - 'console=3DttyAMA0,115200 ' + - 'panic=3D-1 noreboot ' + - 'dwc_otg.fiq_fsm_enable=3D0') - self.vm.add_args('-kernel', kernel_path, - '-dtb', dtb_path, - '-initrd', initrd_path, - '-append', kernel_command_line, - '-no-reboot') - # When PCI is supported we can add a USB controller: - # '-device', 'qemu-xhci,bus=3Dpcie.1,id=3Dxhci', - # '-device', 'usb-kbd,bus=3Dxhci.0', - self.vm.launch() - self.wait_for_console_pattern('Boot successful.') - - exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', - 'BCM2835') - exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', - 'cprman@7e101000') - exec_command_and_wait_for_pattern(self, 'halt', 'reboot: System ha= lted') - # TODO: Raspberry Pi4 doesn't shut down properly with recent kerne= ls - # Wait for VM to shut down gracefully - #self.vm.wait() - def test_arm_exynos4210_initrd(self): """ :avocado: tags=3Darch:arm diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 35eebbe9b9..a79083b0f9 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -36,6 +36,7 @@ tests_generic_bsduser =3D [ =20 tests_aarch64_system_thorough =3D [ 'aarch64_raspi3', + 'aarch64_raspi4', 'aarch64_sbsaref', 'aarch64_virt', ] diff --git a/tests/functional/test_aarch64_raspi4.py b/tests/functional/tes= t_aarch64_raspi4.py new file mode 100755 index 0000000000..e5c9f77479 --- /dev/null +++ b/tests/functional/test_aarch64_raspi4.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on a Raspberry Pi machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import LinuxKernelTest, Asset +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test.utils import gzip_uncompress + + +class Aarch64Raspi4Machine(LinuxKernelTest): + + """ + The kernel can be rebuilt using the kernel source referenced + and following the instructions on the on: + https://www.raspberrypi.org/documentation/linux/kernel/building.md + """ + ASSET_KERNEL_20190215 =3D Asset( + ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20230106-1_arm64.deb'), + '56d5713c8f6eee8a0d3f0e73600ec11391144fef318b08943e9abd94c0a9baf7') + + ASSET_INITRD =3D Asset( + ('https://github.com/groeck/linux-build-test/raw/' + '86b2be1384d41c8c388e63078a847f1e1c4cb1de/rootfs/' + 'arm64/rootfs.cpio.gz'), + '7c0b16d1853772f6f4c3ca63e789b3b9ff4936efac9c8a01fb0c98c05c7a7648') + + def test_arm_raspi4(self): + deb_path =3D self.ASSET_KERNEL_20190215.fetch() + kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel8.img= ') + dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2711-rpi-4-= b.dtb') + + self.set_machine('raspi4b') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dpl011,mmio32,0xfe201000 ' + + 'console=3DttyAMA0,115200 ' + + 'root=3D/dev/mmcblk1p2 rootwait ' + + 'dwc_otg.fiq_fsm_enable=3D0') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line) + # When PCI is supported we can add a USB controller: + # '-device', 'qemu-xhci,bus=3Dpcie.1,id=3Dxhci', + # '-device', 'usb-kbd,bus=3Dxhci.0', + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + # When USB is enabled we can look for this + # console_pattern =3D 'Product: QEMU USB Keyboard' + # self.wait_for_console_pattern(console_pattern) + console_pattern =3D 'Waiting for root device' + self.wait_for_console_pattern(console_pattern) + + + def test_arm_raspi4_initrd(self): + deb_path =3D self.ASSET_KERNEL_20190215.fetch() + kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel8.img= ') + dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2711-rpi-4-= b.dtb') + 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('raspi4b') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dpl011,mmio32,0xfe201000 ' + + 'console=3DttyAMA0,115200 ' + + 'panic=3D-1 noreboot ' + + 'dwc_otg.fiq_fsm_enable=3D0') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + # When PCI is supported we can add a USB controller: + # '-device', 'qemu-xhci,bus=3Dpcie.1,id=3Dxhci', + # '-device', 'usb-kbd,bus=3Dxhci.0', + self.vm.launch() + self.wait_for_console_pattern('Boot successful.') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'BCM2835') + exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', + 'cprman@7e101000') + exec_command_and_wait_for_pattern(self, 'halt', 'reboot: System ha= lted') + # TODO: Raspberry Pi4 doesn't shut down properly with recent kerne= ls + # Wait for VM to shut down gracefully + #self.vm.wait() + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972069; cv=none; d=zohomail.com; s=zohoarc; b=ktPtQfbQSVqkIt20fqbFpc9zZSr4O6BfYNm0f6Tdyb78My/UB2Rn2QZQJN9fxgBTE7eP6INGLjVmWefsE030Uxim5oTdrIxals+f0j7gEZ6fnsaxaWx2hQYd7jVWSh6Oh3VlfZG/S68xs2QU/QQXIP5tPHkcJL6RlrVUgAHk+dE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972069; 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=Ml1r1n6NPK0zJab7LZ/SZK7JH5cfPmS5xxctirOPnCI=; b=Ov8OJMx1NBCRAj1HEbdptCpz9psWMWG2UwQpKM8Y/6E/JbEEEXoLx9wRLCZVdsChByFDSdlu9CkOHvIw+EWLjtISatTSEM/WqbA/hjrWJ9cSz3ap+yjI47u+eYxl9dN7znxBqkBs8B9lLOWQcCugQDldAQAPtdCfkBt8B9uuWHc= 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 1725972069938957.6520672260792; Tue, 10 Sep 2024 05:41:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08d-0005ZO-DB; Tue, 10 Sep 2024 08:38:31 -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 1so08X-0004kU-96 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:25 -0400 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 1so08S-0005CC-Ln for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:24 -0400 Received: from mx-prod-mc-04.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-247-_3f_rzHFOFu1uk_2fs5plg-1; Tue, 10 Sep 2024 08:38:13 -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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 068EE1944D24; Tue, 10 Sep 2024 12:38:12 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1C38719560AB; Tue, 10 Sep 2024 12:38:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971895; 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=Ml1r1n6NPK0zJab7LZ/SZK7JH5cfPmS5xxctirOPnCI=; b=CWjsHIeMiBClwsCcdrIyfRf1pV0Xo3gW0cCtXlwzsDV6J4mzYCUIkbCKTMcyw3IqmEuoM0 4bJjdKutSlpqdChuObA6yTwPOxInx0Pgo22+EzIRaFo5VNcCBowDzWaV7tIm/6E7g4RDNv D/BxlnrtVx37QJo1SglTvyhmFzRbzk4= X-MC-Unique: _3f_rzHFOFu1uk_2fs5plg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 18/22] tests/functional: Convert the Alpha Clipper Avocado test Date: Tue, 10 Sep 2024 14:37:19 +0200 Message-ID: <20240910123726.182975-19-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725972071380116600 Straight forward conversion, just switch to SHA256 hashsum now. Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240906180549.792832-13-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 21 -------------- tests/functional/meson.build | 4 +++ tests/functional/test_alpha_clipper.py | 38 ++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 21 deletions(-) create mode 100755 tests/functional/test_alpha_clipper.py diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index a8eac44d9f..75aab90320 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -882,27 +882,6 @@ def test_arm_orangepi_uboot_netbsd9(self): # Wait for user-space wait_for_console_pattern(self, 'Starting root file system check') =20 - def test_alpha_clipper(self): - """ - :avocado: tags=3Darch:alpha - :avocado: tags=3Dmachine:clipper - """ - kernel_url =3D ('http://archive.debian.org/debian/dists/lenny/main= /' - 'installer-alpha/20090123lenny10/images/cdrom/vmlinu= z') - kernel_hash =3D '3a943149335529e2ed3e74d0d787b85fb5671ba3' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - - uncompressed_kernel =3D archive.uncompress(kernel_path, self.workd= ir) - - self.vm.set_console() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' - self.vm.add_args('-nodefaults', - '-kernel', uncompressed_kernel, - '-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 do_test_advcal_2018(self, day, tar_hash, kernel_name, console=3D0): tar_url =3D ('https://qemu-advcal.gitlab.io' '/qac-best-of-multiarch/download/day' + day + '.tar.xz') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index a79083b0f9..e1903132a1 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -41,6 +41,10 @@ tests_aarch64_system_thorough =3D [ 'aarch64_virt', ] =20 +tests_alpha_system_thorough =3D [ + 'alpha_clipper', +] + tests_arm_system_thorough =3D [ 'arm_canona1100', 'arm_integratorcp', diff --git a/tests/functional/test_alpha_clipper.py b/tests/functional/test= _alpha_clipper.py new file mode 100755 index 0000000000..c1fbf0e395 --- /dev/null +++ b/tests/functional/test_alpha_clipper.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on an Alpha Clipper machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import gzip_uncompress + + +class AlphaClipperTest(LinuxKernelTest): + + ASSET_KERNEL =3D Asset( + ('http://archive.debian.org/debian/dists/lenny/main/' + 'installer-alpha/20090123lenny10/images/cdrom/vmlinuz'), + '34f53da3fa32212e4f00b03cb944b2ad81c06bc8faaf9b7193b2e544ceeca576') + + def test_alpha_clipper(self): + self.set_machine('clipper') + kernel_path =3D self.ASSET_KERNEL.fetch() + + uncompressed_kernel =3D os.path.join(self.workdir, 'vmlinux') + gzip_uncompress(kernel_path, uncompressed_kernel) + + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' + self.vm.add_args('-nodefaults', + '-kernel', uncompressed_kernel, + '-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.46.0 From nobody Sun Nov 24 06:46:06 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=1725972010; cv=none; d=zohomail.com; s=zohoarc; b=Fze6vurksBnSVqlmFGsP2b4+6MHV1OAF9KAm4OKXlapYhPY8VXxl0j0amSoe4sL0WoYspGRkHWtxjIrL8zDpZSobwGsrEX8Din7K7lX39z7sqR5r5WlWnrYT9wIr3TtwcGkTtmrY/QsdESrJN5/iNWVeNbjDVRmIAZnCp+y67U0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972010; 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=E6W6qQbFxPETSgvz8itblR9VzVlS/skfk6suD/TMBUw=; b=lMdrNOLcD3YENASAT/Jq+QafddgQXgBUDDFDz4a/qz1Et19BmBqySwG5gbg5aJbCehZXWVaefPBkVn1M9NKAh3wFU9uhE45mtMP05ruPJjG9XpXqJipbN0vf/qDGAZ7f3s3T4FDaERBJg0uVkrFJZ3e3VklWsjGqQU2w4hMawSs= 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 1725972010629658.5610880421686; Tue, 10 Sep 2024 05:40:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08b-0005Jv-2q; Tue, 10 Sep 2024 08:38:29 -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 1so08Y-0004wk-J2 for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:26 -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 1so08R-0005CI-Dx for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:26 -0400 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-588-laR5GFZiNnmwSsMy_cgD3g-1; Tue, 10 Sep 2024 08:38:15 -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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DF78919371DF; Tue, 10 Sep 2024 12:38:14 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EE6B719560AB; Tue, 10 Sep 2024 12:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971897; 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=E6W6qQbFxPETSgvz8itblR9VzVlS/skfk6suD/TMBUw=; b=GwleTXg522kSoUioH0viCaLirRjQhpCbt9YX7AzpBtCfa4tKDUtTUHJXgf9pK7KzWKMeAr SmAvftkBoqxfEfNPO7mKMdVUzIc8J3D4wacueEGwX/Osl+YZ7fJ8aH5IwkEOvkbCe43tSz sTkMvs7RPKlaywrbvyG/xAF5dC0OkiE= X-MC-Unique: laR5GFZiNnmwSsMy_cgD3g-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 19/22] tests/functional: Convert the m68k MCF5208EVB Avocado test Date: Tue, 10 Sep 2024 14:37:20 +0200 Message-ID: <20240910123726.182975-20-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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 @redhat.com) X-ZM-MESSAGEID: 1725972011276116600 We've got to do_test_advcal_2018() here now that the test resides in a separate file. Also switch back to the original URL (since the site did not vanish as originally expected) and update the hashsum to use SHA256. Message-ID: <20240906180549.792832-14-thuth@redhat.com> Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 8 ------- tests/functional/meson.build | 1 + tests/functional/test_m68k_mcf5208evb.py | 29 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 8 deletions(-) create mode 100755 tests/functional/test_m68k_mcf5208evb.py diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 75aab90320..db72bd1b5e 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -927,14 +927,6 @@ def test_arm_ast2600_debian(self): self.wait_for_console_pattern("SMP: Total of 2 processors activate= d") self.wait_for_console_pattern("No filesystem could mount root") =20 - def test_m68k_mcf5208evb(self): - """ - :avocado: tags=3Darch:m68k - :avocado: tags=3Dmachine:mcf5208evb - """ - tar_hash =3D 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c' - self.do_test_advcal_2018('07', tar_hash, 'sanity-clause.elf') - def test_or1k_sim(self): """ :avocado: tags=3Darch:or1k diff --git a/tests/functional/meson.build b/tests/functional/meson.build index e1903132a1..8f9694244f 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -64,6 +64,7 @@ tests_loongarch64_system_thorough =3D [ ] =20 tests_m68k_system_thorough =3D [ + 'm68k_mcf5208evb', 'm68k_nextcube', 'm68k_q800', ] diff --git a/tests/functional/test_m68k_mcf5208evb.py b/tests/functional/te= st_m68k_mcf5208evb.py new file mode 100755 index 0000000000..869ccc88df --- /dev/null +++ b/tests/functional/test_m68k_mcf5208evb.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on an MCF5208EVB machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract + +class Mcf5208EvbTest(LinuxKernelTest): + + ASSET_DAY07 =3D Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day07.tar.xz', + '753c2f3837126b7c6ba92d0b1e0b156e8a2c5131d2d576bb0b9a763fae73c08a') + + def test_m68k_mcf5208evb(self): + self.set_machine('mcf5208evb') + file_path =3D self.ASSET_DAY07.fetch() + archive_extract(file_path, self.workdir) + self.vm.set_console() + self.vm.add_args('-kernel', self.workdir + '/day07/sanity-clause.e= lf') + self.vm.launch() + self.wait_for_console_pattern('QEMU advent calendar') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972094; cv=none; d=zohomail.com; s=zohoarc; b=iiBVwDZWpFsZ6g3DATOfc3dOMNSjDOgevgOPrR0i5ihRXZ5SQtdoc8T9N1mrTPn51Lks18ziEt3A4d4PbwbqSTK3o/Wa8edKCLv/OOaV+Hc1FiohdddZtKTlNKDfJlKYmYqOT15sbVWtoMEtUf0ZbiWQhQsZpBLMiaaCqOLccPI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972094; 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=8LFdB5bbo8drVbeu9wGKXLxGCcC3FGGUb/ed9H9Aj78=; b=FLpv2m8DAHaWWGFqw3IkXs+ihCd5WbgfLuU5s1oq4ikGJkU16deDpGazg2IHVjRwyzWQ3NIbxURxppZ6KgRA4VPU+FPCItvBemCtY5mzcTGGQJZZ1KMpi+b2TGG0hWAjL49wVfi1QfmVQvtQcqM97wIV7zqjOGxf2U+kmt6yyQ8= 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 1725972094494356.61554248806806; Tue, 10 Sep 2024 05:41:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08h-000646-ET; Tue, 10 Sep 2024 08:38:35 -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 1so08d-0005mA-VO for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:32 -0400 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 1so08X-0005Cp-4J for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:31 -0400 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-601-6-vi0kXLPO6ikXw1IPSqDw-1; Tue, 10 Sep 2024 08:38:19 -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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5CA721955F3C; Tue, 10 Sep 2024 12:38:17 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8DDC219560AB; Tue, 10 Sep 2024 12:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971900; 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=8LFdB5bbo8drVbeu9wGKXLxGCcC3FGGUb/ed9H9Aj78=; b=XYDYmehSNLV7gSS55ZGV5GRwtHDDpsss1/Zsmebp3PVrNFeTSSfrMl435cTsyFt1HynCve td/AbJOUraP9JBcOqKpTHtK8eqHTtENSI98owyUln5CY/pcDkeldcmZ4iDPw2oPW6vHKl9 xN/r5BPL2DPkMBtg1XTfu3MVEfAebJg= X-MC-Unique: 6-vi0kXLPO6ikXw1IPSqDw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 20/22] tests/functional: Convert the or1k-sim Avocado test Date: Tue, 10 Sep 2024 14:37:21 +0200 Message-ID: <20240910123726.182975-21-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H3=0.001, RCVD_IN_MSPIKE_WL=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: 1725972095468116600 We've got to do_test_advcal_2018() here now that the test resides in a separate file. Also switch back to the original URL (since the site did not vanish as originally expected) and update the hashsum to use SHA256. Message-ID: <20240906180549.792832-15-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 8 -------- tests/functional/meson.build | 4 ++++ tests/functional/test_or1k_sim.py | 29 +++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 8 deletions(-) create mode 100755 tests/functional/test_or1k_sim.py diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index db72bd1b5e..6c50284986 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -927,14 +927,6 @@ def test_arm_ast2600_debian(self): self.wait_for_console_pattern("SMP: Total of 2 processors activate= d") self.wait_for_console_pattern("No filesystem could mount root") =20 - def test_or1k_sim(self): - """ - :avocado: tags=3Darch:or1k - :avocado: tags=3Dmachine:or1k-sim - """ - tar_hash =3D '20334cdaf386108c530ff0badaecc955693027dd' - self.do_test_advcal_2018('20', tar_hash, 'vmlinux') - def test_ppc64_e500(self): """ :avocado: tags=3Darch:ppc64 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 8f9694244f..68a7570119 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -94,6 +94,10 @@ tests_mips64el_system_thorough =3D [ 'mips64el_malta', ] =20 +tests_or1k_system_quick =3D [ + 'or1k_sim', +] + tests_ppc_system_quick =3D [ 'ppc_74xx', ] diff --git a/tests/functional/test_or1k_sim.py b/tests/functional/test_or1k= _sim.py new file mode 100755 index 0000000000..aa2a1f08d2 --- /dev/null +++ b/tests/functional/test_or1k_sim.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on an OpenRISC-1000 SIM machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract + +class OpenRISC1kSimTest(LinuxKernelTest): + + ASSET_DAY20 =3D Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day20.tar.xz', + 'ff9d7dd7c6bdba325bd85ee85c02db61ff653e129558aeffe6aff55bffb6763a') + + def test_or1k_sim(self): + self.set_machine('or1k-sim') + file_path =3D self.ASSET_DAY20.fetch() + archive_extract(file_path, self.workdir) + self.vm.set_console() + self.vm.add_args('-kernel', self.workdir + '/day20/vmlinux') + self.vm.launch() + self.wait_for_console_pattern('QEMU advent calendar') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972073; cv=none; d=zohomail.com; s=zohoarc; b=iKzY6qDw68jAkffwLkH3cUA/V9R2KawGOx2EcON15MNePN3aASUEKoBMNjz8o6U5/Wb1LKYAn9F95SBxPpkz/9VGeNNtZ30dWnuQUI1OuF/d+jU+1fjKBKW+9E2zGsAUe92sorTkprJMY0yoi25/t/L8WLNrBJJJOUZrDcYABfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972073; 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=DYI+9/ae6UALXw/L/jFSJ+sER/OsDhTgB9LPNW5DXsM=; b=Msur5y5L6+0or/QNrkxg+Dnt5Ie2bO166KUZ5NCPrcJkI0JInmjVb3M2g/PIxe6s6WtS0F4B0iM9pE13hiYc/yFAGrDe0Pabm4mwfUIpdi/QxCZ18z35wf8oWnfMUNFMt7b1Yv78XOxn2wYQsfF+svkjagngHRg+4v0RM8FS+YA= 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 1725972073501267.1354199297541; Tue, 10 Sep 2024 05:41:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08i-0006LD-QH; Tue, 10 Sep 2024 08:38:36 -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 1so08g-00063E-7c for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:34 -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 1so08Y-0005DC-UN for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:33 -0400 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-126-7TBn1NF9Nf6DjAfr_CBoLQ-1; Tue, 10 Sep 2024 08:38:21 -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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1839619367BC; Tue, 10 Sep 2024 12:38:20 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 06C8919560AB; Tue, 10 Sep 2024 12:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971902; 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=DYI+9/ae6UALXw/L/jFSJ+sER/OsDhTgB9LPNW5DXsM=; b=NUXtjDtFmtMSHKGXLgmWk50k7p/EAgrCxCbDdJ1Lj62viZFdQ0+XAyYyFLC/eEPe/niZEQ CtUbb8VTrzC5prG7XI8EB64l+5m6/WixWDXizw/B8AxZ6v6GX4ddcXbp3a5s01sdD7LhBC +cLHUyTOIc3pmB7FRDAshTBeGhyQpiA= X-MC-Unique: 7TBn1NF9Nf6DjAfr_CBoLQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 21/22] tests/functional: Convert the multiprocess avocado test into a standalone test Date: Tue, 10 Sep 2024 14:37:22 +0200 Message-ID: <20240910123726.182975-22-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-1-thuth@redhat.com> MIME-Version: 1.0 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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1725972075474116600 Content-Type: text/plain; charset="utf-8" This test handles both, aarch64 and x86_64, with the same test code (apart from some initial setup), so don't split this file by target but add a check for self.arch in the main test function. Message-ID: <20240903051333.102494-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 10 --- tests/avocado/multiprocess.py | 102 ------------------------- tests/functional/meson.build | 2 + tests/functional/test_multiprocess.py | 100 ++++++++++++++++++++++++ 4 files changed, 102 insertions(+), 112 deletions(-) delete mode 100644 tests/avocado/multiprocess.py create mode 100755 tests/functional/test_multiprocess.py diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py index 0e4ecea7a0..93c3460242 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -307,16 +307,6 @@ def require_netdev(self, netdevname): if netdevhelp.find('\n' + netdevname + '\n') < 0: self.cancel('no support for user networking') =20 - def require_multiprocess(self): - """ - Test for the presence of the x-pci-proxy-dev which is required - to support multiprocess. - """ - devhelp =3D run_cmd([self.qemu_bin, - '-M', 'none', '-device', 'help'])[0]; - if devhelp.find('x-pci-proxy-dev') < 0: - self.cancel('no support for multiprocess device emulation') - def _new_vm(self, name, *args): self._sd =3D tempfile.TemporaryDirectory(prefix=3D"qemu_") vm =3D QEMUMachine(self.qemu_bin, base_temp_dir=3Dself.workdir, diff --git a/tests/avocado/multiprocess.py b/tests/avocado/multiprocess.py deleted file mode 100644 index ee7490ae08..0000000000 --- a/tests/avocado/multiprocess.py +++ /dev/null @@ -1,102 +0,0 @@ -# Test for multiprocess qemu -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - - -import os -import socket - -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern -from avocado_qemu import exec_command -from avocado_qemu import exec_command_and_wait_for_pattern - -class Multiprocess(QemuSystemTest): - """ - :avocado: tags=3Dmultiprocess - """ - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' - - def do_test(self, kernel_url, kernel_hash, initrd_url, initrd_hash, - kernel_command_line, machine_type): - """Main test method""" - self.require_accelerator('kvm') - self.require_multiprocess() - - # Create socketpair to connect proxy and remote processes - proxy_sock, remote_sock =3D socket.socketpair(socket.AF_UNIX, - socket.SOCK_STREAM) - os.set_inheritable(proxy_sock.fileno(), True) - os.set_inheritable(remote_sock.fileno(), True) - - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - initrd_path =3D self.fetch_asset(initrd_url, asset_hash=3Dinitrd_h= ash) - - # Create remote process - remote_vm =3D self.get_vm() - remote_vm.add_args('-machine', 'x-remote') - remote_vm.add_args('-nodefaults') - remote_vm.add_args('-device', 'lsi53c895a,id=3Dlsi1') - remote_vm.add_args('-object', 'x-remote-object,id=3Drobj1,' - 'devid=3Dlsi1,fd=3D'+str(remote_sock.fileno())) - remote_vm.launch() - - # Create proxy process - self.vm.set_console() - self.vm.add_args('-machine', machine_type) - self.vm.add_args('-accel', 'kvm') - self.vm.add_args('-cpu', 'host') - self.vm.add_args('-object', - 'memory-backend-memfd,id=3Dsysmem-file,size=3D2G') - self.vm.add_args('--numa', 'node,memdev=3Dsysmem-file') - self.vm.add_args('-m', '2048') - self.vm.add_args('-kernel', kernel_path, - '-initrd', initrd_path, - '-append', kernel_command_line) - self.vm.add_args('-device', - 'x-pci-proxy-dev,' - 'id=3Dlsi1,fd=3D'+str(proxy_sock.fileno())) - self.vm.launch() - wait_for_console_pattern(self, 'as init process', - 'Kernel panic - not syncing') - exec_command(self, 'mount -t sysfs sysfs /sys') - exec_command_and_wait_for_pattern(self, - 'cat /sys/bus/pci/devices/*/ueve= nt', - 'PCI_ID=3D1000:0012') - - def test_multiprocess_x86_64(self): - """ - :avocado: tags=3Darch:x86_64 - """ - kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/31/Everything/x86_64/os/images' - '/pxeboot/vmlinuz') - kernel_hash =3D '5b6f6876e1b5bda314f93893271da0d5777b1f3c' - initrd_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/31/Everything/x86_64/os/images' - '/pxeboot/initrd.img') - initrd_hash =3D 'dd0340a1b39bd28f88532babd4581c67649ec5b1' - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyS0 rdinit=3D/bin/bash') - machine_type =3D 'pc' - self.do_test(kernel_url, kernel_hash, initrd_url, initrd_hash, - kernel_command_line, machine_type) - - def test_multiprocess_aarch64(self): - """ - :avocado: tags=3Darch:aarch64 - """ - kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/31/Everything/aarch64/os/images' - '/pxeboot/vmlinuz') - kernel_hash =3D '3505f2751e2833c681de78cee8dda1e49cabd2e8' - initrd_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/31/Everything/aarch64/os/images' - '/pxeboot/initrd.img') - initrd_hash =3D '519a1962daf17d67fc3a9c89d45affcb399607db' - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'rdinit=3D/bin/bash console=3DttyAMA0') - machine_type =3D 'virt,gic-version=3D3' - self.do_test(kernel_url, kernel_hash, initrd_url, initrd_hash, - kernel_command_line, machine_type) diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 68a7570119..975e609073 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -39,6 +39,7 @@ tests_aarch64_system_thorough =3D [ 'aarch64_raspi4', 'aarch64_sbsaref', 'aarch64_virt', + 'multiprocess', ] =20 tests_alpha_system_thorough =3D [ @@ -141,6 +142,7 @@ tests_x86_64_system_quick =3D [ tests_x86_64_system_thorough =3D [ 'acpi_bits', 'linux_initrd', + 'multiprocess', 'netdev_ethtool', 'virtio_gpu', ] diff --git a/tests/functional/test_multiprocess.py b/tests/functional/test_= multiprocess.py new file mode 100755 index 0000000000..751cf10e63 --- /dev/null +++ b/tests/functional/test_multiprocess.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python3 +# +# Test for multiprocess qemu +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + + +import os +import socket + +from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern +from qemu_test import exec_command, exec_command_and_wait_for_pattern + +class Multiprocess(QemuSystemTest): + + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + + ASSET_KERNEL_X86 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux' + '/releases/31/Everything/x86_64/os/images/pxeboot/vmlinuz'), + 'd4738d03dbbe083ca610d0821d0a8f1488bebbdccef54ce33e3adb35fda00129') + + ASSET_INITRD_X86 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux' + '/releases/31/Everything/x86_64/os/images/pxeboot/initrd.img'), + '3b6cb5c91a14c42e2f61520f1689264d865e772a1f0069e660a800d31dd61fb9') + + ASSET_KERNEL_AARCH64 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux' + '/releases/31/Everything/aarch64/os/images/pxeboot/vmlinuz'), + '3ae07fcafbfc8e4abeb693035a74fe10698faae15e9ccd48882a9167800c1527') + + ASSET_INITRD_AARCH64 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux' + '/releases/31/Everything/aarch64/os/images/pxeboot/initrd.img'), + '9fd230cab10b1dafea41cf00150e6669d37051fad133bd618d2130284e16d526') + + def do_test(self, kernel_asset, initrd_asset, + kernel_command_line, machine_type): + """Main test method""" + self.require_accelerator('kvm') + self.require_device('x-pci-proxy-dev') + + # Create socketpair to connect proxy and remote processes + proxy_sock, remote_sock =3D socket.socketpair(socket.AF_UNIX, + socket.SOCK_STREAM) + os.set_inheritable(proxy_sock.fileno(), True) + os.set_inheritable(remote_sock.fileno(), True) + + kernel_path =3D kernel_asset.fetch() + initrd_path =3D initrd_asset.fetch() + + # Create remote process + remote_vm =3D self.get_vm() + remote_vm.add_args('-machine', 'x-remote') + remote_vm.add_args('-nodefaults') + remote_vm.add_args('-device', 'lsi53c895a,id=3Dlsi1') + remote_vm.add_args('-object', 'x-remote-object,id=3Drobj1,' + 'devid=3Dlsi1,fd=3D'+str(remote_sock.fileno())) + remote_vm.launch() + + # Create proxy process + self.vm.set_console() + self.vm.add_args('-machine', machine_type) + self.vm.add_args('-accel', 'kvm') + self.vm.add_args('-cpu', 'host') + self.vm.add_args('-object', + 'memory-backend-memfd,id=3Dsysmem-file,size=3D2G') + self.vm.add_args('--numa', 'node,memdev=3Dsysmem-file') + self.vm.add_args('-m', '2048') + self.vm.add_args('-kernel', kernel_path, + '-initrd', initrd_path, + '-append', kernel_command_line) + self.vm.add_args('-device', + 'x-pci-proxy-dev,' + 'id=3Dlsi1,fd=3D'+str(proxy_sock.fileno())) + self.vm.launch() + wait_for_console_pattern(self, 'as init process', + 'Kernel panic - not syncing') + exec_command(self, 'mount -t sysfs sysfs /sys') + exec_command_and_wait_for_pattern(self, + 'cat /sys/bus/pci/devices/*/ueve= nt', + 'PCI_ID=3D1000:0012') + + def test_multiprocess(self): + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + if self.arch =3D=3D 'x86_64': + kernel_command_line +=3D 'console=3DttyS0 rdinit=3D/bin/bash' + self.do_test(self.ASSET_KERNEL_X86, self.ASSET_INITRD_X86, + kernel_command_line, 'pc') + elif self.arch =3D=3D 'aarch64': + kernel_command_line +=3D 'rdinit=3D/bin/bash console=3DttyAMA0' + self.do_test(self.ASSET_KERNEL_AARCH64, self.ASSET_INITRD_AARC= H64, + kernel_command_line, 'virt,gic-version=3D3') + else: + assert False + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.46.0 From nobody Sun Nov 24 06:46:06 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=1725972096; cv=none; d=zohomail.com; s=zohoarc; b=GK8W1nvW6zYsFqe9VjVuDjvSjTTJc75AbsAZl5IBrs8XYhY0f91twSXoqwZUp08woukIhUcB7c8pTYG/446e+uqcZdK+r/+Xp/O6MuNQmu5tfJDqs78palrvnBKvRKhLY4+r531cWPaWCZ1+aJI4Nk9FjPaPjyYdpzuatAXTHlo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725972096; 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=5h6C1ogU94942iJagKeEubLv7OV7M3ODG1KrvwDwxXs=; b=EWhjOx7SJ3p8k1X9Q4bYdpRrMu2ol4XiddWkCg8H1N/iaHHpFV6P04niZMFMDPTjSGDuGOH7T10G54BmkN3OO1j1AiVLn4dGRuAGh7IQ5LzTs2YH/kDyfAsAjckMQvv+jhV638qkx6G2Euf1+B2y/X66cjhqkgU87RJYzjxreWc= 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 1725972096277627.2091006447885; Tue, 10 Sep 2024 05:41:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so08q-00079l-EV; Tue, 10 Sep 2024 08:38:44 -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 1so08o-0006z7-AU for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:42 -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 1so08f-0005E6-Il for qemu-devel@nongnu.org; Tue, 10 Sep 2024 08:38:40 -0400 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-198-SMcM0jSKNPKfXAnSmDi2Vw-1; Tue, 10 Sep 2024 08:38:24 -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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DB9471955F25; Tue, 10 Sep 2024 12:38:22 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.120]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 202ED19560AB; Tue, 10 Sep 2024 12:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725971907; 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=5h6C1ogU94942iJagKeEubLv7OV7M3ODG1KrvwDwxXs=; b=WYQ+R2YZaTI22ThQlCB6IZM+2zpia/uwaAqWO2Ekm5zsUqEjTDffdUUW1MEsk7ey3t6FBg EdsjrnnrbNzCCiz0Y12hf38V6LAuXgtxCg/nKsePWg50KrRrdBkxAsBQGNNrFwaIpmmDYA xK+NlWcG1ZFTUTEP+ZK35LY1LBphvhY= X-MC-Unique: SMcM0jSKNPKfXAnSmDi2Vw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 22/22] tests/functional: Fix bad usage of has_cmd Date: Tue, 10 Sep 2024 14:37:23 +0200 Message-ID: <20240910123726.182975-23-thuth@redhat.com> In-Reply-To: <20240910123726.182975-1-thuth@redhat.com> References: <20240910123726.182975-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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.145, 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1725972097403116600 has_cmd returns a tuple, not a boolean value. This fixes a crash when e.g. "tesseract" is not available in the test_m68k_nextcube test. Reported-by: Richard Henderson Message-ID: <20240910075820.51346-1-thuth@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/functional/qemu_test/cmd.py | 6 +++--- tests/functional/qemu_test/tesseract.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test= /cmd.py index 3acd617324..cbabb1ceed 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -187,7 +187,7 @@ def get_qemu_img(test): qemu_img =3D os.path.join(BUILD_DIR, 'qemu-img') if os.path.exists(qemu_img): return qemu_img - if has_cmd('qemu-img'): + (has_system_qemu_img, errmsg) =3D has_cmd('qemu-img') + if has_system_qemu_img: return 'qemu-img' - test.skipTest('Could not find "qemu-img", which is required to ' - 'create temporary images') + test.skipTest(errmsg) diff --git a/tests/functional/qemu_test/tesseract.py b/tests/functional/qem= u_test/tesseract.py index c4087b7c11..db441027b9 100644 --- a/tests/functional/qemu_test/tesseract.py +++ b/tests/functional/qemu_test/tesseract.py @@ -11,7 +11,8 @@ from . import has_cmd, run_cmd =20 def tesseract_available(expected_version): - if not has_cmd('tesseract'): + (has_tesseract, _) =3D has_cmd('tesseract') + if not has_tesseract: return False (stdout, stderr, ret) =3D run_cmd([ 'tesseract', '--version']) if ret: --=20 2.46.0