]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argv: Add test for disk type='volume' with iSCSI pools
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Nov 2013 10:04:50 +0000 (11:04 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 2 Dec 2013 09:32:09 +0000 (10:32 +0100)
Tweak the existing file so that it can be tested for command line
corectness.

tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.xml
tests/qemuxml2argvtest.c

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args
new file mode 100644 (file)
index 0000000..8f6a3dd
--- /dev/null
@@ -0,0 +1,10 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -drive \
+file=/some/block/device/unit:0:0:1,if=none,media=cdrom,id=drive-ide0-0-1 -device \
+ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive \
+file=iscsi://iscsi.example.com:3260/demo-target/2,if=none,media=cdrom,id=drive-ide0-0-2 \
+-device ide-drive,bus=ide.0,unit=2,drive=drive-ide0-0-2,id=ide0-0-2 -drive \
+file=/tmp/idedisk.img,if=none,id=drive-ide0-0-3 -device \
+ide-drive,bus=ide.0,unit=3,drive=drive-ide0-0-3,id=ide0-0-3 -device \
+virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
index b907633b96e6c03b52fe24e3c059410da19c3d1f..9f902936bb115f268d2933f56898e5ccccca5206 100644 (file)
@@ -15,7 +15,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <disk type='volume' device='cdrom'>
-      <source pool='blk-pool0' volume='blk-pool0-vol0' mode='host' startupPolicy='optional'>
+      <source pool='pool-iscsi-auth' volume='unit:0:0:1' mode='host'>
         <seclabel model='selinux' relabel='yes'>
           <label>system_u:system_r:public_content_t:s0</label>
         </seclabel>
@@ -25,7 +25,7 @@
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
     <disk type='volume' device='cdrom'>
-      <source pool='blk-pool0' volume='blk-pool0-vol1' mode='direct' startupPolicy='optional'>
+      <source pool='pool-iscsi' volume='unit:0:0:2' mode='direct'>
         <seclabel model='selinux' relabel='yes'>
           <label>system_u:system_r:public_content_t:s0</label>
         </seclabel>
index 9d89056af2d2861084c60d15b25f0658ba571586..17d4554f4c39415335049294cea36394179f0558 100644 (file)
@@ -793,6 +793,8 @@ mymain(void)
             QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-source-pool",
             QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
+    DO_TEST("disk-source-pool-mode",
+            QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
     DO_TEST("disk-ioeventfd",
             QEMU_CAPS_DRIVE, QEMU_CAPS_VIRTIO_IOEVENTFD,
             QEMU_CAPS_VIRTIO_TX_ALG, QEMU_CAPS_DEVICE,