From nobody Tue Feb 10 02:42:39 2026 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.zohomail.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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1543853730215186.9255044353955; Mon, 3 Dec 2018 08:15:30 -0800 (PST) Received: from localhost ([::1]:50383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTqsa-0003Gy-P9 for importer@patchew.org; Mon, 03 Dec 2018 11:15:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTqFy-00026z-SU for qemu-devel@nongnu.org; Mon, 03 Dec 2018 10:35:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTqFx-0006FS-OX for qemu-devel@nongnu.org; Mon, 03 Dec 2018 10:35:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34890) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gTqFx-0006Em-GN for qemu-devel@nongnu.org; Mon, 03 Dec 2018 10:35:33 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4C383082E50; Mon, 3 Dec 2018 15:35:32 +0000 (UTC) Received: from 640k.localdomain.com (ovpn-112-19.ams2.redhat.com [10.36.112.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48FF018E30; Mon, 3 Dec 2018 15:35:29 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 3 Dec 2018 16:33:11 +0100 Message-Id: <1543851204-41186-59-git-send-email-pbonzini@redhat.com> In-Reply-To: <1543851204-41186-1-git-send-email-pbonzini@redhat.com> References: <1543851204-41186-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 03 Dec 2018 15:35:32 +0000 (UTC) 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] [PATCH 58/71] tests: move virtio entirely to qos-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: Thomas Huth , Emanuele Giuseppe Esposito , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The only remaining test that needs libqos-virtio-obj-y is drive_del-test, which really only needs a function. Move that function to the test and remove libqos-virtio-obj-y. Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 9 ++++----- tests/drive_del-test.c | 25 +++++++++++++++++++------ tests/libqos/virtio.c | 18 ------------------ tests/libqos/virtio.h | 1 - 4 files changed, 23 insertions(+), 30 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 34d1e5f..c0b370b 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -151,7 +151,6 @@ check-qtest-pci-$(CONFIG_NE2000_PCI) +=3D tests/ne2000-= test$(EXESUF) check-qtest-pci-$(CONFIG_NVME_PCI) +=3D tests/nvme-test$(EXESUF) check-qtest-pci-$(CONFIG_AC97) +=3D tests/ac97-test$(EXESUF) check-qtest-pci-$(CONFIG_ES1370) +=3D tests/es1370-test$(EXESUF) -check-qtest-pci-y +=3D $(check-qtest-virtio-y) check-qtest-pci-$(CONFIG_IPACK) +=3D tests/tpci200-test$(EXESUF) check-qtest-pci-$(CONFIG_IPACK) +=3D $(check-qtest-ipack-y) check-qtest-pci-y +=3D tests/display-vga-test$(EXESUF) @@ -234,7 +233,6 @@ check-qtest-ppc64-$(CONFIG_SLIRP) +=3D tests/pxe-test$(= EXESUF) check-qtest-ppc64-$(CONFIG_USB_OHCI) +=3D tests/usb-hcd-ohci-test$(EXESUF) check-qtest-ppc64-$(CONFIG_USB_UHCI) +=3D tests/usb-hcd-uhci-test$(EXESUF) check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) +=3D tests/usb-hcd-xhci-test$(EXE= SUF) -check-qtest-ppc64-y +=3D $(check-qtest-virtio-y) check-qtest-ppc64-$(CONFIG_SLIRP) +=3D tests/test-netfilter$(EXESUF) check-qtest-ppc64-$(CONFIG_POSIX) +=3D tests/test-filter-mirror$(EXESUF) check-qtest-ppc64-$(CONFIG_RTL8139_PCI) +=3D tests/test-filter-redirector$= (EXESUF) @@ -654,18 +652,19 @@ libqos-pc-obj-y +=3D tests/libqos/ahci.o libqos-omap-obj-y =3D $(libqos-obj-y) tests/libqos/i2c-omap.o libqos-imx-obj-y =3D $(libqos-obj-y) tests/libqos/i2c-imx.o libqos-usb-obj-y =3D $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/libqos= /usb.o -libqos-virtio-obj-y =3D $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/lib= qos/virtio.o tests/libqos/virtio-pci.o tests/libqos/virtio-mmio.o =20 # Devices qos-test-obj-y =3D tests/qos-test.o $(libqgraph-obj-y) qos-test-obj-y +=3D $(libqos-pc-obj-y) $(libqos-spapr-obj-y) qos-test-obj-y +=3D tests/libqos/e1000e.o qos-test-obj-y +=3D tests/libqos/sdhci.o -qos-test-obj-y +=3D $(libqos-virtio-obj-y) +qos-test-obj-y +=3D tests/libqos/virtio.o qos-test-obj-y +=3D tests/libqos/virtio-9p.o qos-test-obj-y +=3D tests/libqos/virtio-balloon.o qos-test-obj-y +=3D tests/libqos/virtio-blk.o +qos-test-obj-y +=3D tests/libqos/virtio-mmio.o qos-test-obj-y +=3D tests/libqos/virtio-net.o +qos-test-obj-y +=3D tests/libqos/virtio-pci.o qos-test-obj-y +=3D tests/libqos/virtio-rng.o qos-test-obj-y +=3D tests/libqos/virtio-scsi.o qos-test-obj-y +=3D tests/libqos/virtio-serial.o @@ -743,7 +742,7 @@ tests/ipoctal232-test$(EXESUF): tests/ipoctal232-test.o tests/qom-test$(EXESUF): tests/qom-test.o tests/test-hmp$(EXESUF): tests/test-hmp.o tests/machine-none-test$(EXESUF): tests/machine-none-test.o -tests/drive_del-test$(EXESUF): tests/drive_del-test.o $(libqos-virtio-obj-= y) +tests/drive_del-test$(EXESUF): tests/drive_del-test.o tests/nvme-test$(EXESUF): tests/nvme-test.o $(libqos-pc-obj-y) tests/pvpanic-test$(EXESUF): tests/pvpanic-test.o tests/i82801b11-test$(EXESUF): tests/i82801b11-test.o diff --git a/tests/drive_del-test.c b/tests/drive_del-test.c index 4a1a088..2f9474e 100644 --- a/tests/drive_del-test.c +++ b/tests/drive_del-test.c @@ -63,6 +63,24 @@ static void test_drive_without_dev(void) qtest_end(); } =20 +/* + * qvirtio_get_dev_type: + * Returns: the preferred virtio bus/device type for the current architect= ure. + * TODO: delete this + */ +static const char *qvirtio_get_dev_type(void) +{ + const char *arch =3D qtest_get_arch(); + + if (g_str_equal(arch, "arm") || g_str_equal(arch, "aarch64")) { + return "device"; /* for virtio-mmio */ + } else if (g_str_equal(arch, "s390x")) { + return "ccw"; + } else { + return "pci"; + } +} + static void test_after_failed_device_add(void) { char driver[32]; @@ -119,16 +137,11 @@ static void test_drive_del_device_del(void) =20 int main(int argc, char **argv) { - const char *arch =3D qtest_get_arch(); - g_test_init(&argc, &argv, NULL); =20 qtest_add_func("/drive_del/without-dev", test_drive_without_dev); =20 - /* TODO I guess any arch with a hot-pluggable virtio bus would do */ - if (!strcmp(arch, "i386") || !strcmp(arch, "x86_64") || - !strcmp(arch, "ppc") || !strcmp(arch, "ppc64") || - !strcmp(arch, "s390x")) { + if (qvirtio_get_dev_type() !=3D NULL) { qtest_add_func("/drive_del/after_failed_device_add", test_after_failed_device_add); qtest_add_func("/blockdev/drive_del_device_del", diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c index e4925d1..5e8f39b 100644 --- a/tests/libqos/virtio.c +++ b/tests/libqos/virtio.c @@ -350,24 +350,6 @@ void qvirtqueue_set_used_event(QVirtQueue *vq, uint16_= t idx) writew(vq->avail + 4 + (2 * vq->size), idx); } =20 -/* - * qvirtio_get_dev_type: - * Returns: the preferred virtio bus/device type for the current architect= ure. - * TODO: delete this - */ -const char *qvirtio_get_dev_type(void) -{ - const char *arch =3D qtest_get_arch(); - - if (g_str_equal(arch, "arm") || g_str_equal(arch, "aarch64")) { - return "device"; /* for virtio-mmio */ - } else if (g_str_equal(arch, "s390x")) { - return "ccw"; - } else { - return "pci"; - } -} - void qvirtio_start_device(QVirtioDevice *vdev) { qvirtio_reset(vdev); diff --git a/tests/libqos/virtio.h b/tests/libqos/virtio.h index 3f97d79..51d2359 100644 --- a/tests/libqos/virtio.h +++ b/tests/libqos/virtio.h @@ -142,7 +142,6 @@ bool qvirtqueue_get_buf(QVirtQueue *vq, uint32_t *desc_= idx, uint32_t *len); =20 void qvirtqueue_set_used_event(QVirtQueue *vq, uint16_t idx); =20 -const char *qvirtio_get_dev_type(void); void qvirtio_start_device(QVirtioDevice *vdev); =20 #endif --=20 1.8.3.1