[PATCH v1 7/8] tests/qemuxml2argvtest.c: add TPM Proxy command line test

Daniel Henrique Barboza danielhb413 at gmail.com
Fri May 8 12:06:56 UTC 2020


Add a new test to assert the QEMU command line being built
for the TPM Proxy device.

Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
---
 tests/qemuxml2argvdata/ppc64-tpmproxy.args | 28 ++++++++++++++++++++++
 tests/qemuxml2argvtest.c                   |  4 ++++
 2 files changed, 32 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/ppc64-tpmproxy.args

diff --git a/tests/qemuxml2argvdata/ppc64-tpmproxy.args b/tests/qemuxml2argvdata/ppc64-tpmproxy.args
new file mode 100644
index 0000000000..a296a962ce
--- /dev/null
+++ b/tests/qemuxml2argvdata/ppc64-tpmproxy.args
@@ -0,0 +1,28 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-QEMUGuest1 \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-ppc64 \
+-name QEMUGuest1 \
+-S \
+-machine pseries,accel=tcg,usb=off,dump-guest-core=off \
+-m 256 \
+-realtime mlock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-device pci-ohci,id=usb,bus=pci.0,addr=0x1 \
+-device spapr-tpm-proxy,id=tpmproxy0,host-path=/dev/tpmrm0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 04febd1b0c..1a9b197907 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2967,6 +2967,10 @@ mymain(void)
                  QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
                  QEMU_CAPS_NEC_USB_XHCI,
                  QEMU_CAPS_DEVICE_QEMU_XHCI);
+    DO_TEST("ppc64-tpmproxy",
+            QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
+            QEMU_CAPS_PCI_OHCI,
+            QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY);
 
     DO_TEST("aarch64-usb-controller-qemu-xhci",
             QEMU_CAPS_OBJECT_GPEX,
-- 
2.26.2





More information about the libvir-list mailing list