summary refs log tree commit diff stats
path: root/tests/functional/test_virtio_gpu.py
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2025-07-15 15:30:18 +0100
committerThomas Huth <thuth@redhat.com>2025-07-21 07:58:57 +0200
commit72bc0134b500d599f0f1c253c78c68df642d1634 (patch)
tree04b487532e93417befeec37442026cc86a5fb85d /tests/functional/test_virtio_gpu.py
parent069a2ce8a75c9b59a4d08d6d2da3b36bfc5af3f4 (diff)
downloadfocaccia-qemu-72bc0134b500d599f0f1c253c78c68df642d1634.tar.gz
focaccia-qemu-72bc0134b500d599f0f1c253c78c68df642d1634.zip
functional: ensure sockets and files are closed
The multiprocess and virtio_gpu tests open sockets but then forget
to close them, which triggers resource leak warnings

The virtio_gpu test also fails to close a log file it opens.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250715143023.1851000-10-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/functional/test_virtio_gpu.py')
-rwxr-xr-xtests/functional/test_virtio_gpu.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/functional/test_virtio_gpu.py b/tests/functional/test_virtio_gpu.py
index 81c9156d63..be96de24da 100755
--- a/tests/functional/test_virtio_gpu.py
+++ b/tests/functional/test_virtio_gpu.py
@@ -108,6 +108,7 @@ class VirtioGPUx86(QemuSystemTest):
             shell=False,
             close_fds=False,
         )
+        self._vug_log_file.close()
 
         self.vm.set_console()
         self.vm.add_args("-cpu", "host")
@@ -135,6 +136,7 @@ class VirtioGPUx86(QemuSystemTest):
                                           "features: +virgl +edid")
         self.vm.shutdown()
         qemu_sock.close()
+        vug_sock.close()
         vugp.terminate()
         vugp.wait()