[libvirt PATCH 5/5] tests: Add tests for the kvm-no-adjvtime CPU feature

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

 



Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 .../aarch64-features-misc.aarch64-latest.args | 32 +++++++++++++++++++
 .../aarch64-features-misc.xml                 | 17 ++++++++++
 tests/qemuxml2argvtest.c                      |  2 ++
 3 files changed, 51 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/aarch64-features-misc.aarch64-latest.args
 create mode 100644 tests/qemuxml2argvdata/aarch64-features-misc.xml

diff --git a/tests/qemuxml2argvdata/aarch64-features-misc.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-features-misc.aarch64-latest.args
new file mode 100644
index 0000000000..f1d1017d59
--- /dev/null
+++ b/tests/qemuxml2argvdata/aarch64-features-misc.aarch64-latest.args
@@ -0,0 +1,32 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-aarch64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-guest/master-key.aes \
+-machine virt,accel=kvm,usb=off,dump-guest-core=off,gic-version=3 \
+-cpu host,kvm-no-adjvtime=on \
+-m 1024 \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/aarch64-features-misc.xml b/tests/qemuxml2argvdata/aarch64-features-misc.xml
new file mode 100644
index 0000000000..49e197ad87
--- /dev/null
+++ b/tests/qemuxml2argvdata/aarch64-features-misc.xml
@@ -0,0 +1,17 @@
+<domain type='kvm'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+  </os>
+  <cpu mode='host-passthrough'>
+    <feature policy='require' name='kvm-no-adjvtime'/>
+  </cpu>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' model='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a36183bf34..81b82bcd1f 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2725,6 +2725,8 @@ mymain(void)
     /* SVE aarch64 CPU features work on modern QEMU */
     DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64");
 
+    DO_TEST_CAPS_ARCH_LATEST("aarch64-features-misc", "aarch64");
+
     qemuTestSetHostArch(&driver, VIR_ARCH_NONE);
 
     DO_TEST("kvm-pit-delay", QEMU_CAPS_KVM_PIT_TICK_POLICY);
-- 
2.24.1





[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