From nobody Mon Feb 9 01:00:55 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1702644892674351.38266401854924; Fri, 15 Dec 2023 04:54:52 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 8D5AB1A05; Fri, 15 Dec 2023 07:54:51 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id AA7BD1B18; Fri, 15 Dec 2023 07:35:19 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id BAA291A37; Fri, 15 Dec 2023 07:34:08 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id EC2C41A1A for ; Fri, 15 Dec 2023 07:33:41 -0500 (EST) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-455-bMrvubndPmaVMDycCwqubw-1; Fri, 15 Dec 2023 07:33:40 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0C82D38062A7 for ; Fri, 15 Dec 2023 12:33:40 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 863CE1C060B1 for ; Fri, 15 Dec 2023 12:33:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: bMrvubndPmaVMDycCwqubw-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 11/19] qemuxml*test: Improve 'vhost_queues' test case Date: Fri, 15 Dec 2023 13:33:21 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: 3COF4PQG6FEGU3NZGZH6FENH6GGR63E5 X-Message-ID-Hash: 3COF4PQG6FEGU3NZGZH6FENH6GGR63E5 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1702644894209100001 Modify the test case so that it can be used also for qemuxml2argvtest by removing invalid configuration (interface type=3D'user' + queues), clean up unneeded disks and rename it accordingly. Also test the ioeventfd. Signed-off-by: Peter Krempa --- .../net-virtio-vhost.x86_64-latest.args | 42 +++++++++++++++++++ ...{vhost_queues.xml =3D> net-virtio-vhost.xml} | 25 +++++------ tests/qemuxml2argvtest.c | 1 + ...xml =3D> net-virtio-vhost.x86_64-latest.xml} | 29 +++++++------ tests/qemuxml2xmltest.c | 2 +- 5 files changed, 69 insertions(+), 30 deletions(-) create mode 100644 tests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.a= rgs rename tests/qemuxml2argvdata/{vhost_queues.xml =3D> net-virtio-vhost.xml}= (67%) rename tests/qemuxml2xmloutdata/{vhost_queues.x86_64-latest.xml =3D> net-v= irtio-vhost.x86_64-latest.xml} (78%) diff --git a/tests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.args b/t= ests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.args new file mode 100644 index 0000000000..eabe768169 --- /dev/null +++ b/tests/qemuxml2argvdata/net-virtio-vhost.x86_64-latest.args @@ -0,0 +1,42 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3Dtest,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Doff \ +-accel tcg \ +-cpu qemu64 \ +-m size=3D1048576k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}= ' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid bba65c0e-c049-934f-b6aa-4e2c0582acdf \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot menu=3Don,strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0"= ,"addr":"0x6"}' \ +-netdev '{"type":"tap","fds":"3:4:5:6:7","vhost":true,"vhostfds":"44:45:46= :47:48","id":"hostnet0"}' \ +-device '{"driver":"virtio-net-pci","mq":true,"vectors":12,"netdev":"hostn= et0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \ +-netdev '{"type":"tap","fd":"3","vhost":true,"vhostfd":"44","id":"hostnet1= "}' \ +-device '{"driver":"virtio-net-pci","ioeventfd":true,"netdev":"hostnet1","= id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \ +-netdev '{"type":"tap","fds":"3:4:5:6:7","vhost":true,"vhostfds":"44:45:46= :47:48","id":"hostnet2"}' \ +-device '{"driver":"virtio-net-pci","ioeventfd":true,"mq":true,"vectors":1= 2,"netdev":"hostnet2","id":"net2","mac":"52:54:00:e5:48:5a","bus":"pci.0","= addr":"0x4"}' \ +-chardev pty,id=3Dcharserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","in= dex":0}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x5"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/vhost_queues.xml b/tests/qemuxml2argvda= ta/net-virtio-vhost.xml similarity index 67% rename from tests/qemuxml2argvdata/vhost_queues.xml rename to tests/qemuxml2argvdata/net-virtio-vhost.xml index 2e38f2dad3..9d1feabe68 100644 --- a/tests/qemuxml2argvdata/vhost_queues.xml +++ b/tests/qemuxml2argvdata/net-virtio-vhost.xml @@ -16,30 +16,27 @@ restart /usr/bin/qemu-system-x86_64 - - - - -
- - - - - - -
-
- + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 22fd35809b..13d279b301 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1379,6 +1379,7 @@ mymain(void) DO_TEST_CAPS_LATEST("net-virtio-device"); DO_TEST_CAPS_LATEST("net-virtio-disable-offloads"); DO_TEST_CAPS_LATEST("net-virtio-netdev"); + DO_TEST_CAPS_LATEST("net-virtio-vhost"); DO_TEST_CAPS_ARCH_LATEST("net-virtio-ccw", "s390x"); DO_TEST_CAPS_LATEST("net-virtio-rxtxqueuesize"); DO_TEST_CAPS_LATEST_PARSE_ERROR("net-virtio-rxqueuesize-invalid-size"); diff --git a/tests/qemuxml2xmloutdata/vhost_queues.x86_64-latest.xml b/test= s/qemuxml2xmloutdata/net-virtio-vhost.x86_64-latest.xml similarity index 78% rename from tests/qemuxml2xmloutdata/vhost_queues.x86_64-latest.xml rename to tests/qemuxml2xmloutdata/net-virtio-vhost.x86_64-latest.xml index 8fbc4ccc99..66630c2697 100644 --- a/tests/qemuxml2xmloutdata/vhost_queues.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/net-virtio-vhost.x86_64-latest.xml @@ -19,19 +19,6 @@ restart /usr/bin/qemu-system-x86_64 - - - - -
- - - - - - -
-
@@ -42,12 +29,24 @@
- +
+ + + + +
+ + + + + +
+ @@ -60,7 +59,7 @@