From f91ecbd74eb75e9d4c7b4016edaf69d070cb3f9b Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Thu, 7 Nov 2019 17:37:01 +0100 Subject: iotests: Use _rm_test_img for deleting test images Just rm will not delete external data files. Use _rm_test_img every time we delete a test image. (In the process, clean up the indentation of every _cleanup() this patch touches.) ((Also, use quotes consistently. I am happy to see unquoted instances like "rm -rf $TEST_DIR/..." go.)) Signed-off-by: Max Reitz Reviewed-by: Maxim Levitsky Message-id: 20191107163708.833192-16-mreitz@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/099 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/qemu-iotests/099') diff --git a/tests/qemu-iotests/099 b/tests/qemu-iotests/099 index c3cf66798a..b383c11e6a 100755 --- a/tests/qemu-iotests/099 +++ b/tests/qemu-iotests/099 @@ -29,7 +29,10 @@ status=1 # failure is the default! _cleanup() { - _cleanup_test_img + _cleanup_test_img + _rm_test_img "$TEST_IMG.compare" + rm -f "$TEST_DIR/blkdebug.conf" + } trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -121,8 +124,6 @@ echo test_qemu "file.driver=blkdebug,file.image.filename=$TEST_IMG" -rm -f "$TEST_IMG.compare" "$TEST_DIR/blkdebug.conf" - # success, all done echo "*** done" rm -f $seq.full -- cgit v1.2.3