From nobody Tue Apr 1 08:37:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1742819845; cv=none; d=zohomail.com; s=zohoarc; b=MR2hvPG71Ih2h9+Qm7f2SJ3+u7CDn2N50UFdJ8TJv/VeK+OODq0KiVw+vhBJS7iPR9aI7X2sUvkapC5YMrizb47evMUx6UJNOLVj8BUYcrOr9x+wYo6k7FCnK9czX64or7aorNr28+lIFu1Bbl9RFwqQgr3p5Y5Cd168sABxo1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742819845; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=86sdwo4b+yKpS/hBlDzZCZPiZvbM0whm3cQ/+71WLso=; b=JuYrZFuJs3OxE92fpv7POqLFEODK/YwEa2ffOm6sU8LmJyj/qx2Rx4lD6Clk7LOVvtJXa2sDavw0wylmaF4UlfZ1vyULjV3mKTynhPRlyAxMbrdlcLASh6gV9pHDdJdtLyy10frJ9fiuhbmzwkZJE0WYjPTfuGe6sHNrvXo7Fko= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742819845068884.879637593294; Mon, 24 Mar 2025 05:37:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1twh2U-0004x7-NZ; Mon, 24 Mar 2025 08:36:22 -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 1twh1L-0004bo-7E for qemu-devel@nongnu.org; Mon, 24 Mar 2025 08:35:18 -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 1twh1B-0000Zr-B7 for qemu-devel@nongnu.org; Mon, 24 Mar 2025 08:35:03 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-230-CBwzbX-ePJmymylKE2d1IQ-1; Mon, 24 Mar 2025 08:34:56 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 32EE81800EC5; Mon, 24 Mar 2025 12:34:55 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.34.76]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 34FA31956095; Mon, 24 Mar 2025 12:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1742819699; 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; bh=86sdwo4b+yKpS/hBlDzZCZPiZvbM0whm3cQ/+71WLso=; b=JVWE85aJL3iuv01anqBmtzTu5mVFW0oPJ45bDpTuBQUilY9+XwKorm92DT+JZToYI4cW+a 6ywBpOOlboZApfSWYlKAYhU7xhpW1lDQnUyTs1itfoxIU4/SDiA1tFs94U3KEnuATDB5D/ aaWih4H0+SHuq9oJ/Ldcb6XKQ9n/egA= X-MC-Unique: CBwzbX-ePJmymylKE2d1IQ-1 X-Mimecast-MFC-AGG-ID: CBwzbX-ePJmymylKE2d1IQ_1742819695 From: Thomas Huth To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, "Daniel P . Berrange" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] tests/functional: Add missing require_netdev('user') statements Date: Mon, 24 Mar 2025 13:34:50 +0100 Message-ID: <20250324123450.111307-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 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.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1742819846400116600 Content-Type: text/plain; charset="utf-8" From: Thomas Huth A bunch of tests are using "-netdev user" but fail to check for the availability of SLIRP in the binary, so these tests fail if QEMU has been configured with "--disable-slirp" (most of the tests are disabled by default with a decorator, that's likely why nobody noticed this problem yet). Add the missing self.require_netdev('user') statements to skip the tests if SLIRP is not available. Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrang=C3=A9 --- tests/functional/test_aarch64_rme_sbsaref.py | 1 + tests/functional/test_aarch64_rme_virt.py | 4 +++- tests/functional/test_arm_bpim2u.py | 2 ++ tests/functional/test_arm_cubieboard.py | 2 ++ tests/functional/test_arm_orangepi.py | 4 ++++ tests/functional/test_ppc64_hv.py | 3 +++ tests/functional/test_x86_64_kvm_xen.py | 1 + 7 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/functional/test_aarch64_rme_sbsaref.py b/tests/functiona= l/test_aarch64_rme_sbsaref.py index ddcc9493a6c..0f4f6103a1e 100755 --- a/tests/functional/test_aarch64_rme_sbsaref.py +++ b/tests/functional/test_aarch64_rme_sbsaref.py @@ -33,6 +33,7 @@ class Aarch64RMESbsaRefMachine(QemuSystemTest): def test_aarch64_rme_sbsaref(self): self.set_machine('sbsa-ref') self.require_accelerator('tcg') + self.require_netdev('user') =20 self.vm.set_console() =20 diff --git a/tests/functional/test_aarch64_rme_virt.py b/tests/functional/t= est_aarch64_rme_virt.py index 38e01721a4e..f4ad4d33d58 100755 --- a/tests/functional/test_aarch64_rme_virt.py +++ b/tests/functional/test_aarch64_rme_virt.py @@ -60,8 +60,10 @@ class Aarch64RMEVirtMachine(QemuSystemTest): # and launching a nested VM using it. def test_aarch64_rme_virt(self): self.set_machine('virt') - self.vm.set_console() self.require_accelerator('tcg') + self.require_netdev('user') + + self.vm.set_console() =20 stack_path_tar_gz =3D self.ASSET_RME_STACK_VIRT.fetch() self.archive_extract(stack_path_tar_gz, format=3D"tar") diff --git a/tests/functional/test_arm_bpim2u.py b/tests/functional/test_ar= m_bpim2u.py index 12cd3597460..8de6ccba881 100755 --- a/tests/functional/test_arm_bpim2u.py +++ b/tests/functional/test_arm_bpim2u.py @@ -140,6 +140,8 @@ def test_arm_bpim2u_gmac(self): @skipBigDataTest() def test_arm_bpim2u_openwrt_22_03_3(self): self.set_machine('bpim2u') + self.require_netdev('user') + # This test download a 8.9 MiB compressed image and expand it # to 127 MiB. image_path =3D self.uncompress(self.ASSET_SD_IMAGE) diff --git a/tests/functional/test_arm_cubieboard.py b/tests/functional/tes= t_arm_cubieboard.py index 423db710e82..b87a28154da 100755 --- a/tests/functional/test_arm_cubieboard.py +++ b/tests/functional/test_arm_cubieboard.py @@ -107,6 +107,8 @@ def test_arm_cubieboard_openwrt_22_03_2(self): # This test download a 7.5 MiB compressed image and expand it # to 126 MiB. self.set_machine('cubieboard') + self.require_netdev('user') + image_path =3D self.uncompress(self.ASSET_OPENWRT) image_pow2ceil_expand(image_path) =20 diff --git a/tests/functional/test_arm_orangepi.py b/tests/functional/test_= arm_orangepi.py index 28919391e5d..1815f56e027 100755 --- a/tests/functional/test_arm_orangepi.py +++ b/tests/functional/test_arm_orangepi.py @@ -147,6 +147,8 @@ def test_arm_orangepi_sd(self): @skipBigDataTest() def test_arm_orangepi_armbian(self): self.set_machine('orangepi-pc') + self.require_netdev('user') + # This test download a 275 MiB compressed image and expand it # to 1036 MiB, but the underlying filesystem is 1552 MiB... # As we expand it to 2 GiB we are safe. @@ -181,6 +183,8 @@ def test_arm_orangepi_armbian(self): @skipBigDataTest() def test_arm_orangepi_uboot_netbsd9(self): self.set_machine('orangepi-pc') + self.require_netdev('user') + # This test download a 304MB compressed image and expand it to 2GB # We use the common OrangePi PC 'plus' build of U-Boot for our sec= ondary # program loader (SPL). We will then set the path to the more spec= ific diff --git a/tests/functional/test_ppc64_hv.py b/tests/functional/test_ppc6= 4_hv.py index 62f996adf6d..1920e91f18b 100755 --- a/tests/functional/test_ppc64_hv.py +++ b/tests/functional/test_ppc64_hv.py @@ -125,6 +125,7 @@ def do_test_kvm(self, hpt=3DFalse): =20 def test_hv_pseries(self): self.require_accelerator("tcg") + self.require_netdev('user') self.set_machine('pseries') self.vm.add_args("-accel", "tcg,thread=3Dmulti") self.vm.add_args('-device', 'nvme,serial=3D1234,drive=3Ddrive0') @@ -136,6 +137,7 @@ def test_hv_pseries(self): =20 def test_hv_pseries_kvm(self): self.require_accelerator("kvm") + self.require_netdev('user') self.set_machine('pseries') self.vm.add_args("-accel", "kvm") self.vm.add_args('-device', 'nvme,serial=3D1234,drive=3Ddrive0') @@ -147,6 +149,7 @@ def test_hv_pseries_kvm(self): =20 def test_hv_powernv(self): self.require_accelerator("tcg") + self.require_netdev('user') self.set_machine('powernv') self.vm.add_args("-accel", "tcg,thread=3Dmulti") self.vm.add_args('-device', 'nvme,bus=3Dpcie.2,addr=3D0x0,serial= =3D1234,drive=3Ddrive0', diff --git a/tests/functional/test_x86_64_kvm_xen.py b/tests/functional/tes= t_x86_64_kvm_xen.py index 3bedef6c98c..c6abf6bba3b 100755 --- a/tests/functional/test_x86_64_kvm_xen.py +++ b/tests/functional/test_x86_64_kvm_xen.py @@ -41,6 +41,7 @@ class KVMXenGuest(QemuSystemTest): def common_vm_setup(self): # We also catch lack of KVM_XEN support if we fail to launch self.require_accelerator("kvm") + self.require_netdev('user') =20 self.vm.set_console() =20 --=20 2.49.0