qemuhotplugtest: Enable 'lsilogic' SCSI controller

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>
This commit is contained in:
Peter Krempa 2023-03-09 17:12:54 +01:00
parent a58d22250c
commit c84e9a3b82
4 changed files with 13 additions and 12 deletions

View 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);

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

View File

@ -26,19 +26,19 @@
<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>

View 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'/>
@ -36,19 +36,19 @@
<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>