[PATCH v2 21/29] tests: add pnv-phb3-root-port test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
 .../powernv8-root-port.ppc64-latest.args      | 35 +++++++++++++++++
 tests/qemuxml2argvdata/powernv8-root-port.xml | 17 ++++++++
 tests/qemuxml2argvtest.c                      |  1 +
 .../powernv8-root-port.ppc64-latest.xml       | 39 +++++++++++++++++++
 tests/qemuxml2xmltest.c                       |  1 +
 5 files changed, 93 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/powernv8-root-port.ppc64-latest.args
 create mode 100644 tests/qemuxml2argvdata/powernv8-root-port.xml
 create mode 100644 tests/qemuxml2xmloutdata/powernv8-root-port.ppc64-latest.xml

diff --git a/tests/qemuxml2argvdata/powernv8-root-port.ppc64-latest.args b/tests/qemuxml2argvdata/powernv8-root-port.ppc64-latest.args
new file mode 100644
index 0000000000..b32e49c54e
--- /dev/null
+++ b/tests/qemuxml2argvdata/powernv8-root-port.ppc64-latest.args
@@ -0,0 +1,35 @@
+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 \
+/usr/bin/qemu-system-ppc64 \
+-name guest=QEMUGuest1,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine powernv8,usb=off,dump-guest-core=off,memory-backend=pnv.ram \
+-accel tcg \
+-cpu POWER8 \
+-m 2048 \
+-object '{"qom-type":"memory-backend-ram","id":"pnv.ram","size":2147483648}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid b20fcfe3-4a0a-4039-8735-9e024256e0f7 \
+-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 \
+-boot strict=on \
+-device '{"driver":"pnv-phb3","index":0,"chip-id":0,"id":"pcie.0"}' \
+-device '{"driver":"pnv-phb3-root-port","port":0,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x0"}' \
+-usb \
+-chardev pty,id=charserial0 \
+-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/powernv8-root-port.xml b/tests/qemuxml2argvdata/powernv8-root-port.xml
new file mode 100644
index 0000000000..1acb37222d
--- /dev/null
+++ b/tests/qemuxml2argvdata/powernv8-root-port.xml
@@ -0,0 +1,17 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>b20fcfe3-4a0a-4039-8735-9e024256e0f7</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='powernv8'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'/>
+    <console type='pty'>
+      <target type='serial' port='0'/>
+    </console>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index de5582a52c..70b57a239f 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2243,6 +2243,7 @@ mymain(void)
     DO_TEST_PARSE_ERROR_NOCAPS("seclabel-device-duplicates");
 
     DO_TEST_CAPS_ARCH_LATEST("powernv8-basic", "ppc64");
+    DO_TEST_CAPS_ARCH_LATEST("powernv8-root-port", "ppc64");
 
     DO_TEST("pseries-basic",
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
diff --git a/tests/qemuxml2xmloutdata/powernv8-root-port.ppc64-latest.xml b/tests/qemuxml2xmloutdata/powernv8-root-port.ppc64-latest.xml
new file mode 100644
index 0000000000..a24154c47f
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/powernv8-root-port.ppc64-latest.xml
@@ -0,0 +1,39 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>b20fcfe3-4a0a-4039-8735-9e024256e0f7</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='powernv8'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>POWER8</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-ppc64</emulator>
+    <controller type='pci' index='0' model='pcie-root'>
+      <model name='pnv-phb3'/>
+      <target index='0' chip-id='0'/>
+    </controller>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pnv-phb3-root-port'/>
+      <target chassis='1' port='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x00' function='0x0'/>
+    </controller>
+    <serial type='pty'>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
+    </serial>
+    <console type='pty'>
+      <target type='serial' port='0'/>
+    </console>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 1815d9ac1d..596907a25e 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -663,6 +663,7 @@ mymain(void)
     DO_TEST_CAPS_LATEST("virtio-rng-builtin");
 
     DO_TEST_CAPS_ARCH_LATEST("powernv8-basic", "ppc64");
+    DO_TEST_CAPS_ARCH_LATEST("powernv8-root-port", "ppc64");
 
     DO_TEST("pseries-nvram",
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux