From 7e8feed4a74b623eca0580a3db140eab2b5fa2b9 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 15 Sep 2014 17:33:16 -0600 Subject: [PATCH] cputune: allow interleaved xml I noticed this with the recent iothread pinning code, but the problem existed longer than that. The XML validation required users to supply children in a strict order, even though there was no conceptual reason why they can't occur in any order. docs/ changes best viewed with -w * docs/schemas/domaincommon.rng (cputune): Add interleave. * tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml: Swap up order, copying canonical form... * tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml: ...here. * tests/qemuxml2xmltest.c (mymain): Mark the difference. Signed-off-by: Eric Blake --- docs/schemas/domaincommon.rng | 106 +++++++++--------- .../qemuxml2argv-cputune-iothreads.xml | 15 +-- .../qemuxml2xmlout-cputune-iothreads.xml | 38 +++++++ tests/qemuxml2xmltest.c | 2 +- 4 files changed, 101 insertions(+), 60 deletions(-) create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 9d3775d37c..dd55a99d17 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -768,58 +768,60 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml index 435d0ae702..c8cc02516a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml @@ -6,14 +6,15 @@ 2 2 - 2048 - 1000000 - -1 - - - - + + + + + + -1 + 1000000 + 2048 hvm diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml new file mode 100644 index 0000000000..3684483549 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml @@ -0,0 +1,38 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 2 + 2 + + 2048 + 1000000 + -1 + + + + + + + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + +
+ + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index d269fb3332..195929145a 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -302,7 +302,7 @@ mymain(void) DO_TEST("smp"); DO_TEST("iothreads"); - DO_TEST("cputune-iothreads"); + DO_TEST_DIFFERENT("cputune-iothreads"); DO_TEST("iothreads-disk"); DO_TEST("lease"); DO_TEST("event_idx");