render / rpms / libvirt

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