We want to make sure that not only the controllers themselves
are added correctly, but also that devices attached to them
get assigned the expected bus value. In order to do that add
some devices, one per controller.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
.../pseries-phb-simple.ppc64-latest.args | 5 ++++-
tests/qemuxml2argvdata/pseries-phb-simple.xml | 11 ++++++++++-
.../pseries-phb-simple.ppc64-latest.xml | 14 ++++++++++----
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/tests/qemuxml2argvdata/pseries-phb-simple.ppc64-latest.args
b/tests/qemuxml2argvdata/pseries-phb-simple.ppc64-latest.args
index c2c28bd198..b6c0ecae8e 100644
--- a/tests/qemuxml2argvdata/pseries-phb-simple.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/pseries-phb-simple.ppc64-latest.args
@@ -27,7 +27,10 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-no-shutdown \
-boot strict=on \
-device
'{"driver":"spapr-pci-host-bridge","index":1,"id":"pci.1"}'
\
--device
'{"driver":"spapr-pci-host-bridge","index":2,"id":"pci.2"}'
\
+-netdev user,id=hostnet0 \
+-device
'{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:a2:44:92","bus":"pci.0","addr":"0x1"}'
\
+-netdev user,id=hostnet1 \
+-device
'{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"52:54:00:a2:44:93","bus":"pci.1.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/pseries-phb-simple.xml
b/tests/qemuxml2argvdata/pseries-phb-simple.xml
index b1c6ff3006..ae9e78b95b 100644
--- a/tests/qemuxml2argvdata/pseries-phb-simple.xml
+++ b/tests/qemuxml2argvdata/pseries-phb-simple.xml
@@ -10,7 +10,16 @@
<emulator>/usr/bin/qemu-system-ppc64</emulator>
<controller type='pci' model='pci-root'/>
<controller type='pci' model='pci-root'/>
- <controller type='pci' model='pci-root'/>
+ <interface type='user'>
+ <mac address='52:54:00:a2:44:92'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:a2:44:93'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x01'
slot='0x01' function='0x0'/>
+ </interface>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
diff --git a/tests/qemuxml2xmloutdata/pseries-phb-simple.ppc64-latest.xml
b/tests/qemuxml2xmloutdata/pseries-phb-simple.ppc64-latest.xml
index 80231e3dd7..936db5df2b 100644
--- a/tests/qemuxml2xmloutdata/pseries-phb-simple.ppc64-latest.xml
+++ b/tests/qemuxml2xmloutdata/pseries-phb-simple.ppc64-latest.xml
@@ -25,11 +25,17 @@
<model name='spapr-pci-host-bridge'/>
<target index='1'/>
</controller>
- <controller type='pci' index='2' model='pci-root'>
- <model name='spapr-pci-host-bridge'/>
- <target index='2'/>
- </controller>
<controller type='usb' index='0' model='none'/>
+ <interface type='user'>
+ <mac address='52:54:00:a2:44:92'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:a2:44:93'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x01'
slot='0x01' function='0x0'/>
+ </interface>
<audio id='1' type='none'/>
<memballoon model='none'/>
<panic model='pseries'/>
--
2.43.0