]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: assume -drive cache always uses v2 option names
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 6 Nov 2015 17:26:08 +0000 (17:26 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 10 Nov 2015 10:38:17 +0000 (10:38 +0000)
As of QEMU 0.10.0, the -drive cache option stopped using
the on/off value names, so the QEMU driver can assume
use of the new value names.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
38 files changed:
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_command.c
tests/qemuargv2xmltest.c
tests/qemucapabilitiesdata/caps_1.2.2-1.caps
tests/qemucapabilitiesdata/caps_1.3.1-1.caps
tests/qemucapabilitiesdata/caps_1.4.2-1.caps
tests/qemucapabilitiesdata/caps_1.5.3-1.caps
tests/qemucapabilitiesdata/caps_1.6.0-1.caps
tests/qemucapabilitiesdata/caps_1.6.50-1.caps
tests/qemucapabilitiesdata/caps_2.1.1-1.caps
tests/qemucaps2xmldata/all_1.6.0-1.caps
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
tests/qemuhelptest.c
tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-max.args
tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.args
tests/qemuxml2argvdata/qemuxml2argv-controller-order.args
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.args [deleted file]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml [deleted file]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.args [deleted file]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml [deleted file]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.args [deleted file]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml [deleted file]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.args
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.args
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.args
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.args
tests/qemuxml2argvdata/qemuxml2argv-video-device-pciaddr-default.args
tests/qemuxml2argvdata/qemuxml2argv-video-qxl-device-vgamem.args
tests/qemuxml2argvdata/qemuxml2argv-video-qxl-device.args
tests/qemuxml2argvdata/qemuxml2argv-video-qxl-nodevice.args
tests/qemuxml2argvdata/qemuxml2argv-video-qxl-sec-device-vgamem.args
tests/qemuxml2argvdata/qemuxml2argv-video-qxl-sec-device.args
tests/qemuxml2argvdata/qemuxml2argv-video-vga-device-vgamem.args
tests/qemuxml2argvdata/qemuxml2argv-video-vga-device.args
tests/qemuxml2argvdata/qemuxml2argv-video-vga-nodevice.args
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c

index 9351ca1ac9c88dc3c22a25192822ba25cb990690..f2bbd52efcf554b2d55728f612cbe4b8d5dcdcaf 100644 (file)
@@ -1097,8 +1097,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
 
     cache = strstr(help, "cache=");
     if (cache && (p = strchr(cache, ']'))) {
-        if (memmem(cache, p - cache, "on|off", sizeof("on|off") - 1) == NULL)
-            virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_V2);
         if (memmem(cache, p - cache, "directsync", sizeof("directsync") - 1))
             virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_DIRECTSYNC);
         if (memmem(cache, p - cache, "unsafe", sizeof("unsafe") - 1))
