From nobody Fri May 16 00:56:31 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1503925046958274.1889799134465; Mon, 28 Aug 2017 05:57:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F2398C047B7E; Mon, 28 Aug 2017 12:57:24 +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 C1E6368D5E; Mon, 28 Aug 2017 12:57:24 +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 871DC1806108; Mon, 28 Aug 2017 12:57:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7SCv0CA011348 for ; Mon, 28 Aug 2017 08:57:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id EF7F0784A7; Mon, 28 Aug 2017 12:57:00 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B3117901E for ; Mon, 28 Aug 2017 12:57:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F2398C047B7E Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Date: Mon, 28 Aug 2017 14:56:53 +0200 Message-Id: <423775b69347031fdf63c968ec39a10b57041481.1503924937.git.phrdina@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/5] tests: add qemu chardev srouce reconnect 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: , MIME-Version: 1.0 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 28 Aug 2017 12:57:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- .../qemuxml2argv-channel-reconnect.args | 31 +++++++++++++++ ...uxml2argv-chardev-reconnect-invalid-timeout.xml | 23 +++++++++++ .../qemuxml2argv-chardev-reconnect.args | 40 +++++++++++++++++++ .../qemuxml2argv-chardev-reconnect.xml | 46 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 11 ++++++ 5 files changed, 151 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-channel-reconnect.a= rgs create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect-i= nvalid-timeout.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.a= rgs create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.x= ml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-reconnect.args b/t= ests/qemuxml2argvdata/qemuxml2argv-channel-reconnect.args new file mode 100644 index 0000000000..43a5d5bb3e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-reconnect.args @@ -0,0 +1,31 @@ +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 \ +-M pc \ +-m 214 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-no-acpi \ +-boot c \ +-device virtio-serial-pci,id=3Dvirtio-serial1,bus=3Dpci.0,addr=3D0xa \ +-device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.0,addr=3D0x3 \ +-usb \ +-chardev socket,id=3Dcharchannel0,host=3Dlocalhost,port=3D1234,reconnect= =3D10 \ +-device virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchannel= 0,\ +id=3Dchannel0,name=3Dasdf \ +-chardev socket,id=3Dcharchannel1,path=3D/tmp/channel/domain--1-QEMUGuest1= /fdsa,\ +server,nowait,reconnect=3D10 \ +-device virtserialport,bus=3Dvirtio-serial0.0,nr=3D2,chardev=3Dcharchannel= 1,\ +id=3Dchannel1,name=3Dfdsa diff --git a/tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect-invalid-= timeout.xml b/tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect-invalid= -timeout.xml new file mode 100644 index 0000000000..73dac66816 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect-invalid-timeout= .xml @@ -0,0 +1,23 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 1 + + hvm + + + + /usr/bin/qemu-system-i686 + +
+ + + + + + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.args b/t= ests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.args new file mode 100644 index 0000000000..133a2c6039 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.args @@ -0,0 +1,40 @@ +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 \ +-M pc \ +-m 214 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-no-acpi \ +-boot c \ +-device virtio-serial-pci,id=3Dvirtio-serial1,bus=3Dpci.0,addr=3D0xa \ +-device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.0,addr=3D0x3 \ +-device usb-ccid,id=3Dccid0,bus=3Dusb.0,port=3D1 \ +-usb \ +-chardev socket,id=3Dcharsmartcard0,path=3D/tmp/channel/domain-oldname/asd= f,\ +reconnect=3D20 \ +-device ccid-card-passthru,chardev=3Dcharsmartcard0,id=3Dsmartcard0,bus=3D= ccid0.0 \ +-chardev socket,id=3Dcharchannel0,host=3Dlocalhost,port=3D1234,reconnect= =3D10 \ +-device virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchannel= 0,\ +id=3Dchannel0,name=3Dasdf \ +-chardev socket,id=3Dcharchannel1,path=3D/tmp/channel/domain--1-QEMUGuest1= /fdsa,\ +server,nowait,reconnect=3D0 \ +-device virtserialport,bus=3Dvirtio-serial0.0,nr=3D2,chardev=3Dcharchannel= 1,\ +id=3Dchannel1,name=3Dfdsa \ +-chardev socket,id=3Dcharredir0,host=3Dlocalhost,port=3D3456,reconnect=3D1= 5 \ +-device usb-redir,chardev=3Dcharredir0,id=3Dredir0,bus=3Dusb.0,port=3D2 \ +-chardev socket,id=3Dcharrng0,host=3Dlocalhost,port=3D2345,reconnect=3D5 \ +-object rng-egd,id=3Dobjrng0,chardev=3Dcharrng0 \ +-device virtio-rng-pci,rng=3Dobjrng0,id=3Drng0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.xml b/te= sts/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.xml new file mode 100644 index 0000000000..e0664b2a95 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-chardev-reconnect.xml @@ -0,0 +1,46 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 1 + + hvm + + + + /usr/bin/qemu-system-i686 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5cdbc78eb8..39f8d66c04 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1341,6 +1341,17 @@ mymain(void) QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_CCID_EMULATED); =20 + DO_TEST("chardev-reconnect", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_CHARDEV_RECONNECT, + QEMU_CAPS_USB_REDIR, + QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_EGD, + QEMU_CAPS_CCID_PASSTHRU); + DO_TEST_PARSE_ERROR("chardev-reconnect-invalid-timeout", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_CHARDEV_RECONNECT); + DO_TEST("usb-controller", QEMU_CAPS_NODEFCONFIG); DO_TEST("usb-piix3-controller", --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list