]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuhotplugtest: Enable 'lsilogic' SCSI controller
authorPeter Krempa <pkrempa@redhat.com>
Thu, 9 Mar 2023 16:12:54 +0000 (17:12 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:07 +0000 (09:19 +0200)
All real qemus support the 'lsilogic' controller and thus would pick it
as the default rather than virtio-scsi. Since lsilogic is limited in
some aspects we should test it with the proper default model.

In the future the fake capabilities will be replaced by real
capabilities so this test would break.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuhotplugtest.c
tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml

index 804e32279ddb4eaa08340c5bd49f7df413f356da..819d9215e7a67c14165268dd71c8091f5a80cc90 100644 (file)
@@ -70,6 +70,7 @@ qemuHotplugCreateObjects(virDomainXMLOption *xmlopt,
 
     priv->qemuCaps = virQEMUCapsNew();
 
+    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_LSI);
     virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI);
     virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE);
     virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_PLAIN);
@@ -790,7 +791,7 @@ mymain(void)
     DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", true, true,
                    "device_del", QMP_OK);
     DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", false, false,
-                   "device_del", QMP_DEVICE_DELETED("scsi3-0-5-6") QMP_OK,
+                   "device_del", QMP_DEVICE_DELETED("scsi3-0-6") QMP_OK,
                    "blockdev-del", QMP_OK,
                    "blockdev-del", QMP_OK);
 
index 876afb182f3073ac366dbd0f22e245df6f39a17d..97f8ab1418a230d83765b07e29ade6a8ad856024 100644 (file)
@@ -2,7 +2,7 @@
   <driver name='qemu' type='raw' cache='none'/>
   <source file='/dev/null'/>
   <target dev='sdf' bus='scsi'/>
-  <address type='drive' controller='3' bus='0' target='5' unit='6'/>
+  <address type='drive' controller='3' bus='0' target='0' unit='6'/>
   <readonly/>
   <shareable/>
 </disk>
index a61a68f561ed6bc6b7074d342ced6e6c263452c3..939cea4cbe954dc8d0ac6745bf83b609bf72ac28 100644 (file)
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
+    <controller type='scsi' index='0' model='lsilogic'>
       <alias name='scsi0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </controller>
-    <controller type='scsi' index='1' model='virtio-scsi'>
+    <controller type='scsi' index='1' model='lsilogic'>
       <alias name='scsi1'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
-    <controller type='scsi' index='2' model='virtio-scsi'>
+    <controller type='scsi' index='2' model='lsilogic'>
       <alias name='scsi2'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </controller>
-    <controller type='scsi' index='3' model='virtio-scsi'>
+    <controller type='scsi' index='3' model='lsilogic'>
       <alias name='scsi3'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </controller>
index 71dd10d40d31ba8a104aa8f7644562163c8a8187..97f651374d42d00ad623ced59120b173dae471c3 100644 (file)
@@ -26,8 +26,8 @@
       <target dev='sdf' bus='scsi'/>
       <readonly/>
       <shareable/>
-      <alias name='scsi3-0-5-6'/>
-      <address type='drive' controller='3' bus='0' target='5' unit='6'/>
+      <alias name='scsi3-0-6'/>
+      <address type='drive' controller='3' bus='0' target='0' unit='6'/>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb'/>
     <controller type='pci' index='0' model='pci-root'>
       <alias name='pci'/>
     </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
+    <controller type='scsi' index='0' model='lsilogic'>
       <alias name='scsi0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </controller>
-    <controller type='scsi' index='1' model='virtio-scsi'>
+    <controller type='scsi' index='1' model='lsilogic'>
       <alias name='scsi1'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
-    <controller type='scsi' index='2' model='virtio-scsi'>
+    <controller type='scsi' index='2' model='lsilogic'>
       <alias name='scsi2'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </controller>
-    <controller type='scsi' index='3' model='virtio-scsi'>
+    <controller type='scsi' index='3' model='lsilogic'>
       <alias name='scsi3'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </controller>