Skip to content

Commit

Permalink
Fix the child process name snmpsim
Browse files Browse the repository at this point in the history
Some distros have snmpsim-command
and some snmpsim-command-responder
for the child process name.

Change-Id: I4a5df3ab29de3ade65b5181ea539a8aa15f46e55
  • Loading branch information
Konstantin Baikov committed Oct 23, 2023
1 parent 7c94693 commit 296ca67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integration/cmk/snmplib/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _snmpsimd_process(process_def: ProcessDef) -> psutil.Process | None:
if process_def.with_sudo:
proc = psutil.Process(process_def.process.pid)
for child in (children := proc.children(recursive=True)):
if child.name() == "snmpsim-command":
if child.name().startswith("snmpsim-command"):
return child
logger.debug("Did not find snmpsim-command in children %r", children)
return None
Expand Down

0 comments on commit 296ca67

Please sign in to comment.