From b1035096f2d46e2146704d1db9581c6d2131d1f4 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Mon, 13 Jul 2020 14:24:49 -0400 Subject: [PATCH 2/4] iotests/026: Test EIO on preallocated zero cluster RH-Author: Max Reitz Message-id: <20200713142451.289703-3-mreitz@redhat.com> Patchwork-id: 97953 O-Subject: [RHEL-8.3.0 qemu-kvm PATCH 2/4] iotests/026: Test EIO on preallocated zero cluster Bugzilla: 1807057 RH-Acked-by: Stefano Garzarella RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Kevin Wolf Test what happens when writing data to a preallocated zero cluster, but the data write fails. Signed-off-by: Max Reitz Message-Id: <20200225143130.111267-3-mreitz@redhat.com> Signed-off-by: Kevin Wolf (cherry picked from commit 31ab00f3747c00fdbb9027cea644b40dd1405480) Signed-off-by: Max Reitz Signed-off-by: Danilo C. L. de Paula --- tests/qemu-iotests/026 | 21 +++++++++++++++++++++ tests/qemu-iotests/026.out | 10 ++++++++++ tests/qemu-iotests/026.out.nocache | 10 ++++++++++ 3 files changed, 41 insertions(+) diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026 index 3430029ed6..d89729697f 100755 --- a/tests/qemu-iotests/026 +++ b/tests/qemu-iotests/026 @@ -215,6 +215,27 @@ _make_test_img 64M $QEMU_IO -c "write 0 1M" -c "write 0 1M" "$BLKDBG_TEST_IMG" | _filter_qemu_io _check_test_img +echo +echo === Avoid freeing preallocated zero clusters on failure === +echo + +cat > "$TEST_DIR/blkdebug.conf" <