aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/087
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2020-02-24 18:16:31 +0100
committerMax Reitz <mreitz@redhat.com>2020-03-24 11:57:38 +0100
commit801ddbda7183e1e043015fd357ea5eb97d925fd2 (patch)
tree26766125dfcab399c84f4ea343c0ae150315af69 /tests/qemu-iotests/087
parent808cf3cb6af8171b4e24d24f2a2d461434dc6572 (diff)
iotests: Fix cleanup path in some tests
Some iotests leave behind some external data file when run for qcow2 with -o data_file. Fix that. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200224171631.384314-1-mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/087')
-rwxr-xr-xtests/qemu-iotests/0876
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087
index d6c8613419..bdfdad3454 100755
--- a/tests/qemu-iotests/087
+++ b/tests/qemu-iotests/087
@@ -26,6 +26,12 @@ echo "QA output created by $seq"
status=1 # failure is the default!
+_cleanup()
+{
+ _cleanup_test_img
+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
# get standard environment, filters and checks
. ./common.rc
. ./common.filter