From nobody Fri Apr 19 16:00:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1552492289814195.59744709895108; Wed, 13 Mar 2019 08:51:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD46B3018991; Wed, 13 Mar 2019 15:51:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B54666A96F; Wed, 13 Mar 2019 15:51:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 778BC181A13C; Wed, 13 Mar 2019 15:51:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2DFpQrs001338 for ; Wed, 13 Mar 2019 11:51:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 115FE6A96F; Wed, 13 Mar 2019 15:51:26 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-124-40.rdu2.redhat.com [10.10.124.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7FEC66B8C4; Wed, 13 Mar 2019 15:51:25 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 13 Mar 2019 11:51:10 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 01/11] tests: Add several net model passthrough tests X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 13 Mar 2019 15:51:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Examples of passing unknown strings through Signed-off-by: Cole Robinson --- tests/qemuxml2argvdata/net-many-models.args | 39 ++++++++++++++ tests/qemuxml2argvdata/net-many-models.xml | 37 +++++++++++++ tests/qemuxml2argvtest.c | 1 + tests/qemuxml2xmloutdata/net-many-models.xml | 53 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + tests/xlconfigdata/test-net-fakemodel.cfg | 24 +++++++++ tests/xlconfigdata/test-net-fakemodel.xml | 39 ++++++++++++++ tests/xlconfigtest.c | 1 + .../test-paravirt-net-fakemodel.cfg | 13 +++++ .../test-paravirt-net-fakemodel.xml | 40 ++++++++++++++ .../test-paravirt-net-modelstr.cfg | 13 +++++ tests/xmconfigtest.c | 1 + .../xml2sexpr-fv-net-many-models.sexpr | 1 + .../xml2sexpr-fv-net-many-models.xml | 43 +++++++++++++++ tests/xml2sexprtest.c | 1 + 15 files changed, 307 insertions(+) create mode 100644 tests/qemuxml2argvdata/net-many-models.args create mode 100644 tests/qemuxml2argvdata/net-many-models.xml create mode 100644 tests/qemuxml2xmloutdata/net-many-models.xml create mode 100644 tests/xlconfigdata/test-net-fakemodel.cfg create mode 100644 tests/xlconfigdata/test-net-fakemodel.xml create mode 100644 tests/xmconfigdata/test-paravirt-net-fakemodel.cfg create mode 100644 tests/xmconfigdata/test-paravirt-net-fakemodel.xml create mode 100644 tests/xmconfigdata/test-paravirt-net-modelstr.cfg create mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-many-models.sexpr create mode 100644 tests/xml2sexprdata/xml2sexpr-fv-net-many-models.xml diff --git a/tests/qemuxml2argvdata/net-many-models.args b/tests/qemuxml2ar= gvdata/net-many-models.args new file mode 100644 index 0000000000..69909fc699 --- /dev/null +++ b/tests/qemuxml2argvdata/net-many-models.args @@ -0,0 +1,39 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-netdev user,id=3Dhostnet0 \ +-device idontexist,netdev=3Dhostnet0,id=3Dnet0,mac=3D00:11:22:33:44:55,bus= =3Dpci.0,\ +addr=3D0x3 \ +-netdev user,id=3Dhostnet1 \ +-device vmxnet3,netdev=3Dhostnet1,id=3Dnet1,mac=3D00:11:22:33:44:56,bus=3D= pci.0,\ +addr=3D0x4 \ +-netdev user,id=3Dhostnet2 \ +-device netfront,netdev=3Dhostnet2,id=3Dnet2,mac=3D00:11:22:33:44:57,bus= =3Dpci.0,\ +addr=3D0x5 \ +-netdev user,id=3Dhostnet3 \ +-device virtio-net-pci,netdev=3Dhostnet3,id=3Dnet3,mac=3D00:11:22:33:44:58= ,bus=3Dpci.0,\ +addr=3D0x6 \ +-netdev user,id=3Dhostnet4 \ +-device ne2k_pci,netdev=3Dhostnet4,id=3Dnet4,mac=3D00:11:22:33:44:58,bus= =3Dpci.0,\ +addr=3D0x7 \ +-netdev user,id=3Dhostnet5 \ +-device pcnet,netdev=3Dhostnet5,id=3Dnet5,mac=3D00:11:22:33:44:58,bus=3Dpc= i.0,addr=3D0x8 diff --git a/tests/qemuxml2argvdata/net-many-models.xml b/tests/qemuxml2arg= vdata/net-many-models.xml new file mode 100644 index 0000000000..2b8f9b18eb --- /dev/null +++ b/tests/qemuxml2argvdata/net-many-models.xml @@ -0,0 +1,37 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + + hvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 03e8d79595..26e869f881 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1347,6 +1347,7 @@ mymain(void) DO_TEST("net-eth-hostip", NONE); DO_TEST("net-client", NONE); DO_TEST("net-server", NONE); + DO_TEST("net-many-models", NONE); DO_TEST("net-mcast", NONE); DO_TEST("net-udp", NONE); DO_TEST("net-hostdev", NONE); diff --git a/tests/qemuxml2xmloutdata/net-many-models.xml b/tests/qemuxml2x= mloutdata/net-many-models.xml new file mode 100644 index 0000000000..8fb3be920b --- /dev/null +++ b/tests/qemuxml2xmloutdata/net-many-models.xml @@ -0,0 +1,53 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 83a0d1cf7b..03a6b8741e 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -433,6 +433,7 @@ mymain(void) DO_TEST("net-bandwidth2", NONE); DO_TEST("net-mtu", NONE); DO_TEST("net-coalesce", NONE); + DO_TEST("net-many-models", NONE); =20 DO_TEST("serial-tcp-tlsx509-chardev", NONE); DO_TEST("serial-tcp-tlsx509-chardev-notls", NONE); diff --git a/tests/xlconfigdata/test-net-fakemodel.cfg b/tests/xlconfigdata= /test-net-fakemodel.cfg new file mode 100644 index 0000000000..70bd922ac0 --- /dev/null +++ b/tests/xlconfigdata/test-net-fakemodel.cfg @@ -0,0 +1,24 @@ +name =3D "XenGuest2" +uuid =3D "c7a5fdb2-cdaf-9455-926a-d65c16db1809" +maxmem =3D 579 +memory =3D 394 +vcpus =3D 1 +pae =3D 1 +acpi =3D 1 +apic =3D 1 +viridian =3D 0 +rtc_timeoffset =3D 0 +localtime =3D 0 +on_poweroff =3D "destroy" +on_reboot =3D "restart" +on_crash =3D "restart" +device_model =3D "/usr/lib/xen/bin/qemu-system-i386" +sdl =3D 0 +vnc =3D 1 +vncunused =3D 1 +vnclisten =3D "127.0.0.1" +vif =3D [ "mac=3D00:16:3e:66:92:9c,bridge=3Dxenbr1,script=3Dvif-bridge,mod= el=3Dfakemodel" ] +parallel =3D "none" +serial =3D "none" +builder =3D "hvm" +boot =3D "d" diff --git a/tests/xlconfigdata/test-net-fakemodel.xml b/tests/xlconfigdata= /test-net-fakemodel.xml new file mode 100644 index 0000000000..b9afbac78d --- /dev/null +++ b/tests/xlconfigdata/test-net-fakemodel.xml @@ -0,0 +1,39 @@ + + XenGuest2 + c7a5fdb2-cdaf-9455-926a-d65c16db1809 + 592896 + 403456 + 1 + + hvm + /usr/lib/xen/boot/hvmloader + + + + + + + + + destroy + restart + restart + + /usr/lib/xen/bin/qemu-system-i386 + + + +