From nobody Sun May 5 07:25:53 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=1638355664; cv=none; d=zohomail.com; s=zohoarc; b=fjS4O7aRAzVq5Cey6qN69YvX9yq/PhjMapMr07MhsK8eN2ZHvyw7NWtpEe0GG95S0TokkOoYOh0SUm3QmyUodTlBlxNplqfRAd0xP68+jIY6LEMp9yahhltm/9fvNMVwpSGdgAMjGWpYgObuqAhQMaYE3danwGmEm21SoJTjxlY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638355664; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=92hJDCmjp7AuMSarM3czHqxdLwuaCN80uRXuGmt6N80=; b=dVvHr8AShmVpAfenCmHuvb19YV3ujFy2SJkE0VS6lv5gpRJMiAmMWTI5CuUHfRL7Y43/hWjNekPeFvQiTY7c/pFCyJx1KY7uTONbOwSsZYBjlh3kaKvAkfTwkFAL4s8H9UzbTURLoEYSjzZWltI1anKoubRE0sAd1VX3H8w88h4= 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 1638355664458541.3744257488378; Wed, 1 Dec 2021 02:47:44 -0800 (PST) Received: from localhost ([::1]:45576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msN9L-0005YV-Fr for importer@patchew.org; Wed, 01 Dec 2021 05:47:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msN6J-0000qM-Ms for qemu-devel@nongnu.org; Wed, 01 Dec 2021 05:44:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:30626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msN6G-0002jz-E0 for qemu-devel@nongnu.org; Wed, 01 Dec 2021 05:44:33 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-15-WEN9-StDO-irb--IiZqhSA-1; Wed, 01 Dec 2021 05:44:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B222C81EE60 for ; Wed, 1 Dec 2021 10:44:29 +0000 (UTC) Received: from thuth.com (dhcp-192-183.str.redhat.com [10.33.192.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B1CB60C0F; Wed, 1 Dec 2021 10:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638355471; 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=92hJDCmjp7AuMSarM3czHqxdLwuaCN80uRXuGmt6N80=; b=hCG0erDt4Qh+VfCKbckpKvlk9Tsu75ieickKb4fxXIltKDOe9KrybB6dPMJ9JOaV5Yq80v LKs1NgIEO1sSSARmAV9mb4Z656snY/ODQXp7K2l9uDiD2+hqBSCtfmAQpTa/PkGDzuXly2 KeVc9PSE4x0NXtXHkdIBzLEPg0+Nny8= X-MC-Unique: WEN9-StDO-irb--IiZqhSA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier Subject: [PATCH for-7.0 1/4] tests/qtest: Run the PPC 32-bit tests with the 64-bit target binary, too Date: Wed, 1 Dec 2021 11:43:44 +0100 Message-Id: <20211201104347.51922-2-thuth@redhat.com> In-Reply-To: <20211201104347.51922-1-thuth@redhat.com> References: <20211201104347.51922-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.716, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: , Cc: Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1638355665085100001 Content-Type: text/plain; charset="utf-8" The ppc64 target is a superset of the 32-bit target, so we should include the tests here, too. This used to be done in the past already, but it got lost during the conversion to meson. Fixes: a2ce7dbd91 ("meson: convert tests/qtest to meson") Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index c9d8458062..8591a54439 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -134,6 +134,7 @@ qtests_ppc =3D \ ['boot-order-test', 'prom-env-test', 'boot-serial-test'] = \ =20 qtests_ppc64 =3D \ + qtests_ppc + \ (config_all_devices.has_key('CONFIG_PSERIES') ? ['device-plug-test'] : [= ]) + \ (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-xscom-test'] : [])= + \ (config_all_devices.has_key('CONFIG_PSERIES') ? ['rtas-test'] : []) + = \ --=20 2.27.0 From nobody Sun May 5 07:25:53 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=1638355581; cv=none; d=zohomail.com; s=zohoarc; b=CB2fMp72HuXtcGC30I+5Qppx8yt69V7B8ix5UCNyGhf7MNMztK5U0/P+eTZUimQ+0KlHj4Q0zUu5Z4UcG72lyjif3x6x79NT/VV1xSPZA4BnM9l7tHk3b70DbLm6eqObv7zNcK6LLuGtVp2YNP5AsiocMw9zAgGqMlddQhikXL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638355581; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QFGa79gXl0E6PdQEZ4nx5oXU2oJlu5CMXD+mP55FXFw=; b=iJLijMk25kFKoJ4xsNM6TcBwQJGU2FDnZk4Ci569y2aa6YgIDJisYygzPBOXTbMOaFfcwcNjGlzblYw/b2oHfcD/e0qs+5B9wG8K1unr052Lu0emmziv+RICiB+9fqGrJqIVXOKGY1XP4F7xlH8o/AfE81iAqi+dbyZHOjVf2Zc= 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 1638355581334613.1167014434615; Wed, 1 Dec 2021 02:46:21 -0800 (PST) Received: from localhost ([::1]:41884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msN80-00035c-9N for importer@patchew.org; Wed, 01 Dec 2021 05:46:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msN6J-0000rt-Ml for qemu-devel@nongnu.org; Wed, 01 Dec 2021 05:44:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msN6H-0002k7-Eh for qemu-devel@nongnu.org; Wed, 01 Dec 2021 05:44:34 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-480-2P6JvVjCN7GIw_3jlZX-AQ-1; Wed, 01 Dec 2021 05:44:31 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E9AEF1006AA2 for ; Wed, 1 Dec 2021 10:44:30 +0000 (UTC) Received: from thuth.com (dhcp-192-183.str.redhat.com [10.33.192.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 04FA860C17; Wed, 1 Dec 2021 10:44:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638355472; 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=QFGa79gXl0E6PdQEZ4nx5oXU2oJlu5CMXD+mP55FXFw=; b=MRKtfiQ6mqubbdLNfDr80tzFAwyuzGf81dMblIqplEM55aVLpa/cRNwwNwkv6l/a6RjkeI Eon99wXWruWmIek5Uy5mXzM5VVaepWbx3rL7gMtEXGwdixL0qINYS86SFwrAmzNQOljo6K SEPWQ1TsGm/XdM0NLZCgRreBAs+lbus= X-MC-Unique: 2P6JvVjCN7GIw_3jlZX-AQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier Subject: [PATCH for-7.0 2/4] tests/qtest: Fence the tests that need xlnx-zcu102 with CONFIG_XLNX_ZYNQMP_ARM Date: Wed, 1 Dec 2021 11:43:45 +0100 Message-Id: <20211201104347.51922-3-thuth@redhat.com> In-Reply-To: <20211201104347.51922-1-thuth@redhat.com> References: <20211201104347.51922-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.716, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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: , Cc: Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1638355581993100001 Content-Type: text/plain; charset="utf-8" The 'xlnx-can-test' and the 'fuzz-xlnx-dp-test' need the "xlnx-zcu102" machine and thus should only be built and run if CONFIG_XLNX_ZYNQMP_ARM is enabled. Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 8591a54439..5260b33dc0 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -184,11 +184,10 @@ qtests_aarch64 =3D \ (cpu !=3D 'arm' and unpack_edk2_blobs ? ['bios-tables-test'] : []) + = \ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-= test'] : []) + \ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-= swtpm-test'] : []) + \ + (config_all_devices.has_key('CONFIG_XLNX_ZYNQMP_ARM') ? ['xlnx-can-test'= , 'fuzz-xlnx-dp-test'] : []) + \ ['arm-cpu-features', 'numa-test', 'boot-serial-test', - 'xlnx-can-test', - 'fuzz-xlnx-dp-test', 'migration-test'] =20 qtests_s390x =3D \ --=20 2.27.0 From nobody Sun May 5 07:25:53 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=1638355582; cv=none; d=zohomail.com; s=zohoarc; b=NCjYiDD7OrHpoyNAzdUdPZOy7H1YDbRv8S5fr99+q9NhN68hzDEZniyDLlAZaBuJMgRKJjy2VsOnjQ7P8+rrplhs5dz0dNbiFVJadj1t+lkY8hv7s2TBBYgKLMmuAvMjChxEtK3qkBIkJNOuth+thB/8eeAH3UMLzxwBw5xJq0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638355582; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sLCmzWJ25CXm2hqeSRp1LrcW2G1es/xqYCUfpXyYATc=; b=T3OoDCaoOlrPFidMNtwkWMiOKppbLZ5U8IFuGCZucJxD0zz9hawzC+vjaObZX7kLWnfQRGxw25U5NcaBIYJHesGF/BxtJWlolHggyfxsSMKDpT7IKcZ3RlKuhqMlReLDC8MK7/0Q7Tn70jYrw5BybjSOUyiGzkmrKJAYdZWP0xM= 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 1638355582213506.0847278461723; Wed, 1 Dec 2021 02:46:22 -0800 (PST) Received: from localhost ([::1]:41978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msN81-00039R-6O for importer@patchew.org; Wed, 01 Dec 2021 05:46:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msN6K-0000tt-85 for qemu-devel@nongnu.org; Wed, 01 Dec 2021 05:44:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:32771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msN6I-0002kH-Ng for qemu-devel@nongnu.org; Wed, 01 Dec 2021 05:44:35 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-437-v3SgMjKEOXm0wo_gEQK5pg-1; Wed, 01 Dec 2021 05:44:33 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C92083DD27 for ; Wed, 1 Dec 2021 10:44:32 +0000 (UTC) Received: from thuth.com (dhcp-192-183.str.redhat.com [10.33.192.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C32E60C0F; Wed, 1 Dec 2021 10:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638355474; 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=sLCmzWJ25CXm2hqeSRp1LrcW2G1es/xqYCUfpXyYATc=; b=Teh1cGEDWdzntUpEJYkkVaQC6KJOQkUsAaWk9VDVSdobeQ8/atLjFZmDQvZiV7ZHRMdoOp F+JahUPSK3VgqjJPxjwAQ1DD+q+NodMb4EIIerTeM+AGoTHQc+mtJ9z9QF/sxtim6a56Hz qyw1fRLdNa2q9grkGfh+DiGsv3gPEPU= X-MC-Unique: v3SgMjKEOXm0wo_gEQK5pg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier Subject: [PATCH for-7.0 3/4] tests/qtest: Add a function that gets a list with available machine types Date: Wed, 1 Dec 2021 11:43:46 +0100 Message-Id: <20211201104347.51922-4-thuth@redhat.com> In-Reply-To: <20211201104347.51922-1-thuth@redhat.com> References: <20211201104347.51922-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.716, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: , Cc: Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1638355583883100003 Content-Type: text/plain; charset="utf-8" For the upcoming patches, we will need a way to gets a list with all available machine types. Refactor the qtest_cb_for_every_machine() to split the related code out into a separate new function, and gather the aliases of the various machine types, too. Signed-off-by: Thomas Huth --- tests/qtest/libqtest.c | 64 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 25aeea385b..7ae2dc4e1d 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -1321,16 +1321,29 @@ static bool qtest_is_old_versioned_machine(const ch= ar *mname) return res; } =20 -void qtest_cb_for_every_machine(void (*cb)(const char *machine), - bool skip_old_versioned) +struct MachInfo { + char *name; + char *alias; +}; + +/* + * Returns an array with pointers to the available machine names. + * The terminating entry has the name set to NULL. + */ +static struct MachInfo *qtest_get_machines(void) { + static struct MachInfo *machines; QDict *response, *minfo; QList *list; const QListEntry *p; QObject *qobj; QString *qstr; - const char *mname; QTestState *qts; + int idx; + + if (machines) { + return machines; + } =20 qts =3D qtest_init("-machine none"); response =3D qtest_qmp(qts, "{ 'execute': 'query-machines' }"); @@ -1338,25 +1351,54 @@ void qtest_cb_for_every_machine(void (*cb)(const ch= ar *machine), list =3D qdict_get_qlist(response, "return"); g_assert(list); =20 - for (p =3D qlist_first(list); p; p =3D qlist_next(p)) { + machines =3D g_new(struct MachInfo, qlist_size(list) + 1); + + for (p =3D qlist_first(list), idx =3D 0; p; p =3D qlist_next(p), idx++= ) { minfo =3D qobject_to(QDict, qlist_entry_obj(p)); g_assert(minfo); + qobj =3D qdict_get(minfo, "name"); g_assert(qobj); qstr =3D qobject_to(QString, qobj); g_assert(qstr); - mname =3D qstring_get_str(qstr); - /* Ignore machines that cannot be used for qtests */ - if (!strncmp("xenfv", mname, 5) || g_str_equal("xenpv", mname)) { - continue; - } - if (!skip_old_versioned || !qtest_is_old_versioned_machine(mname))= { - cb(mname); + machines[idx].name =3D g_strdup(qstring_get_str(qstr)); + + qobj =3D qdict_get(minfo, "alias"); + if (qobj) { /* The alias is optional= */ + qstr =3D qobject_to(QString, qobj); + g_assert(qstr); + machines[idx].alias =3D g_strdup(qstring_get_str(qstr)); + } else { + machines[idx].alias =3D NULL; } } =20 qtest_quit(qts); qobject_unref(response); + + memset(&machines[idx], 0, sizeof(struct MachInfo)); /* Terminating ent= ry */ + return machines; +} + +void qtest_cb_for_every_machine(void (*cb)(const char *machine), + bool skip_old_versioned) +{ + struct MachInfo *machines; + int i; + + machines =3D qtest_get_machines(); + + for (i =3D 0; machines[i].name !=3D NULL; i++) { + /* Ignore machines that cannot be used for qtests */ + if (!strncmp("xenfv", machines[i].name, 5) || + g_str_equal("xenpv", machines[i].name)) { + continue; + } + if (!skip_old_versioned || + !qtest_is_old_versioned_machine(machines[i].name)) { + cb(machines[i].name); + } + } } =20 /* --=20 2.27.0 From nobody Sun May 5 07:25:53 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=1638355761; cv=none; d=zohomail.com; s=zohoarc; b=mLcSzmr603hv9GQa7zCV17Kf966QFlzyh7k00i0uJ1aZkwS20U+V5vZoaJ1O4YUuZzj3ytRTR7pitq8Vned933+nqSamd7/Ri9a+O5iN7xods2OaB+QqmGqeUSw6c8ukCkjMu8G6S7q2AexQiUXgGvJinumN+M9TKLP5SA7Y2IE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638355761; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oBAOhli/hKlKw80//urIaUW9H0ri0aupi5Ohlr/SuWg=; b=iJtG75CRs/+Dzidy6XiHAlgk1bvP4kJaDXT7iYAxfkE91JlmbZazFoLq3aJjFdOXoXxZZYTS2PiM+wwssw5L0lr7X/rFA6TgmAwciddQ7bKCJf2IWuzwbybIXDGWl3GzMEYxfV9i/Hy61gUaO9ezV9EjgONcnJT9kTkno5Wdb80= 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 1638355761809521.018613119362; Wed, 1 Dec 2021 02:49:21 -0800 (PST) Received: from localhost ([::1]:47712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msNAu-000701-Oq for importer@patchew.org; Wed, 01 Dec 2021 05:49:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msN6M-0000xh-6K for qemu-devel@nongnu.org; Wed, 01 Dec 2021 05:44:38 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:24079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msN6K-0002kX-3d for qemu-devel@nongnu.org; Wed, 01 Dec 2021 05:44:37 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-191-EYEMYgZXNbCkezlkXwgEcA-1; Wed, 01 Dec 2021 05:44:34 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 643231006AA3 for ; Wed, 1 Dec 2021 10:44:33 +0000 (UTC) Received: from thuth.com (dhcp-192-183.str.redhat.com [10.33.192.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 738FC60C0F; Wed, 1 Dec 2021 10:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638355475; 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=oBAOhli/hKlKw80//urIaUW9H0ri0aupi5Ohlr/SuWg=; b=GM9AQpfyYttIb6UXHHJ7/MEdf0b3UzbPzPKDbDCRl2N12ZWOdqY84XM371QqJya9jsBnZ0 6Bwx4UeBQJHwzCA5YR1LUCnwGOUC6r9pXuw4kk5vxT9tGz4xz9aVqWCu2/75lVXxn8FPEs W2DGpTVxKusKxpT808fIyYBOb8Uzuks= X-MC-Unique: EYEMYgZXNbCkezlkXwgEcA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier Subject: [PATCH for-7.0 4/4] tests/qtest: Add a function to check whether a machine is available Date: Wed, 1 Dec 2021 11:43:47 +0100 Message-Id: <20211201104347.51922-5-thuth@redhat.com> In-Reply-To: <20211201104347.51922-1-thuth@redhat.com> References: <20211201104347.51922-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.716, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: , Cc: Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1638355763898100001 Content-Type: text/plain; charset="utf-8" It is nowadays possible to build QEMU with a reduced set of machines in each binary. However, the qtests still hard-code the expected machines and fail if the binary does not feature the required machine. Let's get a little bit more flexible here: Add a function that can be used to query whether a certain machine is available or not, and use it in some tests as an example (more work has to be done in other tests which will follow later). Signed-off-by: Thomas Huth --- tests/qtest/boot-serial-test.c | 3 ++- tests/qtest/cdrom-test.c | 8 +++++--- tests/qtest/libqos/libqtest.h | 8 ++++++++ tests/qtest/libqtest.c | 17 +++++++++++++++++ tests/qtest/prom-env-test.c | 8 +++++--- 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 83828ba270..4d8e1343bd 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -285,7 +285,8 @@ int main(int argc, char *argv[]) g_test_init(&argc, &argv, NULL); =20 for (i =3D 0; tests[i].arch !=3D NULL; i++) { - if (strcmp(arch, tests[i].arch) =3D=3D 0) { + if (g_str_equal(arch, tests[i].arch) && + qtest_has_machine(tests[i].machine)) { char *name =3D g_strdup_printf("boot-serial/%s", tests[i].mach= ine); qtest_add_data_func(name, &tests[i], test_machine); g_free(name); diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c index 5af944a5fb..c1fcac5c45 100644 --- a/tests/qtest/cdrom-test.c +++ b/tests/qtest/cdrom-test.c @@ -109,9 +109,11 @@ static void test_cdrom_param(gconstpointer data) static void add_cdrom_param_tests(const char **machines) { while (*machines) { - char *testname =3D g_strdup_printf("cdrom/param/%s", *machines); - qtest_add_data_func(testname, *machines, test_cdrom_param); - g_free(testname); + if (qtest_has_machine(*machines)) { + char *testname =3D g_strdup_printf("cdrom/param/%s", *machines= ); + qtest_add_data_func(testname, *machines, test_cdrom_param); + g_free(testname); + } machines++; } } diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h index 59e9271195..dff6b31cf0 100644 --- a/tests/qtest/libqos/libqtest.h +++ b/tests/qtest/libqos/libqtest.h @@ -710,6 +710,14 @@ QDict *qmp_fd(int fd, const char *fmt, ...) GCC_FMT_AT= TR(2, 3); void qtest_cb_for_every_machine(void (*cb)(const char *machine), bool skip_old_versioned); =20 +/** + * qtest_has_machine: + * @machine: The machine to look for + * + * Returns: true if the machine is available in the target binary. + */ +bool qtest_has_machine(const char *machine); + /** * qtest_qmp_device_add_qdict: * @qts: QTestState instance to operate on diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 7ae2dc4e1d..65ed949685 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -1401,6 +1401,23 @@ void qtest_cb_for_every_machine(void (*cb)(const cha= r *machine), } } =20 +bool qtest_has_machine(const char *machine) +{ + struct MachInfo *machines; + int i; + + machines =3D qtest_get_machines(); + + for (i =3D 0; machines[i].name !=3D NULL; i++) { + if (g_str_equal(machine, machines[i].name) || + (machines[i].alias && g_str_equal(machine, machines[i].alias))= ) { + return true; + } + } + + return false; +} + /* * Generic hot-plugging test via the device_add QMP commands. */ diff --git a/tests/qtest/prom-env-test.c b/tests/qtest/prom-env-test.c index f41d80154a..bdbb01d8e5 100644 --- a/tests/qtest/prom-env-test.c +++ b/tests/qtest/prom-env-test.c @@ -71,9 +71,11 @@ static void add_tests(const char *machines[]) char *name; =20 for (i =3D 0; machines[i] !=3D NULL; i++) { - name =3D g_strdup_printf("prom-env/%s", machines[i]); - qtest_add_data_func(name, machines[i], test_machine); - g_free(name); + if (qtest_has_machine(machines[i])) { + name =3D g_strdup_printf("prom-env/%s", machines[i]); + qtest_add_data_func(name, machines[i], test_machine); + g_free(name); + } } } =20 --=20 2.27.0