From: Jim Fehlig Date: Wed, 23 May 2018 21:09:45 +0000 (-0600) Subject: tests: xmconfigtest: add tests for cmdline formating X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=refs%2Fheads%2Fosstest%2Ffrozen%2Fxen-4.11-testing;p=libvirt.git tests: xmconfigtest: add tests for cmdline formating 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 formatting from xmconfig are covered 1. no 'extra=' or 'root=' in xm.cfg 2. 'extra=' but no 'root=' in xm.cfg 3. 'root=' but no 'extra=' in xm.cfg 4. both 'root=' and 'extra=' in xm.cfg Case 1 is covered by all existing paravirt tests since they have no 'extra=' or 'root='. Case 2 is covered by adding 'extra=' 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 --- diff --git a/tests/xmconfigdata/test-paravirt-extra-root.cfg b/tests/xmconfigdata/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 = "XenGuest1" +uuid = "c7a5fdb0-cdaf-9455-926a-d65c16db1809" +memory = 512 +vcpus = 2 +localtime = 0 +on_poweroff = "destroy" +on_reboot = "restart" +on_crash = "restart" +vif = [ "mac=00:16:3e:66:94:9c,bridge=br0,script=vif-bridge" ] +bootloader = "/usr/bin/pygrub" +root = "/dev/xvda2" +extra = "console=hvc0" +disk = [ "phy:/dev/HostVG/XenGuest1,xvda,w" ] diff --git a/tests/xmconfigdata/test-paravirt-extra-root.xml b/tests/xmconfigdata/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=/dev/xvda2 console=hvc0 + + + destroy + restart + restart + + + + + + + + + +