From nobody Sun Nov 9 22:28:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551982469585655.7309440314069; Thu, 7 Mar 2019 10:14:29 -0800 (PST) Received: from localhost ([127.0.0.1]:56705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1xXC-0005tk-6g for importer@patchew.org; Thu, 07 Mar 2019 13:14:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1wrD-0003h9-1X for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:31:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1wrB-0008Ss-VF for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:30:59 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:42118) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1wrB-0008SP-NL for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:30:57 -0500 Received: by mail-wr1-x42e.google.com with SMTP id r5so18400785wrg.9 for ; Thu, 07 Mar 2019 09:30:57 -0800 (PST) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id d206sm9979753wmc.11.2019.03.07.09.30.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 09:30:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=WuoT7moNiniyy5E4tyJZKlz/EpLBidJuzX7Y/2osm+I=; b=l12qZLAj8kiCvnC6mt5K81YAlJLxcqKbri65Z5RqMA3Iwo2HBuRQlYQqadNEgDReY2 LkXyJUTSi9yRFz0z0unEBlpTsPi1ndcK/tgnyr/S7i50M5usDrmsB58JJpA8f4Qyjfbc 8NSuNwmjPYx0+VbaXDQO9y+myRJ/w0AfCBD+dxjMm6LWSrXQgUg9/cKpBhcp1OzCKuMA 8heoZc/4KfClVt9e42syVhTEA99rpC43R5Kx1KpbHgq2qRVwFYk3slRRKXTf6t07SwB/ er3i0JGZIFCfvgIbXqKi3YnR/T0FNxEFwMaj34dpIRx68XsY4vHjClpmzMLBqVUpy+Gq lexA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=WuoT7moNiniyy5E4tyJZKlz/EpLBidJuzX7Y/2osm+I=; b=YllHyM+WSUL3FX4TNEttIEi8+7oWWwUeDcO1LDaNhvP+RwHkOpzaA1LdBkLxVxcCJm 7pBDSqJdMBXkB99DGhTCH3ewyWImys4bRjFL+8Ffmw+/WSJrHmC/DIDTzkKXDkSk1K+r my2tnyQ/ZoKxNacAzHSrPumIbyU0ogtPaxwo3Y7p9W4ldwaOgsW/rdGFTQ4WZbn/ZuoI oTFspN/qdd1UUdJPPrluJcjomlI3sA8OpqTcbaf5aYx5u+AsatSbDaTQwKOoCwy/rPRL NtWbNyyuQTP1po1cJbntCUgS1W3pfyO3niuzFVDskaytQpvvy5fIcTiJWH2FJckNuyiW Cn7Q== X-Gm-Message-State: APjAAAUQ9uyzizzQpy7YMPUw+pKCWr+cn8BRn/Xhqix7HIiaZB9kHRmY YguqBAs5x81S7x1nCBVQymDGQ4ik X-Google-Smtp-Source: APXvYqyfaaGmQI13gEy0ufNv6iewx5Tt9dWyB7fNHHshxmGy61EiUfxjC701oAWoNoan/e6QMTLnUA== X-Received: by 2002:a5d:558c:: with SMTP id i12mr7577453wrv.19.1551979856493; Thu, 07 Mar 2019 09:30:56 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 7 Mar 2019 18:29:51 +0100 Message-Id: <1551979804-6060-45-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1551979804-6060-1-git-send-email-pbonzini@redhat.com> References: <1551979804-6060-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e Subject: [Qemu-devel] [PULL 44/57] 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: thuth@redhat.com, lviver@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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 09483d0..b4b53ca 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -161,7 +161,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-$(CONFIG_VIRTIO) +=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-$(CONFIG_VGA) +=3D tests/display-vga-test$(EXESUF) @@ -254,7 +253,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-$(CONFIG_VIRTIO) +=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) @@ -728,18 +726,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-$(CONFIG_VIRTFS) +=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 @@ -819,7 +818,7 @@ 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/device-plug-test$(EXESUF): tests/device-plug-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