From nobody Thu Apr 25 04:52:30 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=1685002325; cv=none; d=zohomail.com; s=zohoarc; b=F2lBVWiNoAd/bp73gHV4Xb6J0uXwT1CDgpMDacq03OlCbYTcCveMiY6ImnqpIc2J0LJPShWCzvT8RdSNeHLDk4XyXvbSfVKLKLjvD+66fnQKrV/P/15lQHpaCW3BoX3wq4Hlq5aSOqMWaG1FDpN6GFRusaZYWY1FC/KZuWyo0C8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685002325; h=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=Qf0QEysBQmLAUzrcgp/g/w9XEAIZGYggIR7IKiFLMNQ=; b=SO0Ia6nPKw7BbIQOR6vvI4Qr3Yxf0pm5HH6SeRDMkBMelchRYvD9V+o5fR1sADNA6PT5qauzC7wtRU9d8IrHmDq47vOD4vz/Al1QkwFTegAzQd+WLeRoV4lWmvpWJIIUClnwXQXnyLTWcIcDieaE/TRa5v246BLrQLhxpb+ltTI= 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 168500232530183.60250514260542; Thu, 25 May 2023 01:12:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q263o-0007Zk-A4; Thu, 25 May 2023 04:11:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q263I-0007Ps-NQ for qemu-devel@nongnu.org; Thu, 25 May 2023 04:10:29 -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 1q263G-0001lp-2c for qemu-devel@nongnu.org; Thu, 25 May 2023 04:10:28 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-497-QtGDvFfiNDihqvfqAEjPAg-1; Thu, 25 May 2023 04:10:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2B8B0811E86; Thu, 25 May 2023 08:10:23 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB91A40C1258; Thu, 25 May 2023 08:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685002225; 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=Qf0QEysBQmLAUzrcgp/g/w9XEAIZGYggIR7IKiFLMNQ=; b=fSlnj+bh8XOPoolS5G4dRKyheDoWsM+dr7IRsaFucPE2j2D1fjivMY+M1B15dTJe/OhgLj 7ckmp+TNucen0sntHmV+Y7yIo5Ckx2NIXdihqhckvmhObVwZWVFqBLU3Wk6c+x8G3mtgun noEPxyUdw88xzZ+IKKG7XDBOQLqN2BU= X-MC-Unique: QtGDvFfiNDihqvfqAEjPAg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier , Fabiano Rosas Cc: Ani Sinha , Igor Mammedov , "Michael S. Tsirkin" , John Snow Subject: [PATCH 1/4] tests/qtest/usb-hcd-uhci-test: Check whether "usb-storage" is available Date: Thu, 25 May 2023 10:10:13 +0200 Message-Id: <20230525081016.1870364-2-thuth@redhat.com> In-Reply-To: <20230525081016.1870364-1-thuth@redhat.com> References: <20230525081016.1870364-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1685002326686100007 Content-Type: text/plain; charset="utf-8" The "usb-storage" device might not have been compiled into the binary (e.g. when compiling with "--without-default-devices"), so we have to check first before using it. Signed-off-by: Thomas Huth Reviewed-by: Ani Sinha --- tests/qtest/usb-hcd-uhci-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qtest/usb-hcd-uhci-test.c b/tests/qtest/usb-hcd-uhci-tes= t.c index 84ac2f3c1a..28751f53da 100644 --- a/tests/qtest/usb-hcd-uhci-test.c +++ b/tests/qtest/usb-hcd-uhci-test.c @@ -74,7 +74,9 @@ int main(int argc, char **argv) qtest_add_func("/uhci/pci/init", test_uhci_init); qtest_add_func("/uhci/pci/port1", test_port_1); qtest_add_func("/uhci/pci/hotplug", test_uhci_hotplug); - qtest_add_func("/uhci/pci/hotplug/usb-storage", test_usb_storage_hotpl= ug); + if (qtest_has_device("usb-storage")) { + qtest_add_func("/uhci/pci/hotplug/usb-storage", test_usb_storage_h= otplug); + } =20 if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { qs =3D qtest_pc_boot("%s", cmd); --=20 2.31.1 From nobody Thu Apr 25 04:52:30 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=1685002302; cv=none; d=zohomail.com; s=zohoarc; b=gh6m3bk1UfLPfzjj7ICHStoGqOwfKGxSDyTFwYNyVUp9603wjBXOOauU/V18PGxFSnZGAmxDGqJhmj2d8Qn5BmEoKhe5/Sc5JS6qc5j0tXToieW44jJnGUENqonJ15bt/NrwAYsMRrEekTscI2A2Hl4Wq5MwKWPrHw0DdSOgzNs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685002302; h=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=YkKQUfjL3wE0QSB8TZN27tG7NeesjqAFU0QKdSba0Zc=; b=An7Podo8MpoM/kMGQ0Zktq0wN2z+sq8ClhoQV5qd/Vkd89BnCy7eBclNM+8L0SYpw3SI+22VqHHOhrhOy34xnSvf9jCBgFIY7kifKsufj4Ew/9LvuyJD6fbyB7H36Yz/QhMpr2r6pHhpRPlq28tPjvHFq4SjV5Jz3L58OYyJDL8= 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 1685002302098636.225937343253; Thu, 25 May 2023 01:11:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q263l-0007Ym-GW; Thu, 25 May 2023 04:10:57 -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 1q263L-0007Ut-Bi for qemu-devel@nongnu.org; Thu, 25 May 2023 04:10:35 -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 1q263J-0001os-6G for qemu-devel@nongnu.org; Thu, 25 May 2023 04:10:30 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-31-qGHMK3RIOfC2iBcLEnXMPA-1; Thu, 25 May 2023 04:10:25 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0911185A78B; Thu, 25 May 2023 08:10:24 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BFEE40C1258; Thu, 25 May 2023 08:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685002228; 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=YkKQUfjL3wE0QSB8TZN27tG7NeesjqAFU0QKdSba0Zc=; b=MHfAmZqbLFUR/ieJdVhbCewvZAdVo1J4P6+KdQtcXtVdViW8ziByjpMPAgmCJklAudvJBE RZ+53HiFubTVqfHcRy/yNk2yS5hFF0GRtHC5mhSLqCYM1LHBG/yTH/+IXjvdHqR9SGhOua /+SfLXLdN5vFDuZiymiNBbGTWEU0bpg= X-MC-Unique: qGHMK3RIOfC2iBcLEnXMPA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier , Fabiano Rosas Cc: Ani Sinha , Igor Mammedov , "Michael S. Tsirkin" , John Snow Subject: [PATCH 2/4] tests/qtest: Check for virtio-blk before using -cdrom with the arm virt machine Date: Thu, 25 May 2023 10:10:14 +0200 Message-Id: <20230525081016.1870364-3-thuth@redhat.com> In-Reply-To: <20230525081016.1870364-1-thuth@redhat.com> References: <20230525081016.1870364-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1685002302614100001 Content-Type: text/plain; charset="utf-8" The arm "virt" machine needs "virtio-blk-pci" for devices that get attached via the "-cdrom" option. Since this is an optional device that might not be available in the binary, we should check for the availability of this device first before using it. Signed-off-by: Thomas Huth Reviewed-by: Fabiano Rosas --- tests/qtest/bios-tables-test.c | 2 +- tests/qtest/cdrom-test.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 159e4edb8f..ed1c69cf01 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2164,7 +2164,7 @@ int main(int argc, char *argv[]) } } } else if (strcmp(arch, "aarch64") =3D=3D 0) { - if (has_tcg) { + if (has_tcg && qtest_has_device("virtio-blk-pci")) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/acpihmatvirt", test_acpi_virt_tcg_acpi_hmat); diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c index d1cc375849..f2a8d91929 100644 --- a/tests/qtest/cdrom-test.c +++ b/tests/qtest/cdrom-test.c @@ -264,9 +264,13 @@ int main(int argc, char **argv) const char *armmachines[] =3D { "realview-eb", "realview-eb-mpcore", "realview-pb-a8", "realview-pbx-a9", "versatileab", "versatilepb", "vexpress-a15= ", - "vexpress-a9", "virt", NULL + "vexpress-a9", NULL }; add_cdrom_param_tests(armmachines); + if (qtest_has_device("virtio-blk-pci")) { + const char *virtmachine[] =3D { "virt", NULL }; + add_cdrom_param_tests(virtmachine); + } } else { const char *nonemachine[] =3D { "none", NULL }; add_cdrom_param_tests(nonemachine); --=20 2.31.1 From nobody Thu Apr 25 04:52:30 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=1685002327; cv=none; d=zohomail.com; s=zohoarc; b=T0neGXb1VpytE4+yf+b0vm0/UMJv1lcbd0NZjLYjkREySHAS3ux80X5znvZalUey3cQKmho7X4k8ICcLfZJ+w1eYBP4SOgqeT3mLsW25CihMCbcJ8FvqQLoQ2XENHrTafjbjlC34xUpOcbp5MkwohCJHYeJ7tIuONJbfkwYlVoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685002327; h=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=L/6hVTanJJCeePDiYYpj7FAlQnkkPLhqWkjlTZACNuU=; b=HJ6QO9IEU9sJkWatxGcrAcDpDkdViHQquM1KWmOQNvFAWSRhGzO1fLts+buOPzZi8cRw1S+f0xY54DEn0VzieH82ZJW2tr8yi7Ca7G0mlr5Nosk3Fhz1FC234P48quyC6CiWcjqtelHw+BsGnkFDGXqF+2qjDsrvnjSaLKOBdw4= 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 1685002327375216.19052946868737; Thu, 25 May 2023 01:12:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q263o-0007aa-9v; Thu, 25 May 2023 04:11:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q263V-0007Xm-8o for qemu-devel@nongnu.org; Thu, 25 May 2023 04:10:46 -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 1q263P-0001pV-JB for qemu-devel@nongnu.org; Thu, 25 May 2023 04:10:39 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-221-y6ZScc86PnWjkRvtoBlo0Q-1; Thu, 25 May 2023 04:10:26 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E060185A78F; Thu, 25 May 2023 08:10:26 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEC8B400E118; Thu, 25 May 2023 08:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685002230; 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=L/6hVTanJJCeePDiYYpj7FAlQnkkPLhqWkjlTZACNuU=; b=KwdrKm0w2hVu2PakBp8obcUugPiMy0Ez1/9yN42ixAPITzhzaamwZ9GdxlsgaH6SMEdlIn gi8YEGQh13oAuuTQyk/F6l5BhpRz+X3hL7FNiojpdPzvA5MK9h03rB0FlAx1tJU338Fht2 iu6q0itP1KSADSKJd0cBJppn6IUEz74= X-MC-Unique: y6ZScc86PnWjkRvtoBlo0Q-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier , Fabiano Rosas Cc: Ani Sinha , Igor Mammedov , "Michael S. Tsirkin" , John Snow Subject: [PATCH 3/4] tests/qtest/rtl8139-test: Check whether the rtl8139 device is available Date: Thu, 25 May 2023 10:10:15 +0200 Message-Id: <20230525081016.1870364-4-thuth@redhat.com> In-Reply-To: <20230525081016.1870364-1-thuth@redhat.com> References: <20230525081016.1870364-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1685002328686100011 Content-Type: text/plain; charset="utf-8" Though we are already using CONFIG_RTL8139_PCI in the meson.build file for testing whether the rtl8139 device is available or not, this is not enough: The CONFIG switch might have been selected by another target (e.g. the mips fuloong2e machine has the rtl8139 chip soldered on the board), so CONFIG_RTL8139_PCI ends up in config_all_devices and the test then gets executed on x86. We need an additional run-time check to be on the safe side to make this test also work when configure has been run with "--without-default-devices". Signed-off-by: Thomas Huth Reviewed-by: Fabiano Rosas --- tests/qtest/rtl8139-test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c index 4bd240e9ee..4dc0a0d22e 100644 --- a/tests/qtest/rtl8139-test.c +++ b/tests/qtest/rtl8139-test.c @@ -209,6 +209,10 @@ int main(int argc, char **argv) =20 g_test_init(&argc, &argv, NULL); =20 + if (!qtest_has_device("rtl8139")) { + return 0; + } + qtest_start("-device rtl8139"); =20 qtest_add_func("/rtl8139/nop", nop); --=20 2.31.1 From nobody Thu Apr 25 04:52:30 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=1685002298; cv=none; d=zohomail.com; s=zohoarc; b=GET4deTwngchY0kSeH1D4Zd87DnNJFab/iiQDqajtcCoEEkA0mBlQ+y/+H6Bhqwd6PUfybbt8u66Fp0SamoAnBsFDwfGRPhNUvdq5VnUsPezcOnkU0GwoGhvtRWwP1OjVVJzSY92ySBhGgnOQjfmDukcaM1xkeu6Lcd9yMZ/cuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685002298; h=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=vpVT2fqNfBa4t7Ps3X2ZKsZiOwgmV+Yrf6yLOJS3RyI=; b=I0048Et7xKOGne7nAngRSpHV5yEt5x7PbbEfunmhtF/s9KroCWdknGyNTU/Giyq9q6L01Ql9cj+ZR0otutlE5xcq28PCB99ayC3nta56v0n3PuwU0ijZAg52C+4VYQL4TED/cgqtIHEb79qEQonagFKGvtxO6D0pbXHDgU4rxos= 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 1685002298372329.8189221361391; Thu, 25 May 2023 01:11:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q263o-0007ap-NE; Thu, 25 May 2023 04:11:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q263S-0007XV-5U for qemu-devel@nongnu.org; Thu, 25 May 2023 04:10:46 -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 1q263K-0001pF-Bs for qemu-devel@nongnu.org; Thu, 25 May 2023 04:10:32 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-342-133edVTDPX-XzAj37wAIdA-1; Thu, 25 May 2023 04:10:28 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C530D80231B; Thu, 25 May 2023 08:10:27 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7FB4B40C1438; Thu, 25 May 2023 08:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685002229; 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=vpVT2fqNfBa4t7Ps3X2ZKsZiOwgmV+Yrf6yLOJS3RyI=; b=Y/jKVyYy2cQGgX+xWx1cxrJqIsgyrus9MbnPzv+DpgySUhkJhDv0HnThW7ZX7eBYuQu+/w ZVzRmoHs25f6BW+q3SoYg4s5x73HU9+Y1dBMXWowwtM8UiaTxsUp3xSct1VLXaGZbikpj4 JU9CScsLvnqXu95wtZiCcU+fQrcJ8ls= X-MC-Unique: 133edVTDPX-XzAj37wAIdA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier , Fabiano Rosas Cc: Ani Sinha , Igor Mammedov , "Michael S. Tsirkin" , John Snow Subject: [PATCH 4/4] tests/qtest/usb-hcd-ehci-test: Check for EHCI and UHCI HCDs before using them Date: Thu, 25 May 2023 10:10:16 +0200 Message-Id: <20230525081016.1870364-5-thuth@redhat.com> In-Reply-To: <20230525081016.1870364-1-thuth@redhat.com> References: <20230525081016.1870364-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1685002299615100001 Content-Type: text/plain; charset="utf-8" The devices might not be available in the binary (e.g. when compiling with "--without-default-devices"), so we have to check before we can use them. Signed-off-by: Thomas Huth Reviewed-by: Ani Sinha --- tests/qtest/usb-hcd-ehci-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/qtest/usb-hcd-ehci-test.c b/tests/qtest/usb-hcd-ehci-tes= t.c index c51e8bb223..87e37cdd7c 100644 --- a/tests/qtest/usb-hcd-ehci-test.c +++ b/tests/qtest/usb-hcd-ehci-test.c @@ -149,6 +149,11 @@ int main(int argc, char **argv) =20 g_test_init(&argc, &argv, NULL); =20 + if (!qtest_has_device("ich9-usb-ehci1") || + !qtest_has_device("ich9-usb-uhci1")) { + return 0; + } + qtest_add_func("/ehci/pci/uhci-port-1", pci_uhci_port_1); qtest_add_func("/ehci/pci/ehci-port-1", pci_ehci_port_1); qtest_add_func("/ehci/pci/ehci-config", pci_ehci_config); --=20 2.31.1