qemu-iotest/245: Add missing discard=unmap
authorNir Soffer <nsoffer@redhat.com>
Fri, 28 Jun 2024 20:20:57 +0000 (23:20 +0300)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 11 Jul 2024 09:06:36 +0000 (11:06 +0200)
The test works since we punch holes by default even when opening the
image without discard=on or discard=unmap. Fix the test to enable
discard.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/qemu-iotests/245

index a934c9d1e631387086d162613fa694e000577837..f96610f510952c9848aac053230d11f6dacbdf67 100755 (executable)
@@ -592,7 +592,7 @@ class TestBlockdevReopen(iotests.QMPTestCase):
     @iotests.skip_if_unsupported(['compress'])
     def test_insert_compress_filter(self):
         # Add an image to the VM: hd (raw) -> hd0 (qcow2) -> hd0-file (file)
-        opts = {'driver': 'raw', 'node-name': 'hd', 'file': hd_opts(0)}
+        opts = {'driver': 'raw', 'node-name': 'hd', 'file': hd_opts(0), 'discard': 'unmap'}
         self.vm.cmd('blockdev-add', conv_keys = False, **opts)
 
         # Add a 'compress' filter