iotests/308: Use conv=notrunc to test growability
Without conv=notrunc, dd will automatically truncate the output file to the @seek value at least. We want to test post-EOF I/O, not truncate, so pass conv=notrunc. (It does not make a difference in practice because we only seek to the EOF, so the truncate effectively does nothing, but this is still cleaner.) Signed-off-by: Hanna Czenczek <hreitz@redhat.com> Message-ID: <20260309150856.26800-14-hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Hanna Czenczek committed
Mar 9, 2026 at 16:08 UTC
e7b88252f302ff2cee2c934122a5e137b18ab2d9
1 file changed
+3
-2
tests/qemu-iotests/308
+3
-2
@@ -296,7 +296,8 @@ orig_disk_usage=$(disk_usage "$TEST_IMG")
296
# Should fail (exports are non-growable by default)
297
# (Note that qemu-io can never write beyond the EOF, so we have to use
298
# dd here)
299
-dd if=/dev/zero of="$EXT_MP" bs=1 count=64k seek=$orig_len 2>&1 \
299
+dd if=/dev/zero of="$EXT_MP" bs=1 count=64k seek=$orig_len \
300
+ conv=notrunc 2>&1 \
301
| _filter_testdir | _filter_imgfmt
302
303
echo
@@ -333,7 +334,7 @@ fuse_export_add \
334
'node-protocol'
335
336
# Now we should be able to write beyond the EOF
336
-dd if=/dev/zero of="$EXT_MP" bs=1 count=64k seek=$new_len 2>&1 \
337
+dd if=/dev/zero of="$EXT_MP" bs=1 count=64k seek=$new_len conv=notrunc 2>&1 \
338
| _filter_testdir | _filter_imgfmt
339
340
new_len=$(get_proto_len "$EXT_MP" "$TEST_IMG")