diff options
author | Max Reitz <mreitz@redhat.com> | 2019-11-07 17:37:01 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-01-06 13:43:07 +0100 |
commit | f91ecbd74eb75e9d4c7b4016edaf69d070cb3f9b (patch) | |
tree | 67c2a289d1ed38e9c8b94dbaee48496081f1d4af /tests/qemu-iotests/156 | |
parent | 52a97b5a42d485e89ce61c0310c3cd78fb998938 (diff) | |
download | qemu-f91ecbd74eb75e9d4c7b4016edaf69d070cb3f9b.zip qemu-f91ecbd74eb75e9d4c7b4016edaf69d070cb3f9b.tar.gz qemu-f91ecbd74eb75e9d4c7b4016edaf69d070cb3f9b.tar.bz2 |
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 <mreitz@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-id: 20191107163708.833192-16-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/156')
-rwxr-xr-x | tests/qemu-iotests/156 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/qemu-iotests/156 b/tests/qemu-iotests/156 index 2ffa3ca..3f27db7 100755 --- a/tests/qemu-iotests/156 +++ b/tests/qemu-iotests/156 @@ -37,7 +37,9 @@ status=1 # failure is the default! _cleanup() { _cleanup_qemu - rm -f "$TEST_IMG"{,.target}{,.backing,.overlay} + for img in "$TEST_IMG"{,.target}{,.backing,.overlay}; do + _rm_test_img "$img" + done } trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -120,7 +122,9 @@ _send_qemu_cmd $QEMU_HANDLE \ '"status": "null"' # Remove the source images -rm -f "$TEST_IMG{,.backing,.overlay}" +for img in "$TEST_IMG{,.backing,.overlay}"; do + _rm_test_img "$img" +done echo |