From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PULL 3/5] functional: ensure sockets and files are closed
Date: Mon, 21 Jul 2025 10:16:12 +0200 [thread overview]
Message-ID: <20250721081614.262563-4-thuth@redhat.com> (raw)
In-Reply-To: <20250721081614.262563-1-thuth@redhat.com>
From: Daniel P. Berrangé <berrange@redhat.com>
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>
---
tests/functional/test_multiprocess.py | 3 +++
tests/functional/test_virtio_gpu.py | 2 ++
2 files changed, 5 insertions(+)
diff --git a/tests/functional/test_multiprocess.py b/tests/functional/test_multiprocess.py
index 751cf10e635..92d5207b0eb 100755
--- a/tests/functional/test_multiprocess.py
+++ b/tests/functional/test_multiprocess.py
@@ -83,6 +83,9 @@ def do_test(self, kernel_asset, initrd_asset,
'cat /sys/bus/pci/devices/*/uevent',
'PCI_ID=1000:0012')
+ proxy_sock.close()
+ remote_sock.close()
+
def test_multiprocess(self):
kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
if self.arch == 'x86_64':
diff --git a/tests/functional/test_virtio_gpu.py b/tests/functional/test_virtio_gpu.py
index 81c9156d638..be96de24da2 100755
--- a/tests/functional/test_virtio_gpu.py
+++ b/tests/functional/test_virtio_gpu.py
@@ -108,6 +108,7 @@ def test_vhost_user_vga_virgl(self):
shell=False,
close_fds=False,
)
+ self._vug_log_file.close()
self.vm.set_console()
self.vm.add_args("-cpu", "host")
@@ -135,6 +136,7 @@ def test_vhost_user_vga_virgl(self):
"features: +virgl +edid")
self.vm.shutdown()
qemu_sock.close()
+ vug_sock.close()
vugp.terminate()
vugp.wait()
--
2.50.0
next prev parent reply other threads:[~2025-07-21 8:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 8:16 [PULL 0/5] Functional test patches and 32-bit arm Linux header removal Thomas Huth
2025-07-21 8:16 ` [PULL 1/5] linux-headers: Remove the 32-bit arm headers Thomas Huth
2025-07-21 8:16 ` [PULL 2/5] functional: ensure log handlers are closed Thomas Huth
2025-07-21 8:16 ` Thomas Huth [this message]
2025-07-21 8:16 ` [PULL 4/5] functional: always enable all python warnings Thomas Huth
2025-07-21 8:16 ` [PULL 5/5] docs/devel: fix over-quoting of QEMU_TEST_KEEP_SCRATCH Thomas Huth
2025-07-21 13:59 ` [PULL 0/5] Functional test patches and 32-bit arm Linux header removal Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250721081614.262563-4-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).