diff mbox series

[v3,1/2] qemu-iotest/245: Add missing discard=unmap

Message ID 20240628202058.1964986-2-nsoffer@redhat.com (mailing list archive)
State New, archived
Headers show
Series Consider discard option when writing zeros | expand

Commit Message

Nir Soffer June 28, 2024, 8:20 p.m. UTC
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.
---
 tests/qemu-iotests/245 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Hajnoczi July 11, 2024, 9:03 a.m. UTC | #1
On Fri, Jun 28, 2024 at 11:20:57PM +0300, Nir Soffer wrote:
> 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.
> ---
>  tests/qemu-iotests/245 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox series

Patch

diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245
index a934c9d1e6..f96610f510 100755
--- a/tests/qemu-iotests/245
+++ b/tests/qemu-iotests/245
@@ -590,11 +590,11 @@  class TestBlockdevReopen(iotests.QMPTestCase):
 
     # Insert (and remove) a compress filter
     @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
         filter_opts = {'driver': 'compress',
                        'node-name': 'compress0',