]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Add coverage for panic on riscv64
authorAndrea Bolognani <abologna@redhat.com>
Tue, 27 Aug 2024 14:13:22 +0000 (16:13 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 3 Sep 2024 12:06:08 +0000 (14:06 +0200)
It merely duplicates the existing aarch64 coverage right now,
but it will become actually useful with the upcoming changes.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxmlconfdata/riscv64-panic-no-model.riscv64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/riscv64-panic-no-model.xml [new file with mode: 0644]
tests/qemuxmlconftest.c

diff --git a/tests/qemuxmlconfdata/riscv64-panic-no-model.riscv64-latest.err b/tests/qemuxmlconfdata/riscv64-panic-no-model.riscv64-latest.err
new file mode 100644 (file)
index 0000000..8e3f2c1
--- /dev/null
@@ -0,0 +1 @@
+unsupported configuration: the QEMU binary does not support the ISA panic device
diff --git a/tests/qemuxmlconfdata/riscv64-panic-no-model.xml b/tests/qemuxmlconfdata/riscv64-panic-no-model.xml
new file mode 100644 (file)
index 0000000..9731a99
--- /dev/null
@@ -0,0 +1,13 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory>4194304</memory>
+  <vcpu>4</vcpu>
+  <os>
+    <type arch='riscv64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <panic/>
+  </devices>
+</domain>
index f7c0cf4ad0c932f9bcf89f9504b2ab293fe77eb2..e97d0e7bdc0f6cabe7354559c01ae79d279020d6 100644 (file)
@@ -2649,6 +2649,7 @@ mymain(void)
     DO_TEST_CAPS_LATEST("panic-double");
     DO_TEST_CAPS_LATEST("panic-no-address");
     DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-panic-no-model", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("riscv64-panic-no-model", "riscv64");
 
     DO_TEST_CAPS_LATEST("pvpanic-pci-x86_64");
     DO_TEST_CAPS_ARCH_LATEST("pvpanic-pci-aarch64", "aarch64");