[libvirt] [PATCH V2] tests: xmconfigtest: add tests for cmdline formating

John Ferlan jferlan at redhat.com
Mon Jun 4 18:29:07 UTC 2018



On 05/23/2018 05:31 PM, Jim Fehlig wrote:
> Commit 656151bf fixed formatting of the <cmdline> element. Perhaps it
> would have been noticed and fixed earlier if we had a test. With this
> change, all possible cases of formating <cmdline> from xmconfig are

formatting

> 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 <jfehlig at suse.com>
> ---
>  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
> 

Reviewed-by: John Ferlan <jferlan at redhat.com>

John




More information about the libvir-list mailing list