]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Test pcie-expander-bus for aarch64/virt guests
authorAndrea Bolognani <abologna@redhat.com>
Thu, 22 Jul 2021 13:06:03 +0000 (15:06 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 4 Aug 2021 07:58:16 +0000 (09:58 +0200)
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxml2argvdata/pcie-expander-bus-aarch64.aarch64-latest.args [new file with mode: 0644]
tests/qemuxml2argvdata/pcie-expander-bus-aarch64.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/pcie-expander-bus-aarch64.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c

diff --git a/tests/qemuxml2argvdata/pcie-expander-bus-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/pcie-expander-bus-aarch64.aarch64-latest.args
new file mode 100644 (file)
index 0000000..d3b7f72
--- /dev/null
@@ -0,0 +1,32 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-pcie-expander-bus-te \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-pcie-expander-bus-te/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-pcie-expander-bus-te/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-pcie-expander-bus-te/.config \
+/usr/bin/qemu-system-aarch64 \
+-name guest=pcie-expander-bus-test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-pcie-expander-bus-te/master-key.aes"}' \
+-machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2,memory-backend=mach-virt.ram \
+-cpu cortex-a15 \
+-m 2048 \
+-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":2147483648}' \
+-overcommit mem-lock=off \
+-smp 16,sockets=16,cores=1,threads=1 \
+-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
+-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 \
+-device pxb-pcie,bus_nr=254,id=pci.1,bus=pcie.0,addr=0x1 \
+-audiodev id=audio1,driver=none \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/pcie-expander-bus-aarch64.xml b/tests/qemuxml2argvdata/pcie-expander-bus-aarch64.xml
new file mode 100644 (file)
index 0000000..da27fc5
--- /dev/null
@@ -0,0 +1,15 @@
+<domain type='qemu'>
+  <name>pcie-expander-bus-test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <vcpu placement='static'>16</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-expander-bus'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index 67c056b8879e82748e715ca437b78e165c0aaddf..b552f5deed312464e880c00551595ab55ffb89ac 100644 (file)
@@ -2847,6 +2847,7 @@ mymain(void)
     DO_TEST_PARSE_ERROR("pcie-expander-bus-bad-bus",
                         QEMU_CAPS_DEVICE_IOH3420,
                         QEMU_CAPS_DEVICE_PXB_PCIE);
+    DO_TEST_CAPS_ARCH_LATEST("pcie-expander-bus-aarch64", "aarch64");
 
     DO_TEST_CAPS_VER("hostdev-scsi-lsi", "4.1.0");
     DO_TEST_CAPS_LATEST("hostdev-scsi-lsi");
diff --git a/tests/qemuxml2xmloutdata/pcie-expander-bus-aarch64.aarch64-latest.xml b/tests/qemuxml2xmloutdata/pcie-expander-bus-aarch64.aarch64-latest.xml
new file mode 100644 (file)
index 0000000..f68203f
--- /dev/null
@@ -0,0 +1,32 @@
+<domain type='qemu'>
+  <name>pcie-expander-bus-test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>16</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <gic version='2'/>
+  </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-expander-bus'>
+      <model name='pxb-pcie'/>
+      <target busNr='254'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index 983489af6ce77d818b4fb4692f79425f7e1b5722..9652d2a7ce8eb2859e135abf18aa6ac59d64fdf1 100644 (file)
@@ -989,6 +989,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_X3130_UPSTREAM,
             QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
             QEMU_CAPS_DEVICE_PXB_PCIE);
+    DO_TEST_CAPS_ARCH_LATEST("pcie-expander-bus-aarch64", "aarch64");
     DO_TEST("autoindex",
             QEMU_CAPS_DEVICE_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,