Skip to content

Commit

Permalink
Add some Python logging in test infrastructure
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Feb 7, 2024
1 parent 4c54c3b commit 4db2c99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/client-dbus/tests/udev/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""

# isort: STDLIB
import logging
import os
import random
import signal
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions tests/client-dbus/tests/udev/test_udev.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""

# isort: STDLIB
import logging
import random

# isort: LOCAL
Expand All @@ -39,6 +40,8 @@
wait_for_udev_count,
)

logging.basicConfig(level=logging.INFO)


class UdevTest1(UdevTest):
"""
Expand Down

0 comments on commit 4db2c99

Please sign in to comment.