On 02/14/2018 10:09 AM, Anton Nefedov wrote:
This new test case only makes sense for qcow2 while iotest 033 is generic;
however it matches the test purpose perfectly and also 033 contains those
do_test() tricks to pass the alignment, which won't look nice being
duplicated in other tests or moved to the common code.

Signed-off-by: Anton Nefedov <anton.nefe...@virtuozzo.com>
  tests/qemu-iotests/033     | 29 +++++++++++++++++++++++++++++
  tests/qemu-iotests/033.out | 13 +++++++++++++
  2 files changed, 42 insertions(+)

+# only interested in qcow2 here; also other formats might respond with
+#  "not supported" error message
+if [ $IMGFMT = "qcow2" ]; then
+    do_test 512 "truncate $L2_COVERAGE" "$TEST_IMG" | _filter_qemu_io

But without an else branch that echoes the same text as the if branch generates, your .out file is now broken for other image formats. Or does 'qemu-io -c truncate' not produce output?

/me goes and tests...

Okay, looks like truncate is silent; and that the truncation (or skipping of the truncation) doesn't affect things.

Tested-by: Eric Blake <ebl...@redhat.com>

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to