@@ -3172,7 +3170,6 @@ static qemuMonitorCallbacks callbacks = {
 static void
 virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
 {
-    virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_V2);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_VGA);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_0_10);
index c3b5fd6a4099bf4720f7783e507eb8e494d693c4..b0ecc0e1960b78bd0ae5c5291135a5eda5626b39 100644 (file)
@@ -62,7 +62,7 @@ typedef enum {
     /* 10 */
     X_QEMU_CAPS_MIGRATE_QEMU_TCP, /* have qemu tcp migration */
     X_QEMU_CAPS_MIGRATE_QEMU_EXEC, /* have qemu exec migration */
-    QEMU_CAPS_DRIVE_CACHE_V2, /* cache= flag wanting new v2 values */
+    X_QEMU_CAPS_DRIVE_CACHE_V2, /* cache= flag wanting new v2 values */
     QEMU_CAPS_KVM, /* Whether KVM is enabled by default */
     QEMU_CAPS_DRIVE_FORMAT, /* Is -drive format= avail */
 
index 2744a9fa1d861838aa35d9f0792fb15cb981ecd4..95e20d2ba7abadefc0f25c2cb66ca6f8263b45cc 100644 (file)
@@ -85,17 +85,8 @@ VIR_ENUM_IMPL(virDomainDiskQEMUBus, VIR_DOMAIN_DISK_BUS_LAST,
               "sd")
 
 
-VIR_ENUM_DECL(qemuDiskCacheV1)
 VIR_ENUM_DECL(qemuDiskCacheV2)
 
-VIR_ENUM_IMPL(qemuDiskCacheV1, VIR_DOMAIN_DISK_CACHE_LAST,
-              "default",
-              "off",
-              "off",  /* writethrough not supported, so for safety, disable */
-              "on",   /* Old 'on' was equivalent to 'writeback' */
-              "off",  /* directsync not supported, for safety, disable */
-              "off"); /* unsafe not supported, for safety, disable */
-
 VIR_ENUM_IMPL(qemuDiskCacheV2, VIR_DOMAIN_DISK_CACHE_LAST,
               "default",
               "none",
@@ -3903,24 +3894,20 @@ qemuBuildDriveStr(virConnectPtr conn,
     if (disk->cachemode) {
         const char *mode = NULL;
 
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_V2)) {
-            mode = qemuDiskCacheV2TypeToString(disk->cachemode);
+        mode = qemuDiskCacheV2TypeToString(disk->cachemode);
 
-            if (disk->cachemode == VIR_DOMAIN_DISK_CACHE_DIRECTSYNC &&
-                !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_DIRECTSYNC)) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("disk cache mode 'directsync' is not "
-                                 "supported by this QEMU"));
-                goto error;
-            } else if (disk->cachemode == VIR_DOMAIN_DISK_CACHE_UNSAFE &&
-                !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_UNSAFE)) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("disk cache mode 'unsafe' is not "
-                                 "supported by this QEMU"));
-                goto error;
-            }
-        } else {
-            mode = qemuDiskCacheV1TypeToString(disk->cachemode);
+        if (disk->cachemode == VIR_DOMAIN_DISK_CACHE_DIRECTSYNC &&
+            !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_DIRECTSYNC)) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("disk cache mode 'directsync' is not "
+                             "supported by this QEMU"));
+            goto error;
+        } else if (disk->cachemode == VIR_DOMAIN_DISK_CACHE_UNSAFE &&
+                   !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_UNSAFE)) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("disk cache mode 'unsafe' is not "
+                             "supported by this QEMU"));
+            goto error;
         }
 
         if (disk->iomode == VIR_DOMAIN_DISK_IO_NATIVE &&
@@ -3935,7 +3922,7 @@ qemuBuildDriveStr(virConnectPtr conn,
 
         virBufferAsprintf(&opt, ",cache=%s", mode);
     } else if (disk->src->shared && !disk->src->readonly) {
-        virBufferAddLit(&opt, ",cache=off");
+        virBufferAddLit(&opt, ",cache=none");
     }
 
     if (disk->copy_on_read) {
index bd790915bfdb66c8bde02f77824a4e05f37fe6b7..34f3e5c111fede9ad018eb07ff51f454c2238e8e 100644 (file)
@@ -193,12 +193,6 @@ mymain(void)
     DO_TEST("disk-drive-boot-disk");
     DO_TEST("disk-drive-boot-cdrom");
     DO_TEST("disk-drive-fmt-qcow");
-    /* Can't roundtrip  shareable+cache mode option */
-    /*DO_TEST("disk-drive-shared");*/
-    /* Can't roundtrip v1 writethrough option */
-    /*DO_TEST("disk-drive-cache-v1-wt");*/
-    DO_TEST("disk-drive-cache-v1-wb");
-    DO_TEST("disk-drive-cache-v1-none");
     DO_TEST("disk-drive-error-policy-stop");
     DO_TEST("disk-drive-error-policy-enospace");
     DO_TEST("disk-drive-error-policy-wreport-rignore");
index e83b956e061f6e18ebb5b7035b2800595ce2eacd..87a2ca18eb09b87e4219b21795dff5349296d79c 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index 9dc91cd5b9e06f5e13b26d4347d597612f6c41d8..aa2200aa46f2086be2ecb106223184e77308d727 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index 63e1f47079def6935993c346a15ad90641c607db..9d503a08e6e9f820bfd9acc1cd35c9d5d14b3534 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index c7c363e54b6a95b5ca8c675a8be1b1684da610ae..bb5d0d61fdd8feb203639985e149ba8fba8fbd25 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index 694f6714457d4316ced831963ef66bc1896834cf..e8dcc8d6ec0718ccbfa4544d46385bce9001ea37 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index 69f4a1d69747894d3adcb550fe364fe6a6f7c5dc..7627aee8b8d84c2d9838a78657fe014dfb674000 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index c0baf7df765683acc7474e11ac5711930119d938..dce0870d8089126b9df00aea60a31856ea7b17fb 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index 62dc749ba216074b5093ba4f31690e76b2bb45b8..c699a651dcaa42a415dc107f08fb0ce988152322 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index fcd91a814a08e7717e6e55055791eb95b84ab515..2f89a72e1bf72ad4eef536bebcdb2fceac84a7cb 100644 (file)
@@ -1,5 +1,4 @@
   <qemuCaps>
-    <flag name='drive-cache-v2'/>
     <flag name='drive-format'/>
     <flag name='vga'/>
     <flag name='0.10'/>
index 0745b1dcac70179815178e618e9fd9ba931ca850..a458ff0633ac4fbd0fc878cd96717004ac46b5a3 100644 (file)
@@ -152,7 +152,6 @@ mymain(void)
     DO_TEST_FULL(name, version, is_kvm, kvm_version, VIR_ERR_OK, __VA_ARGS__)
 
     DO_TEST("qemu-0.12.1", 12001, 0, 0,
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_FORMAT,
             QEMU_CAPS_DRIVE_SERIAL,
             QEMU_CAPS_DRIVE_READONLY,
@@ -179,7 +178,6 @@ mymain(void)
             QEMU_CAPS_VNC);
     DO_TEST("qemu-kvm-0.12.1.2-rhel60", 12001, 1, 0,
             QEMU_CAPS_DRIVE_BOOT,
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_KVM,
             QEMU_CAPS_DRIVE_FORMAT,
             QEMU_CAPS_DRIVE_SERIAL,
@@ -232,7 +230,6 @@ mymain(void)
             QEMU_CAPS_DEVICE_VIRTIO_NET);
     DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0,
             QEMU_CAPS_DRIVE_BOOT,
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_KVM,
             QEMU_CAPS_DRIVE_FORMAT,
             QEMU_CAPS_DRIVE_SERIAL,
@@ -265,7 +262,6 @@ mymain(void)
             QEMU_CAPS_VNC);
     DO_TEST("qemu-kvm-0.13.0", 13000, 1, 0,
             QEMU_CAPS_DRIVE_BOOT,
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_CACHE_UNSAFE,
             QEMU_CAPS_KVM,
             QEMU_CAPS_DRIVE_FORMAT,
@@ -328,7 +324,6 @@ mymain(void)
             QEMU_CAPS_DEVICE_E1000,
             QEMU_CAPS_DEVICE_VIRTIO_NET);
     DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_CACHE_UNSAFE,
             QEMU_CAPS_KVM,
             QEMU_CAPS_DRIVE_FORMAT,
@@ -388,7 +383,6 @@ mymain(void)
             QEMU_CAPS_DEVICE_E1000,
             QEMU_CAPS_DEVICE_VIRTIO_NET);
     DO_TEST("qemu-kvm-0.12.1.2-rhel62-beta", 12001, 1, 0,
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_CACHE_UNSAFE,
             QEMU_CAPS_KVM,
             QEMU_CAPS_DRIVE_FORMAT,
@@ -456,7 +450,6 @@ mymain(void)
             QEMU_CAPS_DEVICE_E1000,
             QEMU_CAPS_DEVICE_VIRTIO_NET);
     DO_TEST("qemu-1.0", 1000000, 0, 0,
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_CACHE_UNSAFE,
             QEMU_CAPS_DRIVE_FORMAT,
             QEMU_CAPS_DRIVE_SERIAL,
@@ -539,7 +532,6 @@ mymain(void)
             QEMU_CAPS_DEVICE_E1000,
             QEMU_CAPS_DEVICE_VIRTIO_NET);
     DO_TEST("qemu-1.1.0", 1001000, 0, 0,
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_CACHE_UNSAFE,
             QEMU_CAPS_DRIVE_FORMAT,
             QEMU_CAPS_DRIVE_SERIAL,
index f8aa2fbe13d06b72bb41dd637f9fd50f219cb254..a7f75b6f817844cb4b4a2104a38af26fa0509cfd 100644 (file)
@@ -17,10 +17,10 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot c \
 -usb \
--drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0,cache=off,bps=5000,\
+-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0,cache=none,bps=5000,\
 iops=6000,bps_max=10000,iops_max=11000 \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
--drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-1,cache=off,\
+-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-1,cache=none,\
 bps_rd=5000,bps_wr=5500,iops_rd=3500,iops_wr=4000,bps_rd_max=6000,\
 bps_wr_max=6500,iops_rd_max=7000,iops_wr_max=7500,iops_size=2000 \
 -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
index a113b4c2317bcdc788aae1a7165110b8812afd32..81f7f1fcf04664cf627458019d69d61c7e1fb777 100644 (file)
@@ -17,10 +17,10 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot c \
 -usb \
--drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0,cache=off,bps=5000,\
+-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0,cache=none,bps=5000,\
 iops=6000 \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
--drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-1,cache=off,\
+-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-1,cache=none,\
 bps_rd=5000,bps_wr=5000,iops=7000 \
 -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
index 937f90bd3a5cddbe59ba449f8d8b09f9100c0286..142471ea37f154e2e298a947a7045f03ffc58acc 100644 (file)
@@ -19,7 +19,7 @@ QEMU_AUDIO_DRV=spice \
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 \
 -device usb-ccid,id=ccid0 \
--drive file=/tmp/fdr.img,if=none,id=drive-virtio-disk0,cache=off,aio=native \
+-drive file=/tmp/fdr.img,if=none,id=drive-virtio-disk0,cache=none,aio=native \
 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,\
 id=virtio-disk0 \
 -drive file=/tmp/Fedora-17-x86_64-Live-Desktop.iso,if=none,media=cdrom,\
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.args
deleted file mode 100644 (file)
index 274539e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu \
--name QEMUGuest1 \
--S \
--M pc \
--m 214 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--monitor unix:/tmp/test-monitor,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=off \
--drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0,format=raw \
--net none \
--serial none \
--parallel none
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
deleted file mode 100644 (file)
index 933feb4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='i686' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu</emulator>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='qcow2' cache='none'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <disk type='block' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest2'/>
-      <target dev='hdc' bus='ide'/>
-      <readonly/>
-      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
-    <controller type='pci' index='0' model='pci-root'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.args
deleted file mode 100644 (file)
index 5900509..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu \
--name QEMUGuest1 \
--S \
--M pc \
--m 214 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--monitor unix:/tmp/test-monitor,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=on \
--drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0,format=raw \
--net none \
--serial none \
--parallel none
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
deleted file mode 100644 (file)
index 4cc449d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='i686' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu</emulator>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='qcow2' cache='writeback'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <disk type='block' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest2'/>
-      <target dev='hdc' bus='ide'/>
-      <readonly/>
-      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
-    <controller type='pci' index='0' model='pci-root'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.args
deleted file mode 100644 (file)
index 274539e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu \
--name QEMUGuest1 \
--S \
--M pc \
--m 214 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--monitor unix:/tmp/test-monitor,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=off \
--drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0,format=raw \
--net none \
--serial none \
--parallel none
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
deleted file mode 100644 (file)
index 5e0896a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='i686' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu</emulator>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='qcow2' cache='writethrough'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <disk type='block' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest2'/>
-      <target dev='hdc' bus='ide'/>
-      <readonly/>
-      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
-    <controller type='pci' index='0' model='pci-root'/>
-    <memballoon model='virtio'/>
-  </devices>
-</domain>
index 7c5d02db0a4bd1bcce25dec5d3ddef181a43d1bd..c03acebec476da6773882eee5eaa5277fbede324 100644 (file)
@@ -16,7 +16,7 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot c \
 -usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=off,\
+-drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=none,\
 werror=enospc \
 -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0,format=raw \
 -net none \
index e240832a0a0dcaf3e8a4e3c679d3f4e12b6b6577..c5882f3ef4de0e2ffbe689af9bfdaea828228122 100644 (file)
@@ -16,7 +16,7 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot c \
 -usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=off,\
+-drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=none,\
 werror=stop,rerror=stop \
 -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0,format=raw \
 -net none \
index 85cebc78bc64325a6004d51aa5906bff7dd2fac3..21bdd4a3b36efd1d6a9ae4cd30c9adf53f36f050 100644 (file)
@@ -16,7 +16,7 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot c \
 -usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=off,\
+-drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=none,\
 werror=report,rerror=ignore \
 -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0,format=raw \
 -net none \
index fd2941f4d2e77b74ffa6816e5c6ccf7303d8a1ef..b9187d18ddc19962cb8725e2421d2c939e09246e 100644 (file)
@@ -17,7 +17,7 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,\
-serial=XYZXYZXYZYXXYZYZYXYZY,cache=off \
+serial=XYZXYZXYZYXXYZYZYXYZY,cache=none \
 -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0,format=raw \
 -net none \
 -serial none \
index 86c1c8ca35ab8ed5b4d986382e834fbab6703b68..06f94073d2dc133fc0742443fd8d9a1a2eb2d7e4 100644 (file)
@@ -17,7 +17,7 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=/var/lib/libvirt/images/QEMUGuest1,if=none,id=drive-ide0-0-0,\
-cache=off \
+cache=none \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -vnc 127.0.0.1:-5900 \
 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,\
index a827f7ef6e70f6cd89bf05b711d37a28c78f5f1e..164f3203bace1df6daff13a54761a2cce541d96c 100644 (file)
@@ -18,7 +18,7 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=/var/lib/libvirt/images/QEMUGuest1,if=none,id=drive-ide0-0-0,\
-cache=off \
+cache=none \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,\
 bus=pci.0,addr=0x2 \
index 1a98828ab9c8446a65117c0a27765de660a61ca7..12ef653f8f093cfb369fa7d23762bf7615d3aea3 100644 (file)
@@ -18,7 +18,7 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=/var/lib/libvirt/images/QEMUGuest1,if=none,id=drive-ide0-0-0,\
-cache=off \
+cache=none \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,\
 addr=0x2 \
index ec177713990409d207e31d5da227efcbfe51058e..f9da7e0ce30c0c8b4dbc8987c9af14867b731b90 100644 (file)
@@ -16,7 +16,7 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot c \
 -usb \
--drive file=/var/lib/libvirt/images/QEMUGuest1,if=ide,bus=0,unit=0,cache=off \
+-drive file=/var/lib/libvirt/images/QEMUGuest1,if=ide,bus=0,unit=0,cache=none \
 -net none \
 -serial none \
 -parallel none \
index 78edb9889cc6be29ab6989f9a8ba0e29e37478ff..ac9a798dc20d7c4d8ca31edbc2114d141ea82679 100644 (file)
@@ -18,7 +18,7 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=/var/lib/libvirt/images/QEMUGuest1,if=none,id=drive-ide0-0-0,\
-cache=off \
+cache=none \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,\
 bus=pci.0,addr=0x2 \
index fb8589b05ea3487c32c23e2eeac73d4b3aa2fd0b..d4c386e0a1a44606351389496a5e076c778c34e8 100644 (file)
@@ -18,7 +18,7 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=/var/lib/libvirt/images/QEMUGuest1,if=none,id=drive-ide0-0-0,\
-cache=off \
+cache=none \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,\
 addr=0x2 \
index 0a7e07bc1277fac76ccf66ca96f1fe5149f8e673..7824a510d3ce53e9f29e2d91069a481247eda986 100644 (file)
@@ -18,7 +18,7 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=/var/lib/libvirt/images/QEMUGuest1,if=none,id=drive-ide0-0-0,\
-cache=off \
+cache=none \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x2 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
index 8dbaf4aee17bdb2816545218aff539bad09cc87b..c803e0bb83503f445253127896c28d3ff5d7b659 100644 (file)
@@ -18,7 +18,7 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=/var/lib/libvirt/images/QEMUGuest1,if=none,id=drive-ide0-0-0,\
-cache=off \
+cache=none \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -device VGA,id=video0,bus=pci.0,addr=0x2 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
index 33796ad88d67f83763a4c88e2c334698cc2386c2..db2f87e1a62c983cf553a7df27811646221ae6ed 100644 (file)
@@ -16,7 +16,7 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot c \
 -usb \
--drive file=/var/lib/libvirt/images/QEMUGuest1,if=ide,bus=0,unit=0,cache=off \
+-drive file=/var/lib/libvirt/images/QEMUGuest1,if=ide,bus=0,unit=0,cache=none \
 -net none \
 -serial none \
 -parallel none \
index 41e056a38a535bdf05a70f22799e2a716c74aa80..4fc50c24f77399ee60ccd0f64fd880e24671b135 100644 (file)
@@ -766,12 +766,6 @@ mymain(void)
             QEMU_CAPS_DRIVE_BOOT, QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-shared",
             QEMU_CAPS_DRIVE_FORMAT, QEMU_CAPS_DRIVE_SERIAL);
