From 6c380dea6196d97775aa748b4df96133c3046ea4 Mon Sep 17 00:00:00 2001 From: Daniel Henrique Barboza Date: Wed, 10 Jun 2020 15:35:52 -0300 Subject: [PATCH] qemuxml2xmltest.c: add NUMA vcpus auto fill tests Add a unit test to verify the NUMA vcpus autocomplete implemented in the previous patch. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Michal Privoznik --- .../numavcpus-topology-mismatch.xml | 37 ++++++++++++++++++ ...avcpus-topology-mismatch.x86_64-latest.xml | 38 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 3 files changed, 76 insertions(+) create mode 100644 tests/qemuxml2argvdata/numavcpus-topology-mismatch.xml create mode 100644 tests/qemuxml2xmloutdata/numavcpus-topology-mismatch.x86_64-latest.xml diff --git a/tests/qemuxml2argvdata/numavcpus-topology-mismatch.xml b/tests/qemuxml2argvdata/numavcpus-topology-mismatch.xml new file mode 100644 index 0000000000..d3b2c1297e --- /dev/null +++ b/tests/qemuxml2argvdata/numavcpus-topology-mismatch.xml @@ -0,0 +1,37 @@ + + dummy + 4d92ec27-9ebf-400b-ae91-20c71c647c19 + 16777216 + 7864320 + 3906240 + 12 + + + + + hvm + + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2xmloutdata/numavcpus-topology-mismatch.x86_64-latest.xml b/tests/qemuxml2xmloutdata/numavcpus-topology-mismatch.x86_64-latest.xml new file mode 100644 index 0000000000..2d2245b10c --- /dev/null +++ b/tests/qemuxml2xmloutdata/numavcpus-topology-mismatch.x86_64-latest.xml @@ -0,0 +1,38 @@ + + dummy + 4d92ec27-9ebf-400b-ae91-20c71c647c19 + 16777216 + 7864320 + 3906240 + 12 + + + + + hvm + + + + qemu64 + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 7fc8a7d61f..022f6786b9 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -554,6 +554,7 @@ mymain(void) QEMU_CAPS_KVM, QEMU_CAPS_OBJECT_IOTHREAD); DO_TEST_CAPS_LATEST("cputune-cpuset-big-id"); + DO_TEST_CAPS_LATEST("numavcpus-topology-mismatch"); DO_TEST("smp", NONE); DO_TEST("iothreads", NONE);