From 52970228a0ba4956ed98cb1ae370b16dd740c9e4 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Mon, 2 Jul 2018 15:40:08 +0200 Subject: [PATCH 55/57] qemu-iotests: Test qcow2 not leaking clusters on write error RH-Author: Kevin Wolf Message-id: <20180702154008.15533-4-kwolf@redhat.com> Patchwork-id: 81187 O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH 3/3] qemu-iotests: Test qcow2 not leaking clusters on write error Bugzilla: 1528541 RH-Acked-by: Max Reitz RH-Acked-by: Fam Zheng RH-Acked-by: Stefan Hajnoczi This adds a test for a temporary write failure, which simulates the situation after werror=stop/enospc has stopped the VM. We shouldn't leave leaked clusters behind in such cases. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz (cherry picked from commit ae376c6255d0eee4b3c4d60acc4679aa99c0d2c8) Signed-off-by: Kevin Wolf Signed-off-by: Miroslav Rezanina --- tests/qemu-iotests/026 | 17 +++++++++++++++++ tests/qemu-iotests/026.out | 8 ++++++++ tests/qemu-iotests/026.out.nocache | 8 ++++++++ 3 files changed, 33 insertions(+) diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026 index 7fadfba..582d254 100755 --- a/tests/qemu-iotests/026 +++ b/tests/qemu-iotests/026 @@ -200,6 +200,23 @@ done done done +echo +echo === Avoid cluster leaks after temporary failure === +echo + +cat > "$TEST_DIR/blkdebug.conf" <