From nobody Thu May 2 18:51:18 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1500660904013903.3709549127418; Fri, 21 Jul 2017 11:15:04 -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 17B403DE3D; Fri, 21 Jul 2017 18:15:01 +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 6842E18003; Fri, 21 Jul 2017 18:15:00 +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 BEF5C180B467; Fri, 21 Jul 2017 18:14:58 +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 v6LIBa4w004996 for ; Fri, 21 Jul 2017 14:11:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 608C060610; Fri, 21 Jul 2017 18:11:36 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-204-33.brq.redhat.com [10.40.204.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 75F9C18253 for ; Fri, 21 Jul 2017 18:11:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 17B403DE3D Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 17B403DE3D From: Pavel Hrdina To: libvir-list@redhat.com Date: Fri, 21 Jul 2017 20:11:29 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] qemu: capabilities: introduce QEMU_CAPS_VNC_MULTI_SERVERS 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.29]); Fri, 21 Jul 2017 18:15:02 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 + tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.ppc64le.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 + 15 files changed, 20 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c3f49a9754..e393b4ade6 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -431,7 +431,10 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "virtio.ats", "loadparm", "spapr-pci-host-bridge", + + /* 265 */ "spapr-pci-host-bridge.numa_node", + "vnc-multi-servers" ); =20 =20 @@ -3221,6 +3224,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCaps= CommandLine[] =3D { { "spice", "rendernode", QEMU_CAPS_SPICE_RENDERNODE }, { "machine", "kernel_irqchip", QEMU_CAPS_MACHINE_KERNEL_IRQCHIP }, { "machine", "loadparm", QEMU_CAPS_LOADPARM }, + { "vnc", "vnc", QEMU_CAPS_VNC_MULTI_SERVERS }, }; =20 static int diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 19f59a6d41..196ea3af87 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -417,7 +417,10 @@ typedef enum { QEMU_CAPS_VIRTIO_PCI_ATS, /* virtio-*-pci.ats */ QEMU_CAPS_LOADPARM, /* -machine loadparm */ QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, /* -device spapr-pci-host-brid= ge */ + + /* 265 */ QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE, /* spapr-pci-host-bridge.nu= ma_node=3D */ + QEMU_CAPS_VNC_MULTI_SERVERS, /* -vnc vnc=3Dunix:/path */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.4.0.x86_64.xml index b7ba2240aa..11c8765738 100644 --- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml @@ -185,6 +185,7 @@ + 2004000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.5.0.x86_64.xml index f3289df306..eee1ab24d9 100644 --- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml @@ -191,6 +191,7 @@ + 2005000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml b/test= s/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml index af60bf6c6e..f8746f4c1e 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml @@ -169,6 +169,7 @@ + 2006000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml b/test= s/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml index d4eb19102c..0ce1c8a333 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml @@ -169,6 +169,7 @@ + 2006000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml b/tests/qemu= capabilitiesdata/caps_2.6.0.ppc64le.xml index cd3c0b5aa6..92dba13b06 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml @@ -164,6 +164,7 @@ + 2006000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.6.0.x86_64.xml index e4615c02ab..1937dc9c11 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml @@ -201,6 +201,7 @@ + 2006000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.7.0.s390x.xml index ec79115cf1..1c1aab8dec 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml @@ -131,6 +131,7 @@ + 2007000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.7.0.x86_64.xml index 5f98db8d1a..b484411314 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml @@ -204,6 +204,7 @@ + 2007000 0 (v2.7.0) diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.8.0.s390x.xml index ac40ecc7fc..5a326d9881 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -133,6 +133,7 @@ + 2007093 0 diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.8.0.x86_64.xml index e42e47a8ee..e31abd4b8b 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml @@ -206,6 +206,7 @@ + 2008000 0 (v2.8.0) diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64le.xml b/tests/qemu= capabilitiesdata/caps_2.9.0.ppc64le.xml index ba22878fe2..f80bfc434c 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64le.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64le.xml @@ -169,6 +169,7 @@ + 2009000 0 (v2.9.0) diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.9.0.s390x.xml index 0597924f1d..bed2c2da93 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml @@ -134,6 +134,7 @@ + 2009000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.9.0.x86_64.xml index ae1530b5e6..2b406704a6 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -217,6 +217,7 @@ + 2009000 0 (v2.9.0) --=20 2.13.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 18:51:18 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 150066091432955.38518803758143; Fri, 21 Jul 2017 11:15:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4900BC054C5E; Fri, 21 Jul 2017 18:15:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E20C60F90; Fri, 21 Jul 2017 18:15:12 +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 707574BB79; Fri, 21 Jul 2017 18:15:11 +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 v6LIBdGa005161 for ; Fri, 21 Jul 2017 14:11:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0DD9360610; Fri, 21 Jul 2017 18:11:39 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-204-33.brq.redhat.com [10.40.204.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B7CC18258 for ; Fri, 21 Jul 2017 18:11:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4900BC054C5E Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4900BC054C5E From: Pavel Hrdina To: libvir-list@redhat.com Date: Fri, 21 Jul 2017 20:11:30 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] qemu: properly handle '=' in the VNC socket path 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 21 Jul 2017 18:15:12 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" If a domain name contains a '=3D' and the unix socket path is auto-generated or socket path provided by user contains '=3D' QEMU is unable to properly parse the command line. In order to make it work we need to use the new command line syntax for VNC or we will fail to start/define such domain. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1352529 Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 5 ++- src/qemu/qemu_process.c | 51 ++++++++++++++++++= ++-- .../qemuxml2argvdata/qemuxml2argv-name-escape.args | 2 +- tests/qemuxml2argvtest.c | 1 + 4 files changed, 54 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0ce5aa5906..a0394a00ae 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7802,7 +7802,10 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigP= tr cfg, =20 switch (glisten->type) { case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET: - virBufferAddLit(&opt, "unix:"); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_MULTI_SERVERS)) + virBufferAddLit(&opt, "vnc=3Dunix:"); + else + virBufferAddLit(&opt, "unix:"); virQEMUBuildBufferEscapeComma(&opt, glisten->socket); break; =20 diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 525521aaf0..4e93420955 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4146,6 +4146,34 @@ qemuProcessGraphicsSetupNetworkAddress(virDomainGrap= hicsListenDefPtr glisten, return 0; } =20 +static int +qemuProcessVncValidateUnixSocket(const char *socket, + virQEMUCapsPtr qemuCaps) +{ + if (!socket) + return 0; + + /* The way how QEMU process options disallow using '=3D' in the unix s= ocket + * path. The reason is that the first option doesn't have to use its = name + * and -vnc has it's first option without name. However when the pars= er + * finds first '=3D' in the option it always split it into key=3Dvalue= pair + * which blocks having '=3D' in the socket path. Since QEMU 2.3.0 it'= s possible + * to use "vnc" as a key for the first option so we can use a unix soc= ket + * path with '=3D'. */ + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_MULTI_SERVERS)) + return 0; + + if (strchr(socket, '=3D')) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("QEMU does not support having '=3D' in the " + "VNC socket path '%s'."), socket); + return -1; + } + + return 0; +} + + =20 static int qemuProcessGraphicsSetupListen(virQEMUDriverPtr driver, @@ -4192,6 +4220,9 @@ qemuProcessGraphicsSetupListen(virQEMUDriverPtr drive= r, if (virAsprintf(&glisten->socket, "%s/%s.sock", priv->libDir, type) < 0) goto cleanup; + if (qemuProcessVncValidateUnixSocket(glisten->socket, + priv->qemuCaps) <= 0) + goto cleanup; glisten->fromConfig =3D true; glisten->type =3D VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCK= ET; } else if (listenAddr) { @@ -4216,6 +4247,9 @@ qemuProcessGraphicsSetupListen(virQEMUDriverPtr drive= r, if (virAsprintf(&glisten->socket, "%s/%s.sock", priv->libDir, type) < 0) goto cleanup; + if (qemuProcessVncValidateUnixSocket(glisten->socket, + priv->qemuCaps) < 0) + goto cleanup; glisten->autoGenerated =3D true; } break; @@ -4440,9 +4474,10 @@ qemuProcessStartWarnShmem(virDomainObjPtr vm) =20 =20 static int -qemuProcessStartValidateGraphics(virDomainObjPtr vm) +qemuProcessStartValidateGraphics(virDomainObjPtr vm, + virQEMUCapsPtr qemuCaps) { - size_t i; + size_t i, j; =20 for (i =3D 0; i < vm->def->ngraphics; i++) { virDomainGraphicsDefPtr graphics =3D vm->def->graphics[i]; @@ -4464,6 +4499,16 @@ qemuProcessStartValidateGraphics(virDomainObjPtr vm) case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } + + if (graphics->type =3D=3D VIR_DOMAIN_GRAPHICS_TYPE_VNC) { + for (j =3D 0; j < graphics->nListens; j++) { + virDomainGraphicsListenDefPtr glisten =3D &graphics->liste= ns[j]; + if (glisten->type =3D=3D VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_S= OCKET && + qemuProcessVncValidateUnixSocket(glisten->socket, qemu= Caps) < 0) { + return -1; + } + } + } } =20 return 0; @@ -4633,7 +4678,7 @@ qemuProcessStartValidate(virQEMUDriverPtr driver, if (qemuProcessStartValidateXML(driver, vm, qemuCaps, caps, flags) < 0) return -1; =20 - if (qemuProcessStartValidateGraphics(vm) < 0) + if (qemuProcessStartValidateGraphics(vm, qemuCaps) < 0) return -1; =20 if (qemuProcessStartValidateVideo(vm, qemuCaps) < 0) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-name-escape.args b/tests/q= emuxml2argvdata/qemuxml2argv-name-escape.args index d94ab76312..dd0fc8dd05 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-name-escape.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-name-escape.args @@ -20,7 +20,7 @@ bar=3D2/monitor.sock,server,nowait \ -no-acpi \ -boot c \ -usb \ --vnc unix:/tmp/lib/domain--1-foo=3D1,,bar=3D2/vnc.sock \ +-vnc vnc=3Dunix:/tmp/lib/domain--1-foo=3D1,,bar=3D2/vnc.sock \ -spice unix,addr=3D/tmp/lib/domain--1-foo=3D1,,bar=3D2/spice.sock \ -vga cirrus \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 25cfedd9f8..7dc7e52d86 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2655,6 +2655,7 @@ mymain(void) QEMU_CAPS_NAME_DEBUG_THREADS, QEMU_CAPS_OBJECT_SECRET, QEMU_CAPS_VNC, + QEMU_CAPS_VNC_MULTI_SERVERS, QEMU_CAPS_NAME_GUEST, QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_SPICE, --=20 2.13.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 18:51:18 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1500660921866517.8395770570419; Fri, 21 Jul 2017 11:15:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 95719883B4; Fri, 21 Jul 2017 18:15:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6014E17114; Fri, 21 Jul 2017 18:15:19 +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 123ED14B22; Fri, 21 Jul 2017 18:15:19 +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 v6LIBem9005171 for ; Fri, 21 Jul 2017 14:11:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1492B60610; Fri, 21 Jul 2017 18:11:40 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-204-33.brq.redhat.com [10.40.204.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 696E117AC1 for ; Fri, 21 Jul 2017 18:11:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 95719883B4 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 95719883B4 From: Pavel Hrdina To: libvir-list@redhat.com Date: Fri, 21 Jul 2017 20:11:31 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] tests: add test case for VNC unix path with '=' 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 21 Jul 2017 18:15:20 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- ...muxml2argv-graphics-vnc-socket-new-cmdline.args | 22 ++++++++++++++++++= ++++ ...emuxml2argv-graphics-vnc-socket-new-cmdline.xml | 20 ++++++++++++++++++= ++ ...argv-graphics-vnc-socket-path-not-supported.xml | 1 + tests/qemuxml2argvtest.c | 4 ++++ 4 files changed, 47 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket= -new-cmdline.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket= -new-cmdline.xml create mode 120000 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket= -path-not-supported.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-new-cm= dline.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-new-cm= dline.args new file mode 100644 index 0000000000..862e96e066 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-new-cmdline.a= rgs @@ -0,0 +1,22 @@ +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 \ +-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 \ +-usb \ +-vnc vnc=3Dunix:/tmp/foo=3Dbar.sock \ +-vga cirrus diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-new-cm= dline.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-new-cmd= line.xml new file mode 100644 index 0000000000..2b9758fecb --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-new-cmdline.x= ml @@ -0,0 +1,20 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + /usr/bin/qemu-system-i686 + + + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-path-n= ot-supported.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-= path-not-supported.xml new file mode 120000 index 0000000000..0102f50a76 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket-path-not-supp= orted.xml @@ -0,0 +1 @@ +qemuxml2argv-graphics-vnc-socket-new-cmdline.xml \ No newline at end of file diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7dc7e52d86..dfe23876d1 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1053,6 +1053,10 @@ mymain(void) DO_TEST("graphics-vnc-auto-socket", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("graphics-vnc-none", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VG= A); + DO_TEST("graphics-vnc-socket-new-cmdline", QEMU_CAPS_VNC, + QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_VNC_MULTI_SERVERS); + DO_TEST_FAILURE("graphics-vnc-socket-path-not-supported", QEMU_CAPS_VN= C, + QEMU_CAPS_DEVICE_CIRRUS_VGA); =20 driver.config->vncSASL =3D 1; VIR_FREE(driver.config->vncSASLdir); --=20 2.13.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list