From nobody Thu Nov 6 19:19:13 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 14883598842671002.5266543305553; Wed, 1 Mar 2017 01:18:04 -0800 (PST) Received: from localhost ([::1]:39217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cj0OY-0004pd-Ql for importer@patchew.org; Wed, 01 Mar 2017 04:18:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cj0DN-0003hb-Re for qemu-devel@nongnu.org; Wed, 01 Mar 2017 04:06:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cj0DN-0001jr-3J for qemu-devel@nongnu.org; Wed, 01 Mar 2017 04:06:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50490) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cj0DM-0001jn-Te for qemu-devel@nongnu.org; Wed, 01 Mar 2017 04:06:29 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B16F3D940 for ; Wed, 1 Mar 2017 09:06:29 +0000 (UTC) Received: from localhost (ovpn-116-175.phx2.redhat.com [10.3.116.175]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2196RBA006595; Wed, 1 Mar 2017 04:06:28 -0500 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 1 Mar 2017 13:04:50 +0400 Message-Id: <20170301090453.11075-26-marcandre.lureau@redhat.com> In-Reply-To: <20170301090453.11075-1-marcandre.lureau@redhat.com> References: <20170301090453.11075-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 01 Mar 2017 09:06:29 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 25/28] tests: allows to run single test in usb-hcd-ehci-test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" pci_init() shouldn't be a test function, but instead called before any test. This allows to run a single test with -p /x86_64/ehci/.... Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Gerd Hoffmann --- tests/usb-hcd-ehci-test.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/usb-hcd-ehci-test.c b/tests/usb-hcd-ehci-test.c index 57af8a034e..fba84b4bee 100644 --- a/tests/usb-hcd-ehci-test.c +++ b/tests/usb-hcd-ehci-test.c @@ -50,11 +50,8 @@ static void ehci_port_test(struct qhc *hc, int port, uin= t32_t expect) =20 /* tests */ =20 -static void pci_init(void) +static void test_init(void) { - if (pcibus) { - return; - } pcibus =3D qpci_init_pc(NULL); g_assert(pcibus !=3D NULL); =20 @@ -142,7 +139,7 @@ int main(int argc, char **argv) int ret; =20 g_test_init(&argc, &argv, NULL); - qtest_add_func("/ehci/pci/init", pci_init); + 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); @@ -161,6 +158,8 @@ int main(int argc, char **argv) "-drive if=3Dnone,id=3Dusbcdrom,media=3Dcdrom " "-device usb-tablet,bus=3Dich9-ehci-1.0,port=3D1,usb_versi= on=3D1 " "-device usb-storage,bus=3Dich9-ehci-1.0,port=3D2,drive=3D= usbcdrom "); + + test_init(); ret =3D g_test_run(); =20 qtest_end(); --=20 2.12.0.rc2.3.gc93709801