-    DO_TEST("disk-drive-cache-v1-wt",
-            QEMU_CAPS_DRIVE_FORMAT);
-    DO_TEST("disk-drive-cache-v1-wb",
-            QEMU_CAPS_DRIVE_FORMAT);
-    DO_TEST("disk-drive-cache-v1-none",
-            QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-error-policy-stop",
             QEMU_CAPS_MONITOR_JSON, QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-error-policy-enospace",
@@ -779,19 +773,16 @@ mymain(void)
     DO_TEST("disk-drive-error-policy-wreport-rignore",
             QEMU_CAPS_MONITOR_JSON, QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-cache-v2-wt",
-            QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT);
+            QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-cache-v2-wb",
-            QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT);
+            QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-cache-v2-none",
-            QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT);
+            QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-cache-directsync",
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_CACHE_DIRECTSYNC, QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-cache-unsafe",
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_CACHE_UNSAFE, QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-copy-on-read",
-            QEMU_CAPS_DRIVE_CACHE_V2,
             QEMU_CAPS_DRIVE_COPY_ON_READ, QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-drive-network-nbd",
             QEMU_CAPS_DRIVE_FORMAT);
@@ -883,7 +874,7 @@ mymain(void)
             QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_ICH9_AHCI);
     DO_TEST("disk-aio",
             QEMU_CAPS_DRIVE_AIO,
-            QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT);
+            QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST("disk-source-pool",
             QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
     DO_TEST("disk-source-pool-mode",
@@ -900,7 +891,7 @@ mymain(void)
             QEMU_CAPS_DRIVE_DISCARD,
             QEMU_CAPS_DEVICE);
     DO_TEST("disk-snapshot",
-            QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT);
+            QEMU_CAPS_DRIVE_FORMAT);
     DO_TEST_FAILURE("disk-same-targets",
                     QEMU_CAPS_DEVICE, QEMU_CAPS_SCSI_LSI,
                     QEMU_CAPS_DEVICE_USB_STORAGE, QEMU_CAPS_NODEFCONFIG);
index 4307df667a0b2dbe7a2f689559a876bafd3017df..103fb79ae800d32f5d7a95dcdc093f15106b0d02 100644 (file)
@@ -398,9 +398,6 @@ mymain(void)
     DO_TEST("floppy-drive-fat");
     DO_TEST("disk-drive-fat");
     DO_TEST("disk-drive-fmt-qcow");
-    DO_TEST("disk-drive-cache-v1-wt");
-    DO_TEST("disk-drive-cache-v1-wb");
-    DO_TEST("disk-drive-cache-v1-none");
     DO_TEST("disk-drive-copy-on-read");
     DO_TEST("disk-drive-network-nbd");
     DO_TEST("disk-drive-network-nbd-export");