render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
d76c62
From 18f28324129e34a486c5df049785d7ee04960f1d Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <18f28324129e34a486c5df049785d7ee04960f1d@dist-git>
d76c62
From: Andrea Bolognani <abologna@redhat.com>
d76c62
Date: Fri, 14 Feb 2020 14:14:51 +0100
d76c62
Subject: [PATCH] tests: Add test case for the armvtimer timer
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
(cherry picked from commit 76121fc9c49d26c1ca4f596c3cac5c05eb02fc76)
d76c62
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1762634
d76c62
d76c62
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
d76c62
Message-Id: <20200214131451.707092-1-abologna@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
---
d76c62
 .../clock-timer-armvtimer.aarch64-latest.args | 32 +++++++++++++++++++
d76c62
 .../clock-timer-armvtimer.xml                 | 27 ++++++++++++++++
d76c62
 tests/qemuxml2argvtest.c                      |  2 ++
d76c62
 .../clock-timer-armvtimer.aarch64-latest.xml  |  1 +
d76c62
 tests/qemuxml2xmltest.c                       |  1 +
d76c62
 5 files changed, 63 insertions(+)
d76c62
 create mode 100644 tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args
d76c62
 create mode 100644 tests/qemuxml2argvdata/clock-timer-armvtimer.xml
d76c62
 create mode 120000 tests/qemuxml2xmloutdata/clock-timer-armvtimer.aarch64-latest.xml
d76c62
d76c62
diff --git a/tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args b/tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args
d76c62
new file mode 100644
d76c62
index 0000000000..a1faa97b9f
d76c62
--- /dev/null
d76c62
+++ b/tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args
d76c62
@@ -0,0 +1,32 @@
d76c62
+LC_ALL=C \
d76c62
+PATH=/bin \
d76c62
+HOME=/tmp/lib/domain--1-guest \
d76c62
+USER=test \
d76c62
+LOGNAME=test \
d76c62
+XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \
d76c62
+XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \
d76c62
+XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
d76c62
+QEMU_AUDIO_DRV=none \
d76c62
+/usr/bin/qemu-system-aarch64 \
d76c62
+-name guest=guest,debug-threads=on \
d76c62
+-S \
d76c62
+-object secret,id=masterKey0,format=raw,\
d76c62
+file=/tmp/lib/domain--1-guest/master-key.aes \
d76c62
+-machine virt,accel=kvm,usb=off,dump-guest-core=off,gic-version=3 \
d76c62
+-cpu host,kvm-no-adjvtime=on \
d76c62
+-m 4096 \
d76c62
+-overcommit mem-lock=off \
d76c62
+-smp 4,sockets=4,cores=1,threads=1 \
d76c62
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
d76c62
+-display none \
d76c62
+-no-user-config \
d76c62
+-nodefaults \
d76c62
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
d76c62
+-mon chardev=charmonitor,id=monitor,mode=control \
d76c62
+-rtc base=utc \
d76c62
+-no-shutdown \
d76c62
+-no-acpi \
d76c62
+-boot strict=on \
d76c62
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
d76c62
+resourcecontrol=deny \
d76c62
+-msg timestamp=on
d76c62
diff --git a/tests/qemuxml2argvdata/clock-timer-armvtimer.xml b/tests/qemuxml2argvdata/clock-timer-armvtimer.xml
d76c62
new file mode 100644
d76c62
index 0000000000..295ab64d75
d76c62
--- /dev/null
d76c62
+++ b/tests/qemuxml2argvdata/clock-timer-armvtimer.xml
d76c62
@@ -0,0 +1,27 @@
d76c62
+<domain type='kvm'>
d76c62
+  <name>guest</name>
d76c62
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
d76c62
+  <memory unit='KiB'>4194304</memory>
d76c62
+  <currentMemory unit='KiB'>4194304</currentMemory>
d76c62
+  <vcpu placement='static'>4</vcpu>
d76c62
+  <os>
d76c62
+    <type arch='aarch64' machine='virt'>hvm</type>
d76c62
+    <boot dev='hd'/>
d76c62
+  </os>
d76c62
+  <features>
d76c62
+    <gic version='3'/>
d76c62
+  </features>
d76c62
+  <cpu mode='host-passthrough' check='none'/>
d76c62
+  <clock offset='utc'>
d76c62
+    <timer name='armvtimer' tickpolicy='discard'/>
d76c62
+  </clock>
d76c62
+  <on_poweroff>destroy</on_poweroff>
d76c62
+  <on_reboot>restart</on_reboot>
d76c62
+  <on_crash>destroy</on_crash>
d76c62
+  <devices>
d76c62
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
d76c62
+    <controller type='usb' index='0' model='none'/>
d76c62
+    <controller type='pci' index='0' model='pcie-root'/>
d76c62
+    <memballoon model='none'/>
d76c62
+  </devices>
d76c62
+</domain>
d76c62
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
d76c62
index 4d26fe0b55..508dfee3fb 100644
d76c62
--- a/tests/qemuxml2argvtest.c
d76c62
+++ b/tests/qemuxml2argvtest.c
d76c62
@@ -2721,6 +2721,8 @@ mymain(void)
d76c62
     /* SVE aarch64 CPU features work on modern QEMU */
d76c62
     DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64");
d76c62
 
d76c62
+    DO_TEST_CAPS_ARCH_LATEST("clock-timer-armvtimer", "aarch64");
d76c62
+
d76c62
     qemuTestSetHostArch(&driver, VIR_ARCH_NONE);
d76c62
 
d76c62
     DO_TEST("kvm-pit-delay", QEMU_CAPS_KVM_PIT_TICK_POLICY);
d76c62
diff --git a/tests/qemuxml2xmloutdata/clock-timer-armvtimer.aarch64-latest.xml b/tests/qemuxml2xmloutdata/clock-timer-armvtimer.aarch64-latest.xml
d76c62
new file mode 120000
d76c62
index 0000000000..4bfddd6573
d76c62
--- /dev/null
d76c62
+++ b/tests/qemuxml2xmloutdata/clock-timer-armvtimer.aarch64-latest.xml
d76c62
@@ -0,0 +1 @@
d76c62
+../qemuxml2argvdata/clock-timer-armvtimer.xml
d76c62
\ No newline at end of file
d76c62
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
d76c62
index e54c540ef6..6a8ae9f7eb 100644
d76c62
--- a/tests/qemuxml2xmltest.c
d76c62
+++ b/tests/qemuxml2xmltest.c
d76c62
@@ -269,6 +269,7 @@ mymain(void)
d76c62
     DO_TEST("clock-catchup", QEMU_CAPS_KVM_PIT_TICK_POLICY);
d76c62
     DO_TEST("kvmclock", NONE);
d76c62
     DO_TEST("clock-timer-hyperv-rtc", NONE);
d76c62
+    DO_TEST_CAPS_ARCH_LATEST("clock-timer-armvtimer", "aarch64");
d76c62
 
d76c62
     DO_TEST("cpu-eoi-disabled", NONE);
d76c62
     DO_TEST("cpu-eoi-enabled", NONE);
d76c62
-- 
d76c62
2.25.0
d76c62