From nobody Wed May 8 02:21:45 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 1544194094152998.395315170712; Fri, 7 Dec 2018 06:48:14 -0800 (PST) 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 A81D83002965; Fri, 7 Dec 2018 14:48:11 +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 E0ED081653; Fri, 7 Dec 2018 14:48:10 +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 86FC03F7D0; Fri, 7 Dec 2018 14:48:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wB7Em80n016998 for ; Fri, 7 Dec 2018 09:48:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id 445F65EDE0; Fri, 7 Dec 2018 14:48:08 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 974FA2FC4D; Fri, 7 Dec 2018 14:48:07 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Fri, 7 Dec 2018 15:47:53 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 1/4] qemu: domain: gfx: Fix shadowing the ptr argument to graphics validation 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.43]); Fri, 07 Dec 2018 14:48:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Since the code was never run, this stupid mistake could have only been spotted by an accident. Signed-off-by: Erik Skultety Reviewed-by: John Ferlan --- src/qemu/qemu_domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 509da6bfea..1eb0e31df0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5783,9 +5783,7 @@ qemuDomainDeviceDefValidateGraphics(const virDomainGr= aphicsDef *graphics, size_t i; =20 for (i =3D 0; i < def->ngraphics; i++) { - graphics =3D def->graphics[i]; - - if (graphics->type =3D=3D VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS) { + if (def->graphics[i]->type =3D=3D VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEA= DLESS) { have_egl_headless =3D true; break; } --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 02:21:45 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 1544194096402547.0063316137752; Fri, 7 Dec 2018 06:48:16 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B434C058CB3; Fri, 7 Dec 2018 14:48:14 +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 29B75103BAB7; Fri, 7 Dec 2018 14:48:14 +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 DE259181B9E5; Fri, 7 Dec 2018 14:48:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wB7EmCic017018 for ; Fri, 7 Dec 2018 09:48:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id DFC53747A0; Fri, 7 Dec 2018 14:48:12 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BEB72FC52; Fri, 7 Dec 2018 14:48:08 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Fri, 7 Dec 2018 15:47:54 +0100 Message-Id: <7152b6a0a0db9554dbf9ff4121390e34bb9093c0.1544193131.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 2/4] conf: domain: Introduce virDomainDeviceInfoIterate flags 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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 07 Dec 2018 14:48:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" One of the usages of the device iterator is to run config validation. That's a problem for graphics devices, because they don't have any @info data (graphics shouldn't have been considered as devices in the first place), and simply passing NULL would crash a few callbacks invoked from the iterator. Fix this problem by introducing iterator flags. Signed-off-by: Erik Skultety Reviewed-by: John Ferlan --- src/conf/domain_conf.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b70dca6c61..11552bff5b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3703,10 +3703,18 @@ virDomainSkipBackcompatConsole(virDomainDefPtr def, } =20 =20 +typedef enum { + DEVICE_INFO_ITERATE_ALL_CONSOLES =3D 1 << 0, /* Iterate console[0] */ +} virDomainDeviceInfoIterateFlags; + +/* + * Iterates over domain devices which provide virDomainDeviceInfo data. The + * default behaviour can be altered with virDomainDeviceInfoIterateFlags. + */ static int virDomainDeviceInfoIterateInternal(virDomainDefPtr def, virDomainDeviceInfoCallback cb, - bool all, + unsigned int iteratorFlags, void *opaque) { size_t i; @@ -3772,6 +3780,8 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr de= f, return rc; } for (i =3D 0; i < def->nconsoles; i++) { + bool all =3D iteratorFlags & DEVICE_INFO_ITERATE_ALL_CONSOLES; + if (virDomainSkipBackcompatConsole(def, i, all)) continue; device.data.chr =3D def->consoles[i]; @@ -3908,7 +3918,7 @@ virDomainDeviceInfoIterate(virDomainDefPtr def, virDomainDeviceInfoCallback cb, void *opaque) { - return virDomainDeviceInfoIterateInternal(def, cb, false, opaque); + return virDomainDeviceInfoIterateInternal(def, cb, 0, opaque); } =20 =20 @@ -3918,7 +3928,7 @@ virDomainDefHasDeviceAddress(virDomainDefPtr def, { if (virDomainDeviceInfoIterateInternal(def, virDomainDefHasDeviceAddressIte= rator, - true, + DEVICE_INFO_ITERATE_ALL_CONSOLE= S, info) < 0) return true; =20 @@ -5291,7 +5301,7 @@ virDomainDefPostParse(virDomainDefPtr def, /* iterate the devices */ ret =3D virDomainDeviceInfoIterateInternal(def, virDomainDefPostParseDeviceIt= erator, - true, + DEVICE_INFO_ITERATE_ALL_CONSO= LES, &data); =20 if (virDomainDefPostParseCheckFailure(def, parseFlags, ret) < 0) @@ -5927,7 +5937,8 @@ virDomainDefValidateAliases(const virDomainDef *def, =20 if (virDomainDeviceInfoIterateInternal((virDomainDefPtr) def, virDomainDeviceDefValidateAlias= esIterator, - true, &data) < 0) + DEVICE_INFO_ITERATE_ALL_CONSOLE= S, + &data) < 0) goto cleanup; =20 if (aliases) { @@ -6337,7 +6348,8 @@ virDomainDefValidate(virDomainDefPtr def, /* iterate the devices */ if (virDomainDeviceInfoIterateInternal(def, virDomainDefValidateDeviceItera= tor, - true, &data) < 0) + DEVICE_INFO_ITERATE_ALL_CONSOLE= S, + &data) < 0) return -1; =20 if (virDomainDefValidateInternal(def) < 0) @@ -29926,7 +29938,8 @@ virDomainDefFindDevice(virDomainDefPtr def, =20 dev->type =3D VIR_DOMAIN_DEVICE_NONE; virDomainDeviceInfoIterateInternal(def, virDomainDefFindDeviceCallback, - true, &data); + DEVICE_INFO_ITERATE_ALL_CONSOLES, + &data); =20 if (dev->type =3D=3D VIR_DOMAIN_DEVICE_NONE) { if (reportError) { --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 02:21:45 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 1544194113178441.56007783925895; Fri, 7 Dec 2018 06:48:33 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91D6A58E2A; Fri, 7 Dec 2018 14:48:30 +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 5CAD32B453; Fri, 7 Dec 2018 14:48:30 +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 157273F604; Fri, 7 Dec 2018 14:48:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wB7EmDmi017023 for ; Fri, 7 Dec 2018 09:48:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id D996B5D77E; Fri, 7 Dec 2018 14:48:13 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 371325EDE0; Fri, 7 Dec 2018 14:48:13 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Fri, 7 Dec 2018 15:47:55 +0100 Message-Id: <9f64207f7eaacaaf5c685246ba2e82c045f5a3db.1544193131.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 3/4] tests: Introduce negative versions of DO_TEST_CAPS_LATEST 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 07 Dec 2018 14:48:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" As commit d8266ebe161 demonstrated, it's so easy to forget to add a single capability which in turn can easily fool the test suite so that tests expecting a failure can fail with a different error than we expected, but still making those pass. Unfortunately for commit d8266ebe161, it allowed a domain with multiple OpenGL-enabled graphics devices to start successfully. As a precaution measure, introduce negative versions of DO_TEST_CAPS_LATEST macros, so that we eliminate this vector from now on. Signed-off-by: Erik Skultety Reviewed-by: John Ferlan --- tests/qemuxml2argvtest.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index e17709e7e1..528139654c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -806,13 +806,22 @@ mymain(void) # define DO_TEST_CAPS_VER(name, ver) \ DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) =20 -# define DO_TEST_CAPS_ARCH_LATEST(name, arch) \ - DO_TEST_CAPS_INTERNAL(name, arch "-latest", NULL, 0, 0, arch, \ +# define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, flags, parseFlags) \ + DO_TEST_CAPS_INTERNAL(name, arch "-latest", NULL, flags, parseFlags, a= rch, \ virHashLookup(capslatest, arch), true) =20 +# define DO_TEST_CAPS_ARCH_LATEST(name, arch) \ + DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, 0, 0) \ + # define DO_TEST_CAPS_LATEST(name) \ DO_TEST_CAPS_ARCH_LATEST(name, "x86_64") =20 +# define DO_TEST_FAILURE_CAPS_LATEST(name) \ + DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", FLAG_EXPECT_FAILURE, 0) + +# define DO_TEST_PARSE_ERROR_CAPS_LATEST(name) \ + DO_TEST_CAPS_ARCH_LATEST_FULL(name, "x86_64", FLAG_EXPECT_PARSE_ERROR,= 0) + /** * The following test macros should be used only in cases when the tests r= equire * testing of some non-standard combination of capability flags --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 8 02:21:45 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 1544194117505343.3862397698175; Fri, 7 Dec 2018 06:48:37 -0800 (PST) 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 80EF1796E2; Fri, 7 Dec 2018 14:48:34 +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 2FBCE79D63; Fri, 7 Dec 2018 14:48:34 +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 CE9DD3F608; Fri, 7 Dec 2018 14:48:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wB7EmKNs017040 for ; Fri, 7 Dec 2018 09:48:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9BA52747BF; Fri, 7 Dec 2018 14:48:20 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEB66747A0; Fri, 7 Dec 2018 14:48:14 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Fri, 7 Dec 2018 15:47:56 +0100 Message-Id: <0be995e7206828fb1083e24c332c998001d2813a.1544193131.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 4/4] conf: domain: gfx: Iterate over graphics devices when doing validation 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 07 Dec 2018 14:48:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The validation code for graphics has been in place for a while, but because it is only executed from the device iterator, that validation code was never truly run. The unfortunate side effect of this whole mess was that a few capabilities were missing from the test suite, which in turn meant that a few graphics test which expected a failure happily accepted whatever failure the parser returned which made them succeed even though in reality we allowed to start a domain with multiple OpenGL-enabled graphics devices. This patch enables iteration over graphics devices. Unsurprisingly, a few tests started failing as a result, so fix those too. Signed-off-by: Erik Skultety Reviewed-by: John Ferlan --- src/conf/domain_conf.c | 13 ++++++++++++- tests/qemuxml2argvtest.c | 7 ++----- tests/qemuxml2xmltest.c | 10 +++++++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 11552bff5b..a4c762a210 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3705,6 +3705,7 @@ virDomainSkipBackcompatConsole(virDomainDefPtr def, =20 typedef enum { DEVICE_INFO_ITERATE_ALL_CONSOLES =3D 1 << 0, /* Iterate console[0] */ + DEVICE_INFO_ITERATE_GRAPHICS =3D 1 << 1 /* Iterate graphics */ } virDomainDeviceInfoIterateFlags; =20 /* @@ -3870,6 +3871,15 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr d= ef, return rc; } =20 + if (iteratorFlags & DEVICE_INFO_ITERATE_GRAPHICS) { + device.type =3D VIR_DOMAIN_DEVICE_GRAPHICS; + for (i =3D 0; i < def->ngraphics; i++) { + device.data.graphics =3D def->graphics[i]; + if ((rc =3D cb(def, &device, NULL, opaque)) !=3D 0) + return rc; + } + } + /* Coverity is not very happy with this - all dead_error_condition */ #if !STATIC_ANALYSIS /* This switch statement is here to trigger compiler warning when addi= ng @@ -6348,7 +6358,8 @@ virDomainDefValidate(virDomainDefPtr def, /* iterate the devices */ if (virDomainDeviceInfoIterateInternal(def, virDomainDefValidateDeviceItera= tor, - DEVICE_INFO_ITERATE_ALL_CONSOLE= S, + (DEVICE_INFO_ITERATE_ALL_CONSOL= ES | + DEVICE_INFO_ITERATE_GRAPHICS), &data) < 0) return -1; =20 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 528139654c..05451863ad 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1299,7 +1299,7 @@ mymain(void) =20 DO_TEST("graphics-sdl", QEMU_CAPS_DEVICE_VGA); - DO_TEST_FAILURE("graphics-sdl-egl-headless", NONE); + DO_TEST_PARSE_ERROR_CAPS_LATEST("graphics-sdl-egl-headless"); DO_TEST("graphics-sdl-fullscreen", QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("graphics-spice", @@ -1358,10 +1358,7 @@ mymain(void) QEMU_CAPS_SPICE, QEMU_CAPS_EGL_HEADLESS, QEMU_CAPS_DEVICE_QXL); - DO_TEST_FAILURE("graphics-spice-invalid-egl-headless", - QEMU_CAPS_SPICE, - QEMU_CAPS_EGL_HEADLESS, - QEMU_CAPS_DEVICE_QXL); + DO_TEST_PARSE_ERROR_CAPS_LATEST("graphics-spice-invalid-egl-headless"); DO_TEST_CAPS_LATEST("graphics-spice-gl-auto-rendernode"); =20 DO_TEST("input-usbmouse", NONE); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index c98b9571ef..1062deee37 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -402,7 +402,8 @@ mymain(void) cfg->vncAutoUnixSocket =3D false; DO_TEST("graphics-vnc-socket", NONE); DO_TEST("graphics-vnc-auto-socket", NONE); - DO_TEST("graphics-vnc-egl-headless", NONE); + DO_TEST("graphics-vnc-egl-headless", + QEMU_CAPS_EGL_HEADLESS); =20 DO_TEST("graphics-sdl", NONE); DO_TEST("graphics-sdl-fullscreen", NONE); @@ -414,9 +415,12 @@ mymain(void) cfg->spiceAutoUnixSocket =3D true; DO_TEST("graphics-spice-auto-socket-cfg", NONE); cfg->spiceAutoUnixSocket =3D false; - DO_TEST("graphics-spice-egl-headless", NONE); + DO_TEST("graphics-spice-egl-headless", + QEMU_CAPS_EGL_HEADLESS); =20 - DO_TEST("graphics-egl-headless-rendernode", NONE); + DO_TEST("graphics-egl-headless-rendernode", + QEMU_CAPS_EGL_HEADLESS, + QEMU_CAPS_EGL_HEADLESS_RENDERNODE); =20 DO_TEST("input-usbmouse", NONE); DO_TEST("input-usbtablet", NONE); --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list