From a620d42d440828f1f978a75c01a9515d0c131721 Mon Sep 17 00:00:00 2001 Message-Id: From: Jiri Denemark Date: Thu, 20 Feb 2020 09:08:04 +0100 Subject: [PATCH] qemuxml2xmltest: Add case for host-model vendor_id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch shows a bug in our code: the element present in the source XML is lost when the parsed CPU definition is formatted back to XML. https://bugzilla.redhat.com/show_bug.cgi?id=1804549 Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko (cherry picked from commit 1939fbef989e6990cb5dd2d2d7ff8ea002c517c2) Signed-off-by: Jiri Denemark Message-Id: Reviewed-by: Ján Tomko --- .../cpu-host-model-vendor.xml | 28 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 2 files changed, 29 insertions(+) create mode 100644 tests/qemuxml2xmloutdata/cpu-host-model-vendor.xml diff --git a/tests/qemuxml2xmloutdata/cpu-host-model-vendor.xml b/tests/qemuxml2xmloutdata/cpu-host-model-vendor.xml new file mode 100644 index 0000000000..d2447ccd10 --- /dev/null +++ b/tests/qemuxml2xmloutdata/cpu-host-model-vendor.xml @@ -0,0 +1,28 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 6 + + hvm + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index a3c7f8fd47..7c105e5207 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -266,6 +266,7 @@ mymain(void) DO_TEST("cpu-host-kvmclock", NONE); DO_TEST("cpu-host-passthrough-features", NONE); DO_TEST("cpu-host-model-features", NONE); + DO_TEST("cpu-host-model-vendor", NONE); DO_TEST("clock-catchup", QEMU_CAPS_KVM_PIT_TICK_POLICY); DO_TEST("kvmclock", NONE); DO_TEST("clock-timer-hyperv-rtc", NONE); -- 2.25.0