Skip to contentSkip to conversation

qemu-iotests: Fix cleanup for 192

PATCH In review Kevin Wolf 3 participants 3 messages May 8, 2019

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 qemu-iotests: Fix cleanup for 192

Test case 192 calls _launch_qemu, so it also needs to _cleanup_qemu when it's done, otherwise the QMP FIFOs stay around in scratch/. It also creates a temporary NBD socket that needs to be removed as well at the end of the test case.

---
 tests/qemu-iotests/192 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/qemu-iotests/192 +3 -1
index 158086f9d2..61a88ac88d 100755
@@ -29,7 +29,9 @@ status=1	# failure is the default!
 
 _cleanup()
 {
-	_cleanup_test_img
+    _cleanup_qemu
+    _cleanup_test_img
+    rm -f "$TEST_DIR/nbd"
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
Signature · 1 line
2.20.1
Tested-by on v1 1/1
#1 lore raw
Quoted 16 lines · Kevin Wolf

Test case 192 calls _launch_qemu, so it also needs to _cleanup_qemu when it's done, otherwise the QMP FIFOs stay around in scratch/. It also creates a temporary NBD socket that needs to be removed as well at the end of the test case.

---
 tests/qemu-iotests/192 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/qemu-iotests/192 +0 -0
index 158086f9d2..61a88ac88d 100755

tests/qemu-iotests/192 status=1 # failure is the default! · line 36

Quoted 9 lines
tests/qemu-iotests/192 +3 -1
@@ -29,7 +29,9 @@ status=1	# failure is the default!
 
 _cleanup()
 {
-	_cleanup_test_img
+    _cleanup_qemu
+    _cleanup_test_img
+    rm -f "$TEST_DIR/nbd"
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15

That fixes the issue, indeed! Thanks!

Reviewed-by on v1 1/1
#2 lore raw
In reply to Kevin Wolf
Quoted 10 lines · Kevin Wolf

Test case 192 calls _launch_qemu, so it also needs to _cleanup_qemu when it's done, otherwise the QMP FIFOs stay around in scratch/. It also creates a temporary NBD socket that needs to be removed as well at the end of the test case.

---
 tests/qemu-iotests/192 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Well...