mirror of
https://github.com/qemu/qemu.git
synced 2025-07-22 18:27:05 +00:00
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>
This commit is contained in:

committed by
Thomas Huth

parent
069a2ce8a7
commit
72bc0134b5
@ -83,6 +83,9 @@ class Multiprocess(QemuSystemTest):
|
||||
'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':
|
||||
|
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user