[PATCH 3/3] tests: negative test of binding memnode cellid to an nonexist guest cell

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

 



Signed-off-by: Han Han <hhan@xxxxxxxxxx>
---
 ...une-memnode-cellid-nonexist-guest-cell.err |  1 +
 ...une-memnode-cellid-nonexist-guest-cell.xml | 31 +++++++++++++++++++
 tests/qemuxml2argvtest.c                      |  1 +
 3 files changed, 33 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/numatune-memnode-cellid-nonexist-guest-cell.err
 create mode 100644 tests/qemuxml2argvdata/numatune-memnode-cellid-nonexist-guest-cell.xml

diff --git a/tests/qemuxml2argvdata/numatune-memnode-cellid-nonexist-guest-cell.err b/tests/qemuxml2argvdata/numatune-memnode-cellid-nonexist-guest-cell.err
new file mode 100644
index 0000000000..b830c6a28c
--- /dev/null
+++ b/tests/qemuxml2argvdata/numatune-memnode-cellid-nonexist-guest-cell.err
@@ -0,0 +1 @@
+XML error: Argument 'cellid' in memnode element must correspond to existing guest's NUMA cell
diff --git a/tests/qemuxml2argvdata/numatune-memnode-cellid-nonexist-guest-cell.xml b/tests/qemuxml2argvdata/numatune-memnode-cellid-nonexist-guest-cell.xml
new file mode 100644
index 0000000000..710628cfb0
--- /dev/null
+++ b/tests/qemuxml2argvdata/numatune-memnode-cellid-nonexist-guest-cell.xml
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+  <name>QEMUGuest</name>
+  <uuid>9f4b6512-e73a-4a25-93e8-5307802821ce</uuid>
+  <memory unit='KiB'>24682468</memory>
+  <currentMemory unit='KiB'>24682468</currentMemory>
+  <vcpu placement='static'>32</vcpu>
+  <numatune>
+    <memory mode='strict' nodeset='0-1'/>
+    <memnode cellid='1' mode='preferred' nodeset='0'/>
+  </numatune>
+  <os>
+    <type arch='x86_64' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+    <numa>
+      <cell id='0' cpus='0-4' memory='512000' unit='KiB'/>
+    </numa>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='virtio'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index ea38238823..31c8894ffc 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2158,6 +2158,7 @@ mymain(void)
                     QEMU_CAPS_OBJECT_MEMORY_RAM);
     DO_TEST_PARSE_ERROR("numatune-memnode-nocpu", NONE);
     DO_TEST_PARSE_ERROR("numatune-memnodes-problematic", NONE);
+    DO_TEST_PARSE_ERROR("numatune-memnode-cellid-nonexist-guest-cell", NONE);
     DO_TEST("numad", NONE);
     DO_TEST("numad-auto-vcpu-static-numatune", NONE);
     DO_TEST_PARSE_ERROR("numad-auto-vcpu-static-numatune-no-nodeset", NONE);
-- 
2.30.2




[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]

  Powered by Linux