On 05/09/2018 10:49 AM, Max Reitz wrote:
Signed-off-by: Max Reitz <[email protected]>
---
  tests/qemu-iotests/024     | 82 ++++++++++++++++++++++++++++++++++++++++++++--
  tests/qemu-iotests/024.out | 30 +++++++++++++++++
  2 files changed, 109 insertions(+), 3 deletions(-)

diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024
index e0d77ce2f5..4071ed6093 100755
--- a/tests/qemu-iotests/024
+++ b/tests/qemu-iotests/024
@@ -29,9 +29,14 @@ status=1     # failure is the default!
_cleanup()
  {
-       _cleanup_test_img
-       rm -f "$TEST_DIR/t.$IMGFMT.base_old"
-       rm -f "$TEST_DIR/t.$IMGFMT.base_new"
+    _cleanup_test_img
+    rm -f "$TEST_DIR/t.$IMGFMT.base_old"
+    rm -f "$TEST_DIR/t.$IMGFMT.base_new"
+
+    rm -f "$TEST_DIR/subdir/t.$IMGFMT"
+    rm -f "$TEST_DIR/subdir/t.$IMGFMT.base_old"
+    rm -f "$TEST_DIR/subdir/t.$IMGFMT.base_new"
+    rmdir "$TEST_DIR/subdir" 2> /dev/null

Any easier to just 'rm -rf "$TEST_DIR/subdir"' instead of calling out individual files? And was Jeff ever going to finish the iotests cleanups that took care of cleanup globally by running tests in a per-test directory in preparation for running tests in parallel?

Reviewed-by: Eric Blake <[email protected]>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to