[PATCH 12/14] iotests/147: ensure temporary sockets are closed before exiting

Daniel P. Berrangé posted 14 patches 4 months ago
Maintainers: John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Daniel P. Berrangé" <berrange@redhat.com>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Jagannathan Raman <jag.raman@oracle.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
[PATCH 12/14] iotests/147: ensure temporary sockets are closed before exiting
Posted by Daniel P. Berrangé 4 months ago
This avoids the python resource leak detector from issuing warnings
in the iotests.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/qemu-iotests/147 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147
index 6d6f077a14..3e14bd389a 100755
--- a/tests/qemu-iotests/147
+++ b/tests/qemu-iotests/147
@@ -277,6 +277,7 @@ class BuiltinNBD(NBDBlockdevAddBase):
                      } }
         self.client_test(filename, flatten_sock_addr(address), 'nbd-export')
 
+        sockfd.close()
         self._server_down()
 
 
-- 
2.49.0


Re: [PATCH 12/14] iotests/147: ensure temporary sockets are closed before exiting
Posted by John Snow 2 months, 3 weeks ago
On Tue, Jul 15, 2025 at 10:32 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> This avoids the python resource leak detector from issuing warnings
> in the iotests.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: John Snow <jsnow@redhat.com>

> ---
>  tests/qemu-iotests/147 | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147
> index 6d6f077a14..3e14bd389a 100755
> --- a/tests/qemu-iotests/147
> +++ b/tests/qemu-iotests/147
> @@ -277,6 +277,7 @@ class BuiltinNBD(NBDBlockdevAddBase):
>                       } }
>          self.client_test(filename, flatten_sock_addr(address), 'nbd-export')
>
> +        sockfd.close()
>          self._server_down()
>
>
> --
> 2.49.0
>