]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: Support cmdline= in xl config files
authorIan Campbell <ian.campbell@citrix.com>
Thu, 21 Jan 2016 12:29:29 +0000 (12:29 +0000)
committerJim Fehlig <jfehlig@suse.com>
Thu, 21 Jan 2016 17:48:44 +0000 (10:48 -0700)
commitdaeace5c5d4d5a499705a82af0a0ea9f697a7474
treed730e3cb83e4120986cf63e80ab9d4d57af6be15
parentd18d6a85f95244a35bff67054e9f0d04135639a5
libxl: Support cmdline= in xl config files

... and consolidate the cmdline/extra/root parsing to facilitate doing
so.

The logic is the same as xl's parse_cmdline from the current xen.git master
branch (e6f0e099d2c17de47fd86e817b1998db903cab61).

On the formatting side switch to producing cmdline= instead of extra=.

Update a few tests and add serveral more.
  - test-cmdline is added to test the exclusive use of cmdline.
  - test-fullvirt-direct-kernel-boot.cfg is updated due to the switch
    on the formatting side and now tests the exclusive use of cmdline=.
  - Tests are added for both paravirt and fullvirt where the .cfg uses
    extra= and (paravirt only) root=. These are format (xl->xml) only
    since the inverse will generate cmdline= hence is not a round trip
    (which was already true if using root=, which used to generate
    extra= on the way back).
  - Tests are added for both paravirt and fullvirt where the .cfg
    declares cmdline= as well as bogus extra= and (paravirt only) root=
    entries which should be ignored. Again these are format only tests
    since the inverse won't include the bogus lines.

The last two bullets here required splitting the DO_TEST macro into
two halves, as is done in the xmconfigtest.c case.

In order to introduce a use of VIR_WARN for logging I had to add
virerror.h and VIR_LOG_INIT.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
13 files changed:
src/xenconfig/xen_xl.c
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg [new file with mode: 0644]
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml [new file with mode: 0644]
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg [new file with mode: 0644]
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml [new file with mode: 0644]
tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg
tests/xlconfigdata/test-paravirt-cmdline-bogus-extra-root.cfg [new file with mode: 0644]
tests/xlconfigdata/test-paravirt-cmdline-bogus-extra-root.xml [new file with mode: 0644]
tests/xlconfigdata/test-paravirt-cmdline-extra-root.cfg [new file with mode: 0644]
tests/xlconfigdata/test-paravirt-cmdline-extra-root.xml [new file with mode: 0644]
tests/xlconfigdata/test-paravirt-cmdline.cfg [new file with mode: 0644]
tests/xlconfigdata/test-paravirt-cmdline.xml [new file with mode: 0644]
tests/xlconfigtest.c