Re: [PATCH LIBVIRT v3] libxl: Support cmdline= in xl config files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Campbell wrote:
> ... 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@xxxxxxxxxx>
> ---
> v2: Use VIR_INFO (adding necessary infra)
>     Don't initialise things to NULL when there is no need.
> v3: I know know the answer re VIR_FROM_THIS, because Jim fixed it.
>     Initialise cmdline to NULL, since neither I nor gcc were smart
>      enough to spot the uninitialised path I did this in preference to
>      adding the else case, since that apparently won't be masking the
>      compiler's ability to spot uninitialised vars in this function.
>     Add tests
>     Addjust xenFormatXLOS to produce cmdline= instead of extra=.
> ---
>  src/xenconfig/xen_xl.c                             | 70 +++++++++++++---------
>  ...est-fullvirt-direct-kernel-boot-bogus-extra.cfg | 31 ++++++++++
>  ...est-fullvirt-direct-kernel-boot-bogus-extra.xml | 51 ++++++++++++++++
>  .../test-fullvirt-direct-kernel-boot-extra.cfg     | 30 ++++++++++
>  .../test-fullvirt-direct-kernel-boot-extra.xml     | 51 ++++++++++++++++
>  .../test-fullvirt-direct-kernel-boot.cfg           |  2 +-
>  .../test-paravirt-cmdline-bogus-extra-root.cfg     | 13 ++++
>  .../test-paravirt-cmdline-bogus-extra-root.xml     | 32 ++++++++++
>  .../test-paravirt-cmdline-extra-root.cfg           | 15 +++++
>  .../test-paravirt-cmdline-extra-root.xml           | 32 ++++++++++
>  tests/xlconfigdata/test-paravirt-cmdline.cfg       | 14 +++++
>  tests/xlconfigdata/test-paravirt-cmdline.xml       | 32 ++++++++++
>  tests/xlconfigtest.c                               | 24 ++++++--

Thanks for fixing the 'XM-2-XML' typo while touching the xlconfigtest.c code.

>  13 files changed, 365 insertions(+), 32 deletions(-)
>  create mode 100644 tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg
>  create mode 100644 tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml
>  create mode 100644 tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg
>  create mode 100644 tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml
>  create mode 100644 tests/xlconfigdata/test-paravirt-cmdline-bogus-extra-root.cfg
>  create mode 100644 tests/xlconfigdata/test-paravirt-cmdline-bogus-extra-root.xml
>  create mode 100644 tests/xlconfigdata/test-paravirt-cmdline-extra-root.cfg
>  create mode 100644 tests/xlconfigdata/test-paravirt-cmdline-extra-root.xml
>  create mode 100644 tests/xlconfigdata/test-paravirt-cmdline.cfg
>  create mode 100644 tests/xlconfigdata/test-paravirt-cmdline.xml

ACK and pushed. Thanks!

Regards,
Jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]