From nobody Fri Oct 18 09:18:09 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=1685092171; cv=none; d=zohomail.com; s=zohoarc; b=MCG1gkfhDHeXFHgEJHVKk/ARHCl9J9EwfHbLC9E9oxRUlg2RmMra8b2HEWI2O5lsRKz917qI/z/kXf4L11za0FnCOHLqhejpOjIj5g0qfvh/kEKICWJ0FvThlWoZkay8CML6zvjdbkNfymzlwZbXaef/njG+j4d/fGFBroJBIJQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685092171; 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=a9I59SkqBH9pEciiDCZ+t1+clxWRnm4DnxLKkEpRnlA=; b=Ew+mH2DG/Zh7EL5/5H0c9QjsxPVGHzYo8rRMIeF6hUIVP1VHl9RBnSrYp/RcC3vUSrb/NDT46/TlUYyTs1qC14no8sP2CAkZtQ0XV2mZZtH3M7P+fPCfsxNWaT1B0IVdSqy5piM+BX1LVOrxXhZ9Jfv5TUPwqGPuyD2+STT6vpo= 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 1685092171845135.8054598648622; Fri, 26 May 2023 02:09:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2TRS-0002zc-BF; Fri, 26 May 2023 05:08:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2TRQ-0002yY-Qj for qemu-devel@nongnu.org; Fri, 26 May 2023 05:08:56 -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 1q2TRO-0000iI-Tg for qemu-devel@nongnu.org; Fri, 26 May 2023 05:08:56 -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-296-rKknUq7gNi-Y11Q2ZRlgVA-1; Fri, 26 May 2023 05:08:51 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4341C101A53A; Fri, 26 May 2023 09:08:51 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.252]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8387FC15612; Fri, 26 May 2023 09:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685092133; 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=a9I59SkqBH9pEciiDCZ+t1+clxWRnm4DnxLKkEpRnlA=; b=ORq0e+7ccn1T78tETtpHNvab1YdARixv/Jyo83un6E5UoCmfv6HvpQ4m0ZVC1+pbUB1yPv aKaT13aSwEwopjsdf/FM/frzKrjiwnUbIvjnZQbsT/OjNT/M7EuIO7i0IzTGRBrJjz6VX8 jZH4EK4/a9Yeehx6/neWH4ycicB2Bc8= X-MC-Unique: rKknUq7gNi-Y11Q2ZRlgVA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ani Sinha Subject: [PULL 08/15] tests/qtest/usb-hcd-uhci-test: Check whether "usb-storage" is available Date: Fri, 26 May 2023 11:08:33 +0200 Message-Id: <20230526090840.2225958-9-thuth@redhat.com> In-Reply-To: <20230526090840.2225958-1-thuth@redhat.com> References: <20230526090840.2225958-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1685092173849100007 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. Message-Id: <20230525081016.1870364-2-thuth@redhat.com> Reviewed-by: Ani Sinha Signed-off-by: Thomas Huth --- 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