<div dir="ltr"><div>It may be worth to take a look at files test-paravirt-cmdline,cmdline-<wbr>bogus-extra...etc. in tests/xlconfigdata.<br></div><div>They look they are testing the same/similiar problem.<br></div><div>Feel free to to make v2, Thanks.<div class="gmail-yj6qo gmail-ajU"><div id="gmail-:1ky" class="gmail-ajR" tabindex="0"><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-22 1:57 GMT+02:00 Jim Fehlig <span dir="ltr"><<a href="mailto:jfehlig@suse.com" target="_blank">jfehlig@suse.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/21/2018 05:57 AM, Filip Alac wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Add test case for the os cmdline.<br>
Check if:<br>
656151bf5dd299322dcf37d06d2053<wbr>4e667a1963<br>
work as expected.<br>
</blockquote>
<br></span>
Thanks for taking up Cole's suggestion! I had added it to my todo list.<br>
<br>
To test the code you fixed in 656151bf, we need to check the following<br>
<br>
1. no 'extra=' or 'root=' in xm.cfg<br>
2. 'extra=' but no 'root=' in xm.cfg<br>
3. 'root=' but no 'extra=' in xm.cfg<br>
4. both 'root=' and 'extra=' in xm.cfg<br>
<br>
Since all of the existing xmconfig tests have no 'extra=' or 'root=', we've got 1 covered :-). We could be evil and test 2 by adding 'extra=' to an existing paravirt test, e.g. test-paravirt-vcpu. Perhaps less evil would be to add 'extra=' to all the existing paravirt tests, along with <cmdline> in associated .xml file.<br>
<br>
3 and 4 need handled a bit differently since the roundtrip xm.cfg to xml to xm.cfg tests will not pass when xm.cfg contains 'root='. The xm.cfg to xml conversion maps 'root=' to <cmdline>, but the reverse maps <cmdline> to 'extra='. The easy solution is to only test the xm.cfg to xml conversion using the DO_TEST_FORMAT macro. E.g attached is a patch that tests xm.cfg to xml conversion of xm.cfg containing both 'extra=' and 'root='. We'd need a similar change for testing only 'root='.<br>
<br>
Do you have time to tweak the patch to test all conditions and submit a V2? If not I'll get to it.<br>
<br>
Regards,<br>
Jim<br>
</blockquote></div><br></div>