From nobody Sun Feb 8 13:21:23 2026 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=1738771257; cv=none; d=zohomail.com; s=zohoarc; b=aVXoZbLW9bzjAJr1sKMozUJ4qkhnmqGE/1Ace3uJdPwK3y2jlrMrxGlo6h+9ECcBd9JZgipw6dpAHaUHhdDyV2QVktSoO9uWt3YOUqJ06EDx1n+8sxbc05CDHnvZ/yrzxgB9OV1Gs2NJOQ1RwX72husy9yKg731IJtYeqR+sVUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1738771257; 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=fysQSNA1E970ViCFvsrSMcbTwNV0+wBLHllSL/r6qwc=; b=clWnza5RebWDO1obJoMFSS5f53iKx9q4pgx2A0sg3+OEYSB2poYGanmlV3aI51ZeHdDEhOqA9U1K7zkCdkmhf26xqTkBgiH7aIx9ynlHIaY7s46HAvIigRrzb+FJDQcjUrow9XgyZ4m7o9ssJ8oEzEOALfTkEi0H+mpYzVAqMM4= 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 1738771257285937.2031412088656; Wed, 5 Feb 2025 08:00:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tfhom-0006nV-Oi; Wed, 05 Feb 2025 11:00:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhok-0006mZ-8x for qemu-devel@nongnu.org; Wed, 05 Feb 2025 10:59:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhoi-0001Ku-Nr for qemu-devel@nongnu.org; Wed, 05 Feb 2025 10:59:58 -0500 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-290-v0VYLq4kN0usPTmUcwozWg-1; Wed, 05 Feb 2025 10:59:53 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 632521800373; Wed, 5 Feb 2025 15:59:52 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.26]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6FB6A195608D; Wed, 5 Feb 2025 15:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738771195; 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=fysQSNA1E970ViCFvsrSMcbTwNV0+wBLHllSL/r6qwc=; b=G5OdXD9QGjyPzhlkMpU4PqQUWB5n4/wcHD0jDNBiUAEXpglCyFRSkoSCoMX8lwPHBeQLre yrfyzKgKvxJW1xRdEZj4N8ExP/tQJc7MCR1hXau03pfSTpDPpWfOkOk78kkbBRTT1UuJ3S cln5lJxjRVa8alPHt2IyckUm1CtFTaQ= X-MC-Unique: v0VYLq4kN0usPTmUcwozWg-1 X-Mimecast-MFC-AGG-ID: v0VYLq4kN0usPTmUcwozWg From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Marcel Apfelbaum , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/5] tests/functional: skip test if QEMU_TEST_QEMU_BINARY is not set Date: Wed, 5 Feb 2025 15:59:42 +0000 Message-ID: <20250205155946.2811296-2-berrange@redhat.com> In-Reply-To: <20250205155946.2811296-1-berrange@redhat.com> References: <20250205155946.2811296-1-berrange@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.17 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=berrange@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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1738771258613019100 If QEMU_TEST_QEMU_BINARY is not set we currently assert in the setUp function, resulting in a big traceback: TAP version 13 Traceback (most recent call last): File "/var/home/berrange/src/virt/qemu/tests/functional/qemu_test/tes= tcase.py", line 280, in setUp super().setUp('qemu-system-') ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/var/home/berrange/src/virt/qemu/tests/functional/qemu_test/tes= tcase.py", line 196, in setUp self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be = set') ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^ AssertionError: unexpectedly None : QEMU_TEST_QEMU_BINARY must be set not ok 1 test_ppc_405.Ppc405Machine.test_ppc_ref405ep 1..1 For every other test pre-requisite that's missing we will mark the test as skipped. This does the same for missing QEMU_TEST_QEMU_BINARY, such that we get TAP version 13 ok 1 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest # SKIP QEMU_TES= T_QEMU_BINARY env variable is not set ok 2 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_noapic_nomsi # = SKIP QEMU_TEST_QEMU_BINARY env variable is not set ok 3 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_nomsi # SKIP QE= MU_TEST_QEMU_BINARY env variable is not set ok 4 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_novector # SKIP= QEMU_TEST_QEMU_BINARY env variable is not set ok 5 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_novector_noapic= # SKIP QEMU_TEST_QEMU_BINARY env variable is not set ok 6 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_novector_nomsi = # SKIP QEMU_TEST_QEMU_BINARY env variable is not set ok 7 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_vapic # SKIP QE= MU_TEST_QEMU_BINARY env variable is not set 1..7 Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/functional/qemu_test/testcase.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index 869f3949fe..94541e8bfb 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -193,7 +193,9 @@ def assets_available(self): return True =20 def setUp(self, bin_prefix): - self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be= set') + if self.qemu_bin is None: + self.skipTest("QEMU_TEST_QEMU_BINARY env variable is not set") + self.arch =3D self.qemu_bin.split('-')[-1] self.socketdir =3D None =20 --=20 2.47.1 From nobody Sun Feb 8 13:21:23 2026 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=1738771257; cv=none; d=zohomail.com; s=zohoarc; b=AN75Q4KsKDl9C5hPlgX3F+K1zYNBQaPqii3ElxIZGhzdiin7uVhcxiSM5F72VLg/N4pdgwG3jqZfnefxjJVKYvqGS0JNdp4EOa8SyL3IWSCt9uwblWDQxHTGco5vkLC2QGqbaCTg2fZ0h27sdsmJjZagMTvVpfiUQtiXzW2IPXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1738771257; 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=g4GxtRuTE/tRrwPDpYOfV4BzsfnM7SOpGaFfYwquWYY=; b=aEDoWm9Zur0MapEAnoQWgA97uKxCWp6owIv59dhl0f+mefk9+uOH5lf5CViKD8DiBwWQmxFqV2WknqoLEtRmVpw659kD6azP8kZNguYziaW2nIACindoY/nT53gSuET5Xs7JOS4eQJedloFsSE1zvKYC/03Ia0gYZeDK8ii07q4= 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 1738771257652800.5401781727171; Wed, 5 Feb 2025 08:00:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tfhos-0006or-EX; Wed, 05 Feb 2025 11:00:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhoq-0006oM-B2 for qemu-devel@nongnu.org; Wed, 05 Feb 2025 11:00:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhoo-0001LO-HG for qemu-devel@nongnu.org; Wed, 05 Feb 2025 11:00:04 -0500 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-339-AoO9NpDqN6qNKzIw33Sevw-1; Wed, 05 Feb 2025 10:59:56 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 D3ADB1801BF3; Wed, 5 Feb 2025 15:59:54 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.26]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F4050195608D; Wed, 5 Feb 2025 15:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738771200; 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=g4GxtRuTE/tRrwPDpYOfV4BzsfnM7SOpGaFfYwquWYY=; b=HF2HAHEoZBZJxVw7n3yFcNtszqHmIp0Fan+I/zQJfu0PEb+9qNS1Zo+/jsCVTl2V/gc+PJ 5XkrbZrTF1UcuPzk1z7DPgrJr85aVA9vIVPvRO560vhHgzzNHxntFv0gmK+24qHrA9Ddq1 lSwehA7cSdzpGdeeb1ckWZC/D3yR4l8= X-MC-Unique: AoO9NpDqN6qNKzIw33Sevw-1 X-Mimecast-MFC-AGG-ID: AoO9NpDqN6qNKzIw33Sevw From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Marcel Apfelbaum , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/5] tests/functional: remove unused 'bin_prefix' variable Date: Wed, 5 Feb 2025 15:59:43 +0000 Message-ID: <20250205155946.2811296-3-berrange@redhat.com> In-Reply-To: <20250205155946.2811296-1-berrange@redhat.com> References: <20250205155946.2811296-1-berrange@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.17 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=berrange@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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1738771259675019000 This was copied over from avocado but has not been used in the new functional tests. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- tests/functional/qemu_test/testcase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index 94541e8bfb..332c782ebc 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -192,7 +192,7 @@ def assets_available(self): return False return True =20 - def setUp(self, bin_prefix): + def setUp(self): if self.qemu_bin is None: self.skipTest("QEMU_TEST_QEMU_BINARY env variable is not set") =20 @@ -256,7 +256,7 @@ def main(): class QemuUserTest(QemuBaseTest): =20 def setUp(self): - super().setUp('qemu-') + super().setUp() self._ldpath =3D [] =20 def add_ldpath(self, ldpath): @@ -279,7 +279,7 @@ class QemuSystemTest(QemuBaseTest): def setUp(self): self._vms =3D {} =20 - super().setUp('qemu-system-') + super().setUp() =20 console_log =3D logging.getLogger('console') console_log.setLevel(logging.DEBUG) --=20 2.47.1 From nobody Sun Feb 8 13:21:23 2026 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=1738771288; cv=none; d=zohomail.com; s=zohoarc; b=QmCDNiFLj4cUOODpOjyghxG38Pgi1qN0EaQ0+yfCzQIrmTb4/ZSY5jkaLxC1vmHyfQJZl/oOPXW7b+tBl0rvKrTXywBujTmcXrHnDaI5DJgOZgn4NZCMAUNHO95NOT6DDt0wK7/eyDHMeihtEWgqKzLVZUnu87PcDx9iRpJp7ns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1738771288; 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=9ZHuUSSEfLVR8YhjvWGcoC8+zUMIHyaTIZI83tFOw5M=; b=miojJbkBYe8raAzJek2QODGGdhhM1fFzEWE+hAvwKtVYU6dNQ+sqHCjkSftdwOsSrQdGCmrRpPV63SUfwRPIazVg/e+Huu1pEBe5XhrYQJIaU6MijsjTztcnlRMqO9nLIIj5NCODmNEVD9YwsqKdyl5l2r9+HuxnDDwyrV/lfqc= 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 1738771288723422.4045613288696; Wed, 5 Feb 2025 08:01:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tfhot-0006p8-E6; Wed, 05 Feb 2025 11:00:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhoq-0006oL-AK for qemu-devel@nongnu.org; Wed, 05 Feb 2025 11:00:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhoo-0001Lf-MA for qemu-devel@nongnu.org; Wed, 05 Feb 2025 11:00:04 -0500 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-362-fo0lflImNKOu8eWW-tJGsg-1; Wed, 05 Feb 2025 10:59:58 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 4E8721955ED9; Wed, 5 Feb 2025 15:59:57 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.26]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5678E195608D; Wed, 5 Feb 2025 15:59:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738771201; 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=9ZHuUSSEfLVR8YhjvWGcoC8+zUMIHyaTIZI83tFOw5M=; b=NAj2i8m2Z+aK6GCz6Q5Qi8aOe+ANixcMSxVtWCeUh60AtPcihxb5TbR6Vx0TVBAgogfwXC TYow2Q0dEyJbnz3ksEMJU9TwiP18V6gwgilEVbKVwLfp7PXdEihg4eIyMzoIIWvTwOD/3W VNO16oO20RIdmtmOeaNDk7nykgpDlcg= X-MC-Unique: fo0lflImNKOu8eWW-tJGsg-1 X-Mimecast-MFC-AGG-ID: fo0lflImNKOu8eWW-tJGsg From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Marcel Apfelbaum , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/5] tests/functional: set 'qemu_bin' as an object level field Date: Wed, 5 Feb 2025 15:59:44 +0000 Message-ID: <20250205155946.2811296-4-berrange@redhat.com> In-Reply-To: <20250205155946.2811296-1-berrange@redhat.com> References: <20250205155946.2811296-1-berrange@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.17 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=berrange@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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1738771290184019100 The 'qemu_bin' field is currently set on the class, despite being accessed as if it were an object instance field with 'self.qemu_bin'. This is no obvious need to have it as a class field, so move it into the object instance. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- docs/devel/testing/functional.rst | 2 +- tests/functional/qemu_test/testcase.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functio= nal.rst index ecc738922b..bcb5509512 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -173,7 +173,7 @@ QEMU binary selection ^^^^^^^^^^^^^^^^^^^^^ =20 The QEMU binary used for the ``self.vm`` QEMUMachine instance will -primarily depend on the value of the ``qemu_bin`` class attribute. +primarily depend on the value of the ``qemu_bin`` instance attribute. If it is not explicitly set by the test code, its default value will be the result the QEMU_TEST_QEMU_BINARY environment variable. =20 diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index 332c782ebc..574c1942f2 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -33,7 +33,6 @@ =20 class QemuBaseTest(unittest.TestCase): =20 - qemu_bin =3D os.getenv('QEMU_TEST_QEMU_BINARY') arch =3D None =20 workdir =3D None @@ -193,6 +192,7 @@ def assets_available(self): return True =20 def setUp(self): + self.qemu_bin =3D os.getenv('QEMU_TEST_QEMU_BINARY') if self.qemu_bin is None: self.skipTest("QEMU_TEST_QEMU_BINARY env variable is not set") =20 --=20 2.47.1 From nobody Sun Feb 8 13:21:23 2026 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=1738771257; cv=none; d=zohomail.com; s=zohoarc; b=CNITs58vOACHikm+cB6jVec7IR4kaTru9l7PNQmAPxXzgPaH0FY8zQmKUELzv4U+5ZNcHP+8rGj+8nao8Gp5TtkVvZenwUdOV2aGNfucsRsntP26yxM1KfYZr+b/+Rnmuec2APRjBj7HyPAsGDg2xUVAxpiR+O8ZaFVKpS/C/bE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1738771257; 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=iJ2p1A8CTSdONnDKxN+tuBTW4cFdXDYG7d72xpn4jPM=; b=knTgMogipF5qSG/ZbFreJoag2MhFR5iTpqpv0XskDXrfQjKgYfoqqLNGSZIM8XHuQWRNlU75O7AkACF2oaop9cAOphbsntATluYiFoCNf+fmV7PQ7NAkrRyv+CXkxC3+Ubmk8At1YHj18A1bPW2lIXUnqLca2cE3aOvEOjs4VW0= 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 1738771257644233.0587093261721; Wed, 5 Feb 2025 08:00:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tfhou-0006pd-NM; Wed, 05 Feb 2025 11:00:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhor-0006oj-L9 for qemu-devel@nongnu.org; Wed, 05 Feb 2025 11:00:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhop-0001PJ-Ey for qemu-devel@nongnu.org; Wed, 05 Feb 2025 11:00:05 -0500 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-592-5pr-3K1PP6ezdUyM2k1fnA-1; Wed, 05 Feb 2025 11:00:01 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 32AFE1955E94; Wed, 5 Feb 2025 16:00:00 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.26]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C5FAF195608D; Wed, 5 Feb 2025 15:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738771202; 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=iJ2p1A8CTSdONnDKxN+tuBTW4cFdXDYG7d72xpn4jPM=; b=d0sEOBWZBsIGfWLUUXpz60TaZODBx+LD6Wq7HCBmKHH7ZctKsE7X73xmYhwaogipIMKWT/ ypzsyPJAaVAu5wM6fabIeT+dP9eHxmaaIjqRDlnPYeLB65vBim9bjawqS9m6epH1QNjKXL 05M9GOiMN9KyksccR4khcKa4J7Pdaac= X-MC-Unique: 5pr-3K1PP6ezdUyM2k1fnA-1 X-Mimecast-MFC-AGG-ID: 5pr-3K1PP6ezdUyM2k1fnA From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Marcel Apfelbaum , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/5] tests/functional: remove all class level fields Date: Wed, 5 Feb 2025 15:59:45 +0000 Message-ID: <20250205155946.2811296-5-berrange@redhat.com> In-Reply-To: <20250205155946.2811296-1-berrange@redhat.com> References: <20250205155946.2811296-1-berrange@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.17 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=berrange@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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1738771260110019100 A number of fields are set at the class level on QemuBaseTest, even though the exact same named field is then set at the object level later in most cases. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- tests/functional/qemu_test/testcase.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index 574c1942f2..531d6393ad 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -33,12 +33,6 @@ =20 class QemuBaseTest(unittest.TestCase): =20 - arch =3D None - - workdir =3D None - log =3D None - logdir =3D None - ''' @params compressed: filename, Asset, or file-like object to uncompress @params format: optional compression format (gzip, lzma) --=20 2.47.1 From nobody Sun Feb 8 13:21:23 2026 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=1738771272; cv=none; d=zohomail.com; s=zohoarc; b=gXgDHk7T81h6pMscs1TpFnWtlh+qwnLTCd5iBtw/VivC205jn8masXAH/oW7aVX9HV1NLFokkHOoEB6VNLEucm1W6cCo3GXtS5eMSPyQug3UfX2FtH1waa/KTvyabdXefrEvhlpGBZg1utUbUJS6d63ujvtdHeejNfkq127nQ04= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1738771272; 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=dL8Z/bhkQjotEMwlHIYSRAsV8q1dl/IpscxL1xN+G9A=; b=dGAipkruGL6wa4ZCBh/zVe49+BTLXgVWhfC5rGwUtV3jJfkY4iB89dRsatghuTPrXWfC728cK36e+JFiCGoxiKHN6wttbLlUhipLVY5o98/N60t7Nmz2381CZKEsCd8jotR72STJ6fCIeGeHM8JnpRPkGgqueMJ/hgOieQSk1Uc= 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 1738771272386124.772927623187; Wed, 5 Feb 2025 08:01:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tfhox-0006pz-8d; Wed, 05 Feb 2025 11:00:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhov-0006ph-Qa for qemu-devel@nongnu.org; Wed, 05 Feb 2025 11:00:09 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tfhos-0001Xu-9B for qemu-devel@nongnu.org; Wed, 05 Feb 2025 11:00:09 -0500 Received: from mx-prod-mc-06.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-668-LDAeOsESOduXAKajJTRhHQ-1; Wed, 05 Feb 2025 11:00:04 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E916718011E6; Wed, 5 Feb 2025 16:00:02 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.26]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A7908195608D; Wed, 5 Feb 2025 16:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738771205; 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=dL8Z/bhkQjotEMwlHIYSRAsV8q1dl/IpscxL1xN+G9A=; b=b3tr8279cmqO8/XaHPfIYQTIv7GLrh7M4r2RKpIxDN4TMALiAQCqmNZMreVrAijoyyIygj OtKX1hVKz7ky4s9g+Y5kV29yEbqWZVWrnJvlCYpak5CTIQttffZcUsLIOGNFOgnZCEObbu n97XQbMLSn5yqwDf/PrtL9kz+fTcERw= X-MC-Unique: LDAeOsESOduXAKajJTRhHQ-1 X-Mimecast-MFC-AGG-ID: LDAeOsESOduXAKajJTRhHQ From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Marcel Apfelbaum , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 5/5] tests/functional: skip mem addr test on 32-bit hosts Date: Wed, 5 Feb 2025 15:59:46 +0000 Message-ID: <20250205155946.2811296-6-berrange@redhat.com> In-Reply-To: <20250205155946.2811296-1-berrange@redhat.com> References: <20250205155946.2811296-1-berrange@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.17 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=berrange@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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1738771273845019000 The test_mem_addr_space is validating handling of QEMU with various memory address settings. All of the test cases are setting 'maxmem' to a value that exceeds the 32-bit address space, so these must all be skipped on 32-bit hosts. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/decorators.py | 12 ++++++++++++ tests/functional/test_mem_addr_space.py | 17 ++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu= _test/__init__.py index 5c972843a6..7a90311891 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -15,6 +15,6 @@ from .linuxkernel import LinuxKernelTest from .decorators import skipIfMissingCommands, skipIfNotMachine, \ skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipSlowTest, \ - skipIfMissingImports + skipIfMissingImports, skipIf32BitTarget from .archive import archive_extract from .uncompress import uncompress diff --git a/tests/functional/qemu_test/decorators.py b/tests/functional/qe= mu_test/decorators.py index 1651eb739a..d3a8cf0483 100644 --- a/tests/functional/qemu_test/decorators.py +++ b/tests/functional/qemu_test/decorators.py @@ -5,6 +5,7 @@ import importlib import os import platform +import sys from unittest import skipUnless =20 from .cmd import which @@ -118,3 +119,14 @@ def skipIfMissingImports(*args): =20 return skipUnless(has_imports, 'required import(s) "%s" not installed'= % ", ".join(args)) + +''' +Decorator to skip execution of a test on 32-bit targets +Example: + + @skipIf32BitTarget() +''' +def skipIf32BitTarget(): + enoughBits =3D sys.maxsize > 2**32 + return skipUnless(enoughBits, + 'Test requires a host with 64-bit address space') diff --git a/tests/functional/test_mem_addr_space.py b/tests/functional/tes= t_mem_addr_space.py index bb0cf062ca..3e0215beb3 100755 --- a/tests/functional/test_mem_addr_space.py +++ b/tests/functional/test_mem_addr_space.py @@ -10,7 +10,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import QemuSystemTest +from qemu_test import QemuSystemTest, skipIf32BitTarget import time =20 class MemAddrCheck(QemuSystemTest): @@ -22,6 +22,7 @@ class MemAddrCheck(QemuSystemTest): =20 # first, lets test some 32-bit processors. # for all 32-bit cases, pci64_hole_size is 0. + @skipIf32BitTarget() def test_phybits_low_pse36(self): """ With pse36 feature ON, a processor has 36 bits of addressing. So i= t can @@ -49,6 +50,7 @@ def test_phybits_low_pse36(self): self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be = 1") self.assertRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_low_pae(self): """ With pae feature ON, a processor has 36 bits of addressing. So it = can @@ -66,6 +68,7 @@ def test_phybits_low_pae(self): self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be = 1") self.assertRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_ok_pentium_pse36(self): """ Setting maxmem to 59.5G and making sure that QEMU can start with t= he @@ -82,6 +85,7 @@ def test_phybits_ok_pentium_pse36(self): self.vm.shutdown() self.assertNotRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_ok_pentium_pae(self): """ Test is same as above but now with pae cpu feature turned on. @@ -99,6 +103,7 @@ def test_phybits_ok_pentium_pae(self): self.vm.shutdown() self.assertNotRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_ok_pentium2(self): """ Pentium2 has 36 bits of addressing, so its same as pentium @@ -115,6 +120,7 @@ def test_phybits_ok_pentium2(self): self.vm.shutdown() self.assertNotRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_low_nonpse36(self): """ Pentium processor has 32 bits of addressing without pse36 or pae @@ -135,6 +141,7 @@ def test_phybits_low_nonpse36(self): self.assertRegex(self.vm.get_log(), r'phys-bits too low') =20 # now lets test some 64-bit CPU cases. + @skipIf32BitTarget() def test_phybits_low_tcg_q35_70_amd(self): """ For q35 7.1 machines and above, there is a HT window that starts at @@ -161,6 +168,7 @@ def test_phybits_low_tcg_q35_70_amd(self): self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be = 1") self.assertRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_low_tcg_q35_71_amd(self): """ AMD_HT_START is defined to be at 1012 GiB. So for q35 machines @@ -181,6 +189,7 @@ def test_phybits_low_tcg_q35_71_amd(self): self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be = 1") self.assertRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_ok_tcg_q35_70_amd(self): """ Same as q35-7.0 AMD case except that here we check that QEMU can @@ -197,6 +206,7 @@ def test_phybits_ok_tcg_q35_70_amd(self): self.vm.shutdown() self.assertNotRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_ok_tcg_q35_71_amd(self): """ Same as q35-7.1 AMD case except that here we check that QEMU can @@ -213,6 +223,7 @@ def test_phybits_ok_tcg_q35_71_amd(self): self.vm.shutdown() self.assertNotRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_ok_tcg_q35_71_intel(self): """ Same parameters as test_phybits_low_tcg_q35_71_amd() but use @@ -231,6 +242,7 @@ def test_phybits_ok_tcg_q35_71_intel(self): self.vm.shutdown() self.assertNotRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_low_tcg_q35_71_amd_41bits(self): """ AMD processor with 41 bits. Max cpu hw address =3D 2 TiB. @@ -255,6 +267,7 @@ def test_phybits_low_tcg_q35_71_amd_41bits(self): self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be = 1") self.assertRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_ok_tcg_q35_71_amd_41bits(self): """ AMD processor with 41 bits. Max cpu hw address =3D 2 TiB. @@ -273,6 +286,7 @@ def test_phybits_ok_tcg_q35_71_amd_41bits(self): self.vm.shutdown() self.assertNotRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_low_tcg_q35_intel_cxl(self): """ cxl memory window starts after memory device range. Here, we use 1= GiB @@ -293,6 +307,7 @@ def test_phybits_low_tcg_q35_intel_cxl(self): self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be = 1") self.assertRegex(self.vm.get_log(), r'phys-bits too low') =20 + @skipIf32BitTarget() def test_phybits_ok_tcg_q35_intel_cxl(self): """ Same as above but here we do not reserve any cxl memory window. He= nce, --=20 2.47.1