]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Add devices to pseries-phb-simple
authorAndrea Bolognani <abologna@redhat.com>
Tue, 16 Jan 2024 16:08:49 +0000 (17:08 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 17 Jan 2024 18:13:18 +0000 (19:13 +0100)
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>
tests/qemuxml2argvdata/pseries-phb-simple.ppc64-latest.args
tests/qemuxml2argvdata/pseries-phb-simple.xml
tests/qemuxml2xmloutdata/pseries-phb-simple.ppc64-latest.xml

index c2c28bd19894cabe7bc2bf30e63d377b9f077e10..b6c0ecae8e0534af7573efeda6db9b27a69e7135 100644 (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
index b1c6ff3006f2b4b886f5a0d58955118b039157e4..ae9e78b95b276d68d614e91bdc73608ddf02c204 100644 (file)
     <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>
index 80231e3dd7f7108e2a079ca58554ac12f45a62a7..936db5df2bf9a889ffed8688b9a1115820c5ee6b 100644 (file)
       <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'/>