From nobody Thu May 15 09:05:58 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 150963767421486.64307073888745; Thu, 2 Nov 2017 08:47:54 -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 140C761D0A; Thu, 2 Nov 2017 15:47:53 +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 DA6845D75E; Thu, 2 Nov 2017 15:47:52 +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 9611F1800BD3; Thu, 2 Nov 2017 15:47:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA2Floxi025040 for ; Thu, 2 Nov 2017 11:47:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id B6E882B505; Thu, 2 Nov 2017 15:47:50 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B211C60465 for ; Thu, 2 Nov 2017 15:47:48 +0000 (UTC) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 002C0883A2 for ; Thu, 2 Nov 2017 15:47:46 +0000 (UTC) Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA2Flkpo002286 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Nov 2017 15:47:46 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vA2FljbW029289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Nov 2017 15:47:46 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vA2FljSs020678; Thu, 2 Nov 2017 15:47:45 GMT Received: from nina.dynamic.ziggo.nl (/10.175.172.23) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 02 Nov 2017 08:47:45 -0700 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 140C761D0A Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 140C761D0A DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 002C0883A2 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=wim.ten.have@oracle.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 002C0883A2 From: Wim Ten Have To: Libvirt Development List Date: Thu, 2 Nov 2017 16:47:23 +0100 Message-Id: <20171102154723.26914-5-wim.ten.have@oracle.com> In-Reply-To: <20171102154723.26914-1-wim.ten.have@oracle.com> References: <20171102154723.26914-1-wim.ten.have@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 205 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 02 Nov 2017 15:47:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 02 Nov 2017 15:47:47 +0000 (UTC) for IP:'141.146.126.69' DOMAIN:'aserp1040.oracle.com' HELO:'aserp1040.oracle.com' FROM:'wim.ten.have@oracle.com' RCPT:'' X-RedHat-Spam-Score: -102.321 (RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY, USER_IN_WHITELIST) 141.146.126.69 aserp1040.oracle.com 141.146.126.69 aserp1040.oracle.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Wim ten Have Subject: [libvirt] [PATCH v6 4/4] xlconfigtest: add tests for numa cell sibling distances 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.39]); Thu, 02 Nov 2017 15:47:53 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Wim ten Have Test a bidirectional xen-xl domxml to and from native for vnuma support administration as brought under this patch series. Added tests for the libxl_domain_config generator determining vnuma conversion for XML-2-json and json-2-XML. Signed-off-by: Wim ten Have --- Changes on v5: - Added tests for libxl_domain_config generator. - Introduced empty stubs for xc_physinfo(), xc_sharing_freed_pages(), xc_sharing_used_frames to satisfy libxl_get_physinfo() under test simulation for libxlxml2domconfigtest.c --- tests/libxlxml2domconfigdata/basic-hvm.json | 95 ++++++++++++++++++= +++- tests/libxlxml2domconfigdata/basic-hvm.xml | 66 ++++++++++++++- tests/virmocklibxl.c | 13 +++ .../test-fullvirt-vnuma-autocomplete.cfg | 26 ++++++ .../test-fullvirt-vnuma-autocomplete.xml | 85 +++++++++++++++++++ .../test-fullvirt-vnuma-nodistances.cfg | 26 ++++++ .../test-fullvirt-vnuma-nodistances.xml | 53 ++++++++++++ .../test-fullvirt-vnuma-partialdist.cfg | 26 ++++++ .../test-fullvirt-vnuma-partialdist.xml | 60 ++++++++++++++ tests/xlconfigdata/test-fullvirt-vnuma.cfg | 26 ++++++ tests/xlconfigdata/test-fullvirt-vnuma.xml | 81 ++++++++++++++++++ tests/xlconfigtest.c | 6 ++ 12 files changed, 559 insertions(+), 4 deletions(-) create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.xml create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma-nodistances.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma-nodistances.xml create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma-partialdist.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma-partialdist.xml create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma.xml diff --git a/tests/libxlxml2domconfigdata/basic-hvm.json b/tests/libxlxml2d= omconfigdata/basic-hvm.json index 6fa41f34f..3a5071e14 100644 --- a/tests/libxlxml2domconfigdata/basic-hvm.json +++ b/tests/libxlxml2domconfigdata/basic-hvm.json @@ -5,17 +5,105 @@ "uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b" }, "b_info": { - "max_vcpus": 4, + "max_vcpus": 6, "avail_vcpus": [ 0, 1, 2, - 3 + 3, + 4, + 5 + ], + "vnuma_nodes": [ + { + "memkb": 2097152, + "distances": [ + 10, + 21, + 31, + 41, + 51, + 61 + ], + "vcpus": [ + 0 + ] + }, + { + "memkb": 2097152, + "distances": [ + 21, + 10, + 21, + 31, + 41, + 51 + ], + "vcpus": [ + 1 + ] + }, + { + "memkb": 2097152, + "distances": [ + 31, + 21, + 10, + 21, + 31, + 41 + ], + "vcpus": [ + 2 + ] + }, + { + "memkb": 2097152, + "distances": [ + 41, + 31, + 21, + 10, + 21, + 31 + ], + "vcpus": [ + 3 + ] + }, + { + "memkb": 2097152, + "distances": [ + 51, + 41, + 31, + 21, + 10, + 21 + ], + "vcpus": [ + 4 + ] + }, + { + "memkb": 2097152, + "distances": [ + 61, + 51, + 41, + 31, + 21, + 10 + ], + "vcpus": [ + 5 + ] + } ], "max_memkb": 1048576, "target_memkb": 1048576, "video_memkb": 8192, - "shadow_memkb": 12288, + "shadow_memkb": 14336, "device_model_version": "qemu_xen", "device_model": "/bin/true", "sched_params": { @@ -25,6 +113,7 @@ "pae": "True", "apic": "True", "acpi": "True", + "nested_hvm": "True", "vga": { "kind": "cirrus" }, diff --git a/tests/libxlxml2domconfigdata/basic-hvm.xml b/tests/libxlxml2do= mconfigdata/basic-hvm.xml index d8cd2a283..28ad923e8 100644 --- a/tests/libxlxml2domconfigdata/basic-hvm.xml +++ b/tests/libxlxml2domconfigdata/basic-hvm.xml @@ -4,7 +4,7 @@ 2147d599-9cc6-c0dc-92ab-4064b5446e9b 1048576 1048576 - 4 + 6 destroy restart destroy @@ -19,6 +19,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /bin/true diff --git a/tests/virmocklibxl.c b/tests/virmocklibxl.c index bc4b53d68..747f9f8f8 100644 --- a/tests/virmocklibxl.c +++ b/tests/virmocklibxl.c @@ -52,6 +52,19 @@ VIR_MOCK_STUB_RET_ARGS(xc_interface_close, int, 0, xc_interface *, handle) =20 +VIR_MOCK_STUB_RET_ARGS(xc_physinfo, + int, 0, + xc_interface *, handle, + xc_physinfo_t *, put_info) + +VIR_MOCK_STUB_RET_ARGS(xc_sharing_freed_pages, + long, 0, + xc_interface *, handle) + +VIR_MOCK_STUB_RET_ARGS(xc_sharing_used_frames, + long, 0, + xc_interface *, handle) + VIR_MOCK_STUB_VOID_ARGS(xs_daemon_close, struct xs_handle *, handle) =20 diff --git a/tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg b/test= s/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg new file mode 100644 index 000000000..edba69a17 --- /dev/null +++ b/tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.cfg @@ -0,0 +1,26 @@ +name =3D "XenGuest2" +uuid =3D "c7a5fdb2-cdaf-9455-926a-d65c16db1809" +maxmem =3D 8192 +memory =3D 8192 +vcpus =3D 12 +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=3De1000" ] +parallel =3D "none" +serial =3D "none" +builder =3D "hvm" +boot =3D "d" +vnuma =3D [ [ "pnode=3D0", "size=3D2048", "vcpus=3D0,11", "vdistances=3D10= ,21,31,41,51,61" ], [ "pnode=3D1", "size=3D2048", "vcpus=3D1,10", "vdistanc= es=3D21,10,21,31,41,51" ], [ "pnode=3D2", "size=3D2048", "vcpus=3D2,9", "vd= istances=3D31,21,10,21,31,41" ], [ "pnode=3D3", "size=3D2048", "vcpus=3D3,8= ", "vdistances=3D41,31,21,10,21,31" ], [ "pnode=3D4", "size=3D2048", "vcpus= =3D4,7", "vdistances=3D51,41,31,21,10,21" ], [ "pnode=3D5", "size=3D2048", = "vcpus=3D5-6", "vdistances=3D61,51,41,31,21,10" ] ] +disk =3D [ "format=3Draw,vdev=3Dhda,access=3Drw,backendtype=3Dphy,target= =3D/dev/HostVG/XenGuest2" ] diff --git a/tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.xml b/test= s/xlconfigdata/test-fullvirt-vnuma-autocomplete.xml new file mode 100644 index 000000000..e3639eb04 --- /dev/null +++ b/tests/xlconfigdata/test-fullvirt-vnuma-autocomplete.xml @@ -0,0 +1,85 @@ + + XenGuest2 + c7a5fdb2-cdaf-9455-926a-d65c16db1809 + 8388608 + 8388608 + 12 + + hvm + /usr/lib/xen/boot/hvmloader + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + destroy + restart + restart + + /usr/lib/xen/bin/qemu-system-i386 + + + + +
+ + + + + +