tests: Add devices to pseries-phb-simple

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@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Andrea Bolognani 2024-01-16 17:08:49 +01:00
parent 0e3fde136c
commit 9de7fded51
3 changed files with 24 additions and 6 deletions

View File

@ -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

View File

@ -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>

View File

@ -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'/>