[libvirt PATCH 1/2] tests: Add cases for numatune with unavailable nodes

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

 



The one for mode=strict fails, as expected, while the one for
mode=restrictive currently doesn't even though it should. The
next commit will address the issue.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 ...unavailable-restrictive.x86_64-latest.args | 32 +++++++++++++++++++
 ...matune-memnode-unavailable-restrictive.xml | 20 ++++++++++++
 ...mnode-unavailable-strict.x86_64-latest.err |  1 +
 .../numatune-memnode-unavailable-strict.xml   | 20 ++++++++++++
 tests/qemuxml2argvtest.c                      |  2 ++
 5 files changed, 75 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/numatune-memnode-unavailable-restrictive.x86_64-latest.args
 create mode 100644 tests/qemuxml2argvdata/numatune-memnode-unavailable-restrictive.xml
 create mode 100644 tests/qemuxml2argvdata/numatune-memnode-unavailable-strict.x86_64-latest.err
 create mode 100644 tests/qemuxml2argvdata/numatune-memnode-unavailable-strict.xml

diff --git a/tests/qemuxml2argvdata/numatune-memnode-unavailable-restrictive.x86_64-latest.args b/tests/qemuxml2argvdata/numatune-memnode-unavailable-restrictive.x86_64-latest.args
new file mode 100644
index 0000000000..b257ef1c68
--- /dev/null
+++ b/tests/qemuxml2argvdata/numatune-memnode-unavailable-restrictive.x86_64-latest.args
@@ -0,0 +1,32 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-QEMUGuest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=QEMUGuest,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest/master-key.aes"}' \
+-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \
+-accel tcg \
+-cpu qemu64 \
+-m 24104 \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":25274875904}' \
+-overcommit mem-lock=off \
+-smp 32,sockets=32,cores=1,threads=1 \
+-uuid 9f4b6512-e73a-4a25-93e8-5307802821ce \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/numatune-memnode-unavailable-restrictive.xml b/tests/qemuxml2argvdata/numatune-memnode-unavailable-restrictive.xml
new file mode 100644
index 0000000000..741bec399b
--- /dev/null
+++ b/tests/qemuxml2argvdata/numatune-memnode-unavailable-restrictive.xml
@@ -0,0 +1,20 @@
+<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='restrictive' nodeset='999'/>
+  </numatune>
+  <os>
+    <type arch='x86_64' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' model='none'/>
+    <controller type='pci' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/numatune-memnode-unavailable-strict.x86_64-latest.err b/tests/qemuxml2argvdata/numatune-memnode-unavailable-strict.x86_64-latest.err
new file mode 100644
index 0000000000..a826c3cdeb
--- /dev/null
+++ b/tests/qemuxml2argvdata/numatune-memnode-unavailable-strict.x86_64-latest.err
@@ -0,0 +1 @@
+internal error: Mock: no numa node set is available at bit 999
diff --git a/tests/qemuxml2argvdata/numatune-memnode-unavailable-strict.xml b/tests/qemuxml2argvdata/numatune-memnode-unavailable-strict.xml
new file mode 100644
index 0000000000..a2805f7f91
--- /dev/null
+++ b/tests/qemuxml2argvdata/numatune-memnode-unavailable-strict.xml
@@ -0,0 +1,20 @@
+<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='999'/>
+  </numatune>
+  <os>
+    <type arch='x86_64' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' model='none'/>
+    <controller type='pci' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 2db0e90f2b..8130e12314 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1981,6 +1981,8 @@ mymain(void)
     DO_TEST_FAILURE_NOCAPS("numatune-static-nodeset-exceed-hostnode");
     DO_TEST_PARSE_ERROR_NOCAPS("numatune-memnode-nocpu");
     DO_TEST_PARSE_ERROR_NOCAPS("numatune-memnodes-problematic");
+    DO_TEST_CAPS_LATEST_FAILURE("numatune-memnode-unavailable-strict");
+    DO_TEST_CAPS_LATEST("numatune-memnode-unavailable-restrictive");
     DO_TEST_NOCAPS("numad");
     DO_TEST_NOCAPS("numad-auto-vcpu-static-numatune");
     DO_TEST_PARSE_ERROR_NOCAPS("numad-auto-vcpu-static-numatune-no-nodeset");
-- 
2.39.0




[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