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