From 4db2c9994e69f2445d7a10358bd9dbfb2505359d Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 31 Jan 2024 13:30:48 -0500 Subject: [PATCH] Add some Python logging in test infrastructure Signed-off-by: mulhern --- tests/client-dbus/tests/udev/_utils.py | 6 ++++++ tests/client-dbus/tests/udev/test_udev.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/tests/client-dbus/tests/udev/_utils.py b/tests/client-dbus/tests/udev/_utils.py index 8a034afa3b..529690b9d1 100644 --- a/tests/client-dbus/tests/udev/_utils.py +++ b/tests/client-dbus/tests/udev/_utils.py @@ -16,6 +16,7 @@ """ # isort: STDLIB +import logging import os import random import signal @@ -415,9 +416,14 @@ def _clean_up(self): """ stratisds = list(processes("stratisd")) for process in stratisds: + logging.warning("stratisd process %s still running, terminating", process) process.terminate() (_, alive) = psutil.wait_procs(stratisds, timeout=10) for process in alive: + logging.warning( + "stratisd process %s did not respond to terminate signal, killing", + process, + ) process.kill() remove_stratis_setup() diff --git a/tests/client-dbus/tests/udev/test_udev.py b/tests/client-dbus/tests/udev/test_udev.py index 2884eb2a1f..caf8564508 100644 --- a/tests/client-dbus/tests/udev/test_udev.py +++ b/tests/client-dbus/tests/udev/test_udev.py @@ -16,6 +16,7 @@ """ # isort: STDLIB +import logging import random # isort: LOCAL @@ -39,6 +40,8 @@ wait_for_udev_count, ) +logging.basicConfig(level=logging.INFO) + class UdevTest1(UdevTest): """