]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuxml2argvtest: hostdev-scsi-lsi: Add test of readonly variant
authorPeter Krempa <pkrempa@redhat.com>
Wed, 17 Jun 2020 13:15:17 +0000 (15:15 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 23 Jun 2020 11:57:13 +0000 (13:57 +0200)
"hostdev-scsi-readonly" case tests the readonly disk with a virtio-scsi
controller. Add it for the 'lsi' controller test as well.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args
tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args
tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args
tests/qemuxml2argvdata/hostdev-scsi-lsi.xml
tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml

index 60467c445583c5de3d7843c3e3334b2a4e8cf01c..1808e2a303b1a1138756c0f940c60a812aabea34 100644 (file)
@@ -33,5 +33,7 @@ server,nowait \
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
 -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \
 -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \
+-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \
+-device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
 -msg timestamp=on
index 54fbf3a84725173ea1bb85e46d4c1484f64124c9..66764f87a1ba63ceebc606dfa58037355917c2f0 100644 (file)
@@ -32,6 +32,8 @@ file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
 -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \
 -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \
+-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \
+-device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
 resourcecontrol=deny \
index 23223d4cff14996900ab59317463fa657c363cb6..4d42bf2cbf376ec178a30008ba6954057d629659 100644 (file)
@@ -36,6 +36,8 @@ file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
 -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \
 -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \
+-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \
+-device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
 resourcecontrol=deny \
index 34c41e3fe61d63a97d5cc17dbf5337fb3c2dfc77..cc0960e2216227d0986a585aa31bc8863598d50a 100644 (file)
       </source>
       <address type='drive' controller='0' bus='0' target='0' unit='7'/>
     </hostdev>
+    <hostdev mode='subsystem' type='scsi' managed='yes'>
+      <source>
+        <adapter name='scsi_host0'/>
+        <address bus='0' target='0' unit='1'/>
+      </source>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='0' unit='6'/>
+    </hostdev>
     <memballoon model='virtio'/>
   </devices>
 </domain>
index 6fb6979399c585cfc98707c6f65d178a30379e53..10811844255935b91492c94b1881f29e9f77a1cc 100644 (file)
       </source>
       <address type='drive' controller='0' bus='0' target='0' unit='7'/>
     </hostdev>
+    <hostdev mode='subsystem' type='scsi' managed='yes'>
+      <source>
+        <adapter name='scsi_host0'/>
+        <address bus='0' target='0' unit='1'/>
+      </source>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='0' unit='6'/>
+    </hostdev>
     <memballoon model='virtio'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </memballoon>