From nobody Mon Apr 29 15:01:14 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 1504787192256868.6075592874879; Thu, 7 Sep 2017 05:26:32 -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 A5F5A128C; Thu, 7 Sep 2017 12:26: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 8534960603; Thu, 7 Sep 2017 12:26: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 507043FC73; Thu, 7 Sep 2017 12:26:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v87CJoE5024326 for ; Thu, 7 Sep 2017 08:19:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5782C4F076; Thu, 7 Sep 2017 12:19:50 +0000 (UTC) Received: from thyrus.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD77E4F6DE; Thu, 7 Sep 2017 12:19:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A5F5A128C 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=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pino Toscano To: libvir-list@redhat.com Date: Thu, 7 Sep 2017 14:19:36 +0200 Message-Id: <20170907121940.18090-2-ptoscano@redhat.com> In-Reply-To: <20170907121940.18090-1-ptoscano@redhat.com> References: <20170907121940.18090-1-ptoscano@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: thuth@redhat.com Subject: [libvirt] [PATCH 1/5] tests: qemuxml2argv: fix expected type for usb-bus-missing 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 07 Sep 2017 12:26:31 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The guest of usb-bus-missing does not cause a parse error, but a validation issue -- hence, switch from DO_TEST_PARSE_ERROR to DO_TEST_FAILURE. Fixes commit b003b9781b6ae633cfe4fdf6b9620ca246fa2432. Signed-off-by: Pino Toscano --- tests/qemuxml2argvtest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d6ada227a..8aac919c8 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1398,9 +1398,9 @@ mymain(void) DO_TEST("usb-port-missing", QEMU_CAPS_USB_HUB, QEMU_CAPS_NODEFCONFIG); - DO_TEST_PARSE_ERROR("usb-bus-missing", - QEMU_CAPS_USB_HUB, - QEMU_CAPS_NODEFCONFIG); + DO_TEST_FAILURE("usb-bus-missing", + QEMU_CAPS_USB_HUB, + QEMU_CAPS_NODEFCONFIG); DO_TEST("usb-ports", QEMU_CAPS_USB_HUB, QEMU_CAPS_NODEFCONFIG); --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 15:01:14 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 15047871009181014.8640266189117; Thu, 7 Sep 2017 05:25:00 -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 F1D77624CF; Thu, 7 Sep 2017 12:24:58 +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 BC52465E8E; Thu, 7 Sep 2017 12:24:58 +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 A2DBA18045C2; Thu, 7 Sep 2017 12:24:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v87CJpSq024335 for ; Thu, 7 Sep 2017 08:19:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F7FE2921F; Thu, 7 Sep 2017 12:19:51 +0000 (UTC) Received: from thyrus.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A51B52A336; Thu, 7 Sep 2017 12:19:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F1D77624CF Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pino Toscano To: libvir-list@redhat.com Date: Thu, 7 Sep 2017 14:19:37 +0200 Message-Id: <20170907121940.18090-3-ptoscano@redhat.com> In-Reply-To: <20170907121940.18090-1-ptoscano@redhat.com> References: <20170907121940.18090-1-ptoscano@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: thuth@redhat.com Subject: [libvirt] [PATCH 2/5] tests: qemuxml2argv: fail also on unexpected pass 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.39]); Thu, 07 Sep 2017 12:24:59 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" If a test expects either a parse error or a failure but then there is neither a parse error nor a failure, then properly mark the test as failing, instead of failing later on (e.g. trying to open a non-existing .args file). Signed-off-by: Pino Toscano --- tests/qemuxml2argvtest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 8aac919c8..3f7d1db3e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -463,6 +463,10 @@ testCompareXMLToArgv(const void *data) goto ok; goto cleanup; } + if (flags & FLAG_EXPECT_PARSE_ERROR) { + VIR_TEST_DEBUG("passed instead of expected parse error"); + goto cleanup; + } priv =3D vm->privateData; =20 if (virBitmapParse("0-3", &priv->autoNodeset, 4) < 0) @@ -502,6 +506,10 @@ testCompareXMLToArgv(const void *data) goto ok; goto cleanup; } + if (flags & FLAG_EXPECT_FAILURE) { + VIR_TEST_DEBUG("passed instead of expected failure"); + goto cleanup; + } =20 if (!(actualargv =3D virCommandToString(cmd))) goto cleanup; --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 15:01:14 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 1504787260778415.56600677814663; Thu, 7 Sep 2017 05:27:40 -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 913997E42C; Thu, 7 Sep 2017 12:27:38 +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 6BBDA18B20; Thu, 7 Sep 2017 12:27:38 +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 304DD1806109; Thu, 7 Sep 2017 12:27:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v87CJq18024345 for ; Thu, 7 Sep 2017 08:19:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 578FC4DC6B; Thu, 7 Sep 2017 12:19:52 +0000 (UTC) Received: from thyrus.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CF8517D59; Thu, 7 Sep 2017 12:19:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 913997E42C Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pino Toscano To: libvir-list@redhat.com Date: Thu, 7 Sep 2017 14:19:38 +0200 Message-Id: <20170907121940.18090-4-ptoscano@redhat.com> In-Reply-To: <20170907121940.18090-1-ptoscano@redhat.com> References: <20170907121940.18090-1-ptoscano@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: thuth@redhat.com Subject: [libvirt] [PATCH 3/5] qemu: pass the virDomainDef to qemuDomainChrDefValidate 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.27]); Thu, 07 Sep 2017 12:27:39 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This will be used to improve the validation for this type of devices. The former @def parameter is renamed to @dev, leaving @def for the virDomainDef (following the style used elsewhere). Signed-off-by: Pino Toscano --- src/qemu/qemu_domain.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 72031893f..0b8a66307 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3291,9 +3291,10 @@ qemuDomainChrSourceDefValidate(const virDomainChrSou= rceDef *def) =20 =20 static int -qemuDomainChrDefValidate(const virDomainChrDef *def) +qemuDomainChrDefValidate(const virDomainChrDef *dev, + const virDomainDef *def ATTRIBUTE_UNUSED) { - if (qemuDomainChrSourceDefValidate(def->source) < 0) + if (qemuDomainChrSourceDefValidate(dev->source) < 0) return -1; =20 return 0; @@ -3334,7 +3335,7 @@ qemuDomainRedirdevDefValidate(const virDomainRedirdev= Def *def) =20 static int qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev, - const virDomainDef *def ATTRIBUTE_UNUSED, + const virDomainDef *def, void *opaque ATTRIBUTE_UNUSED) { int ret =3D -1; @@ -3378,7 +3379,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef = *dev, goto cleanup; } } else if (dev->type =3D=3D VIR_DOMAIN_DEVICE_CHR) { - if (qemuDomainChrDefValidate(dev->data.chr) < 0) + if (qemuDomainChrDefValidate(dev->data.chr, def) < 0) goto cleanup; } else if (dev->type =3D=3D VIR_DOMAIN_DEVICE_SMARTCARD) { if (qemuDomainSmartcardDefValidate(dev->data.smartcard) < 0) --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 15:01:14 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 1504787128498284.85102585562754; Thu, 7 Sep 2017 05:25:28 -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 5CB5A19C327; Thu, 7 Sep 2017 12:25:26 +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 21B6018B9A; Thu, 7 Sep 2017 12:25: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 5BCBB180610A; Thu, 7 Sep 2017 12:25:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v87CJrVr024356 for ; Thu, 7 Sep 2017 08:19:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F38D17D59; Thu, 7 Sep 2017 12:19:53 +0000 (UTC) Received: from thyrus.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4D014F077; Thu, 7 Sep 2017 12:19:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5CB5A19C327 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=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pino Toscano To: libvir-list@redhat.com Date: Thu, 7 Sep 2017 14:19:39 +0200 Message-Id: <20170907121940.18090-5-ptoscano@redhat.com> In-Reply-To: <20170907121940.18090-1-ptoscano@redhat.com> References: <20170907121940.18090-1-ptoscano@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: thuth@redhat.com Subject: [libvirt] [PATCH 4/5] qemu: reject parallel ports for s390 archs 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.29]); Thu, 07 Sep 2017 12:25:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" They are simply not supported on those architectures. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1487499 Signed-off-by: Pino Toscano Reviewed-by: Thomas Huth --- src/qemu/qemu_domain.c | 9 ++++++++- .../qemuxml2argv-s390-no-parallel.xml | 22 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 4 ++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-no-parallel.xml diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0b8a66307..6f1b453b2 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3292,11 +3292,18 @@ qemuDomainChrSourceDefValidate(const virDomainChrSo= urceDef *def) =20 static int qemuDomainChrDefValidate(const virDomainChrDef *dev, - const virDomainDef *def ATTRIBUTE_UNUSED) + const virDomainDef *def) { if (qemuDomainChrSourceDefValidate(dev->source) < 0) return -1; =20 + if (dev->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL && + ARCH_IS_S390(def->os.arch)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("parallel ports are not supported")); + return -1; + } + return 0; } =20 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-no-parallel.xml b/tes= ts/qemuxml2argvdata/qemuxml2argv-s390-no-parallel.xml new file mode 100644 index 000000000..5e6a23fe9 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-no-parallel.xml @@ -0,0 +1,22 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + /usr/bin/qemu-system-s390x + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 3f7d1db3e..e9748bf1a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1947,6 +1947,10 @@ mymain(void) QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + DO_TEST_PARSE_ERROR("s390-no-parallel", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_VIRTIO_S390); =20 DO_TEST("ppc-dtb", QEMU_CAPS_KVM, --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 15:01:14 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 1504787146339970.1507056584957; Thu, 7 Sep 2017 05:25:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B607381226; Thu, 7 Sep 2017 12:25:43 +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 90C1C7BB00; Thu, 7 Sep 2017 12:25:43 +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 4F81B185735D; Thu, 7 Sep 2017 12:25:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v87CJs1q024363 for ; Thu, 7 Sep 2017 08:19:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 48E9817D59; Thu, 7 Sep 2017 12:19:54 +0000 (UTC) Received: from thyrus.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CEB361B70; Thu, 7 Sep 2017 12:19:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B607381226 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pino Toscano To: libvir-list@redhat.com Date: Thu, 7 Sep 2017 14:19:40 +0200 Message-Id: <20170907121940.18090-6-ptoscano@redhat.com> In-Reply-To: <20170907121940.18090-1-ptoscano@redhat.com> References: <20170907121940.18090-1-ptoscano@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: thuth@redhat.com Subject: [libvirt] [PATCH 5/5] qemu: reject parallel ports for pseries machines 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 07 Sep 2017 12:25:45 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" They are simply not supported on that machine type. Partially-resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1487499 Signed-off-by: Pino Toscano Reviewed-by: Thomas Huth --- src/qemu/qemu_domain.c | 2 +- .../qemuxml2argv-pseries-no-parallel.xml | 18 ++++++++++++++= ++++ tests/qemuxml2argvtest.c | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-no-parallel= .xml diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6f1b453b2..799d89865 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3298,7 +3298,7 @@ qemuDomainChrDefValidate(const virDomainChrDef *dev, return -1; =20 if (dev->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL && - ARCH_IS_S390(def->os.arch)) { + (ARCH_IS_S390(def->os.arch) || qemuDomainIsPSeries(def))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("parallel ports are not supported")); return -1; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-no-parallel.xml b/= tests/qemuxml2argvdata/qemuxml2argv-pseries-no-parallel.xml new file mode 100644 index 000000000..d7efaa72f --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-no-parallel.xml @@ -0,0 +1,18 @@ + + QEMUGuest1 + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 1 + + hvm + + + + /usr/bin/qemu-system-ppc64 + +
+ + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index e9748bf1a..345745841 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1757,6 +1757,8 @@ mymain(void) QEMU_CAPS_NODEFCONFIG); DO_TEST("pseries-cpu-exact", QEMU_CAPS_NODEFCONFIG); + DO_TEST_PARSE_ERROR("pseries-no-parallel", + QEMU_CAPS_NODEFCONFIG); =20 qemuTestSetHostArch(driver.caps, VIR_ARCH_PPC64); DO_TEST("pseries-cpu-compat", QEMU_CAPS_KVM, --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list