[Qemu-devel] [PATCH] qemu-iotests: Fix cleanup for 192

Kevin Wolf posted 1 patch 5 years ago
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190508120435.29832-1-kwolf@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/192 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH] qemu-iotests: Fix cleanup for 192
Posted by Kevin Wolf 5 years ago
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.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/192 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/192 b/tests/qemu-iotests/192
index 158086f9d2..61a88ac88d 100755
--- a/tests/qemu-iotests/192
+++ b/tests/qemu-iotests/192
@@ -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
 
-- 
2.20.1


Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-iotests: Fix cleanup for 192
Posted by Max Reitz 5 years ago
On 08.05.19 14:04, Kevin Wolf wrote:
> 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.
> 
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/192 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Well...

Reviewed-by: Max Reitz <mreitz@redhat.com>

Re: [Qemu-devel] [PATCH] qemu-iotests: Fix cleanup for 192
Posted by Thomas Huth 5 years ago
On 08/05/2019 14.04, Kevin Wolf wrote:
> 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.
> 
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/192 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/192 b/tests/qemu-iotests/192
> index 158086f9d2..61a88ac88d 100755
> --- a/tests/qemu-iotests/192
> +++ b/tests/qemu-iotests/192
> @@ -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!

Tested-by: Thomas Huth <thuth@redhat.com>