From nobody Sun Apr 28 06:51:58 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 1527111428975308.69737966653304; Wed, 23 May 2018 14:37:08 -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 C7B7030B787A; Wed, 23 May 2018 21:37:06 +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 AD06C5C3FA; Wed, 23 May 2018 21:37:05 +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 604A44CA80; Wed, 23 May 2018 21:37:04 +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 w4NLVmXA031042 for ; Wed, 23 May 2018 17:31:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4DDD5D1CB; Wed, 23 May 2018 21:31:48 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46A7860476 for ; Wed, 23 May 2018 21:31:45 +0000 (UTC) Received: from smtp2.provo.novell.com (smtp2.provo.novell.com [137.65.250.81]) (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 EB6E826334 for ; Wed, 23 May 2018 21:31:43 +0000 (UTC) Received: from linux-tbji.provo.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (NOT encrypted); Wed, 23 May 2018 15:31:38 -0600 From: Jim Fehlig To: libvir-list@redhat.com Date: Wed, 23 May 2018 15:31:29 -0600 Message-Id: <20180523213129.28768-1-jfehlig@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 23 May 2018 21:31:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 23 May 2018 21:31:44 +0000 (UTC) for IP:'137.65.250.81' DOMAIN:'smtp2.provo.novell.com' HELO:'smtp2.provo.novell.com' FROM:'jfehlig@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.81 smtp2.provo.novell.com 137.65.250.81 smtp2.provo.novell.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: filipalac@gmail.com Subject: [libvirt] [PATCH V2] tests: xmconfigtest: add tests for cmdline formating 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.48]); Wed, 23 May 2018 21:37:07 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Commit 656151bf fixed formatting of the element. Perhaps it would have been noticed and fixed earlier if we had a test. With this change, all possible cases of formating from xmconfig are covered 1. no 'extra=3D' or 'root=3D' in xm.cfg 2. 'extra=3D' but no 'root=3D' in xm.cfg 3. 'root=3D' but no 'extra=3D' in xm.cfg 4. both 'root=3D' and 'extra=3D' in xm.cfg Case 1 is covered by all existing paravirt tests since they have no 'extra=3D' or 'root=3D'. Case 2 is covered by adding 'extra=3D' to a few of the existing paravirt tests. Cases 3 and 4 are covered by new tests that only test conversion of xm.cfg to xml. Signed-off-by: Jim Fehlig Reviewed-by: John Ferlan --- tests/xmconfigdata/test-paravirt-extra-root.cfg | 13 ++++++++++ tests/xmconfigdata/test-paravirt-extra-root.xml | 34 +++++++++++++++++++++= ++++ tests/xmconfigdata/test-paravirt-maxvcpus.cfg | 1 + tests/xmconfigdata/test-paravirt-maxvcpus.xml | 1 + tests/xmconfigdata/test-paravirt-root.cfg | 12 +++++++++ tests/xmconfigdata/test-paravirt-root.xml | 34 +++++++++++++++++++++= ++++ tests/xmconfigdata/test-paravirt-vcpu.cfg | 1 + tests/xmconfigdata/test-paravirt-vcpu.xml | 1 + tests/xmconfigtest.c | 2 ++ 9 files changed, 99 insertions(+) create mode 100644 tests/xmconfigdata/test-paravirt-extra-root.cfg create mode 100644 tests/xmconfigdata/test-paravirt-extra-root.xml create mode 100644 tests/xmconfigdata/test-paravirt-root.cfg create mode 100644 tests/xmconfigdata/test-paravirt-root.xml diff --git a/tests/xmconfigdata/test-paravirt-extra-root.cfg b/tests/xmconf= igdata/test-paravirt-extra-root.cfg new file mode 100644 index 0000000000..2569f2f22c --- /dev/null +++ b/tests/xmconfigdata/test-paravirt-extra-root.cfg @@ -0,0 +1,13 @@ +name =3D "XenGuest1" +uuid =3D "c7a5fdb0-cdaf-9455-926a-d65c16db1809" +memory =3D 512 +vcpus =3D 2 +localtime =3D 0 +on_poweroff =3D "destroy" +on_reboot =3D "restart" +on_crash =3D "restart" +vif =3D [ "mac=3D00:16:3e:66:94:9c,bridge=3Dbr0,script=3Dvif-bridge" ] +bootloader =3D "/usr/bin/pygrub" +root =3D "/dev/xvda2" +extra =3D "console=3Dhvc0" +disk =3D [ "phy:/dev/HostVG/XenGuest1,xvda,w" ] diff --git a/tests/xmconfigdata/test-paravirt-extra-root.xml b/tests/xmconf= igdata/test-paravirt-extra-root.xml new file mode 100644 index 0000000000..325b07d8e1 --- /dev/null +++ b/tests/xmconfigdata/test-paravirt-extra-root.xml @@ -0,0 +1,34 @@ + + XenGuest1 + c7a5fdb0-cdaf-9455-926a-d65c16db1809 + 524288 + 524288 + 2 + /usr/bin/pygrub + + linux + root=3D/dev/xvda2 console=3Dhvc0 + + + destroy + restart + restart + + + + + + + + + +