[PATCH 24/33] 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>
---
 .../qemuxml2argvdata/powernv8-root-port.args  | 33 +++++++++++++++++
 tests/qemuxml2argvdata/powernv8-root-port.xml | 17 +++++++++
 tests/qemuxml2argvtest.c                      |  4 +++
 .../qemuxml2xmloutdata/powernv8-root-port.xml | 36 +++++++++++++++++++
 tests/qemuxml2xmltest.c                       |  4 +++
 5 files changed, 94 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/powernv8-root-port.args
 create mode 100644 tests/qemuxml2argvdata/powernv8-root-port.xml
 create mode 100644 tests/qemuxml2xmloutdata/powernv8-root-port.xml

diff --git a/tests/qemuxml2argvdata/powernv8-root-port.args b/tests/qemuxml2argvdata/powernv8-root-port.args
new file mode 100644
index 0000000000..c78aa0e8f4
--- /dev/null
+++ b/tests/qemuxml2argvdata/powernv8-root-port.args
@@ -0,0 +1,33 @@
+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 guest=QEMUGuest1,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
+-machine powernv8,usb=off,dump-guest-core=off \
+-accel tcg \
+-m 2048 \
+-realtime mlock=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,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device pnv-phb3,index=0,chip-id=0,id=pcie.0 \
+-device pnv-phb3-root-port,port=0,chassis=1,id=pci.1,bus=pcie.0,addr=0x0 \
+-usb \
+-chardev pty,id=charserial0 \
+-device isa-serial,chardev=charserial0,id=serial0,index=0 \
+-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 fea6048731..a0bc5ed169 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2220,6 +2220,10 @@ mymain(void)
     DO_TEST("powernv8-basic",
             QEMU_CAPS_DEVICE_ISA_SERIAL,
             QEMU_CAPS_DEVICE_PNV_PHB3);
+    DO_TEST("powernv8-root-port",
+            QEMU_CAPS_DEVICE_ISA_SERIAL,
+            QEMU_CAPS_DEVICE_PNV_PHB3,
+            QEMU_CAPS_DEVICE_PNV_PHB3_ROOT_PORT);
 
     DO_TEST("pseries-basic",
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
diff --git a/tests/qemuxml2xmloutdata/powernv8-root-port.xml b/tests/qemuxml2xmloutdata/powernv8-root-port.xml
new file mode 100644
index 0000000000..b6d2f6eaf5
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/powernv8-root-port.xml
@@ -0,0 +1,36 @@
+<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>
+  <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 586da92778..322a1b47cc 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -640,6 +640,10 @@ mymain(void)
     DO_TEST("powernv8-basic",
             QEMU_CAPS_DEVICE_ISA_SERIAL,
             QEMU_CAPS_DEVICE_PNV_PHB3);
+    DO_TEST("powernv8-root-port",
+            QEMU_CAPS_DEVICE_ISA_SERIAL,
+            QEMU_CAPS_DEVICE_PNV_PHB3,
+            QEMU_CAPS_DEVICE_PNV_PHB3_ROOT_PORT);
 
     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