From 310eeaa9bedbbe58a6cdbdbc2e057fc6d6c66586 Mon Sep 17 00:00:00 2001
Message-Id: <310eeaa9bedbbe58a6cdbdbc2e057fc6d6c66586@dist-git>
From: Michal Privoznik <mprivozn@redhat.com>
Date: Thu, 18 Apr 2019 19:36:32 +0200
Subject: [PATCH] qemuhotplugtest: Don't plug a SCSI disk at unit 7
RHEL-7.7: https://bugzilla.redhat.com/show_bug.cgi?id=1692296
RHEL-8.1.0: https://bugzilla.redhat.com/show_bug.cgi?id=1692354
Unit number 7 is kind of special. It's reserved for SCSI
controller. The comment in virDomainSCSIDriveAddressIsUsed()
summarizes that pretty nicely. Libvirt would never generate
such address.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
(cherry picked from commit ee2c5ef39fd91345893904433c6f458685543af5)
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <cd6f1b6289c9a00a4094540bb3656446b8d4cc1e.1555608962.git.mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
---
tests/qemuhotplugtest.c | 2 +-
tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml | 2 +-
...uhotplug-base-without-scsi-controller-live+disk-scsi-2.xml | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 663e33ed00..8e0086a269 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -761,7 +761,7 @@ mymain(void)
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", false, false,
- "device_del", QMP_DEVICE_DELETED("scsi3-0-5-7") QMP_OK,
+ "device_del", QMP_DEVICE_DELETED("scsi3-0-5-6") QMP_OK,
"human-monitor-command", HMP(""));
DO_TEST_ATTACH("base-live", "qemu-agent", false, true,
diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml b/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml
index 3a847fbda6..876afb182f 100644
--- a/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml
+++ b/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml
@@ -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='7'/>
+ <address type='drive' controller='3' bus='0' target='5' unit='6'/>
<readonly/>
<shareable/>
</disk>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
index d35fea6f5f..72b5174825 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml
@@ -26,8 +26,8 @@
<target dev='sdf' bus='scsi'/>
<readonly/>
<shareable/>
- <alias name='scsi3-0-5-7'/>
- <address type='drive' controller='3' bus='0' target='5' unit='7'/>
+ <alias name='scsi3-0-5-6'/>
+ <address type='drive' controller='3' bus='0' target='5' unit='6'/>
</disk>
<controller type='usb' index='0'>
<alias name='usb'/>
--
2.21.0