* [PATCH 0/2] functional tests: fix socketdir cleanup
@ 2025-10-25 16:58 Vladimir Sementsov-Ogievskiy
2025-10-25 16:58 ` [PATCH 1/2] tests/functional/.../testcase.py: better " Vladimir Sementsov-Ogievskiy
2025-10-25 16:58 ` [PATCH 2/2] MAINTAINERS: fix functional tests section Vladimir Sementsov-Ogievskiy
0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2025-10-25 16:58 UTC (permalink / raw)
To: thuth; +Cc: philmd, berrange, qemu-devel, vsementsov
Hi all. Two small fixes here.
Vladimir Sementsov-Ogievskiy (2):
tests/functional/.../testcase.py: better socketdir cleanup
MAINTAINERS: fix functional tests section
MAINTAINERS | 1 +
tests/functional/qemu_test/testcase.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--
2.48.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] tests/functional/.../testcase.py: better socketdir cleanup
2025-10-25 16:58 [PATCH 0/2] functional tests: fix socketdir cleanup Vladimir Sementsov-Ogievskiy
@ 2025-10-25 16:58 ` Vladimir Sementsov-Ogievskiy
2025-10-27 6:01 ` Thomas Huth
2025-10-25 16:58 ` [PATCH 2/2] MAINTAINERS: fix functional tests section Vladimir Sementsov-Ogievskiy
1 sibling, 1 reply; 5+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2025-10-25 16:58 UTC (permalink / raw)
To: thuth; +Cc: philmd, berrange, qemu-devel, vsementsov
TemporaryDirectory prefer explicit call to .cleanup() (or
use context manager). Otherwise it may produce a warning like:
/usr/lib/python3.10/tempfile.py:1008: \
ResourceWarning: Implicitly cleaning up \
<TemporaryDirectory '/tmp/qemu_func_test_sock_4esmf5ba'>
Currently, the only test using socket_dir() is
tests/functional/x86_64/test_vfio_user_client.py, and it does
print this warning, at least with python 3.10.12. With this commit,
the warning disappears.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
tests/functional/qemu_test/testcase.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index 2c0abde395..a122acb560 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -233,7 +233,7 @@ def tearDown(self):
if "QEMU_TEST_KEEP_SCRATCH" not in os.environ:
shutil.rmtree(self.workdir)
if self.socketdir is not None:
- shutil.rmtree(self.socketdir.name)
+ self.socketdir.cleanup()
self.socketdir = None
self.machinelog.removeHandler(self._log_fh)
self.log.removeHandler(self._log_fh)
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] MAINTAINERS: fix functional tests section
2025-10-25 16:58 [PATCH 0/2] functional tests: fix socketdir cleanup Vladimir Sementsov-Ogievskiy
2025-10-25 16:58 ` [PATCH 1/2] tests/functional/.../testcase.py: better " Vladimir Sementsov-Ogievskiy
@ 2025-10-25 16:58 ` Vladimir Sementsov-Ogievskiy
2025-10-27 6:03 ` Thomas Huth
1 sibling, 1 reply; 5+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2025-10-25 16:58 UTC (permalink / raw)
To: thuth; +Cc: philmd, berrange, qemu-devel, vsementsov
Without "S: Maintained", ./scripts/get_maintainer.pl shows "unknown"
role instead of "maintainer" for "M: " entry, it's confusing. I really
hope that functional tests are maintained:)
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index f33f95ceea..27e5e93d2a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4408,6 +4408,7 @@ Functional testing framework
M: Thomas Huth <thuth@redhat.com>
R: Philippe Mathieu-Daudé <philmd@linaro.org>
R: Daniel P. Berrange <berrange@redhat.com>
+S: Maintained
F: docs/devel/testing/functional.rst
F: scripts/clean_functional_cache.py
F: tests/functional/qemu_test/
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] tests/functional/.../testcase.py: better socketdir cleanup
2025-10-25 16:58 ` [PATCH 1/2] tests/functional/.../testcase.py: better " Vladimir Sementsov-Ogievskiy
@ 2025-10-27 6:01 ` Thomas Huth
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2025-10-27 6:01 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy; +Cc: philmd, berrange, qemu-devel
On 25/10/2025 18.58, Vladimir Sementsov-Ogievskiy wrote:
> TemporaryDirectory prefer explicit call to .cleanup() (or
> use context manager). Otherwise it may produce a warning like:
>
> /usr/lib/python3.10/tempfile.py:1008: \
> ResourceWarning: Implicitly cleaning up \
> <TemporaryDirectory '/tmp/qemu_func_test_sock_4esmf5ba'>
>
> Currently, the only test using socket_dir() is
> tests/functional/x86_64/test_vfio_user_client.py, and it does
> print this warning, at least with python 3.10.12. With this commit,
> the warning disappears.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> tests/functional/qemu_test/testcase.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
> index 2c0abde395..a122acb560 100644
> --- a/tests/functional/qemu_test/testcase.py
> +++ b/tests/functional/qemu_test/testcase.py
> @@ -233,7 +233,7 @@ def tearDown(self):
> if "QEMU_TEST_KEEP_SCRATCH" not in os.environ:
> shutil.rmtree(self.workdir)
> if self.socketdir is not None:
> - shutil.rmtree(self.socketdir.name)
> + self.socketdir.cleanup()
> self.socketdir = None
> self.machinelog.removeHandler(self._log_fh)
> self.log.removeHandler(self._log_fh)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] MAINTAINERS: fix functional tests section
2025-10-25 16:58 ` [PATCH 2/2] MAINTAINERS: fix functional tests section Vladimir Sementsov-Ogievskiy
@ 2025-10-27 6:03 ` Thomas Huth
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2025-10-27 6:03 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy; +Cc: philmd, berrange, qemu-devel
On 25/10/2025 18.58, Vladimir Sementsov-Ogievskiy wrote:
> Without "S: Maintained", ./scripts/get_maintainer.pl shows "unknown"
> role instead of "maintainer" for "M: " entry, it's confusing. I really
> hope that functional tests are maintained:)
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> MAINTAINERS | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f33f95ceea..27e5e93d2a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4408,6 +4408,7 @@ Functional testing framework
> M: Thomas Huth <thuth@redhat.com>
> R: Philippe Mathieu-Daudé <philmd@linaro.org>
> R: Daniel P. Berrange <berrange@redhat.com>
> +S: Maintained
> F: docs/devel/testing/functional.rst
> F: scripts/clean_functional_cache.py
> F: tests/functional/qemu_test/
Ooops, thanks for catching it!
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-27 6:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-25 16:58 [PATCH 0/2] functional tests: fix socketdir cleanup Vladimir Sementsov-Ogievskiy
2025-10-25 16:58 ` [PATCH 1/2] tests/functional/.../testcase.py: better " Vladimir Sementsov-Ogievskiy
2025-10-27 6:01 ` Thomas Huth
2025-10-25 16:58 ` [PATCH 2/2] MAINTAINERS: fix functional tests section Vladimir Sementsov-Ogievskiy
2025-10-27 6:03 ` Thomas Huth
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).