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