diff mbox series

[3/3] test-runner: fix __str__ for namespace processes

Message ID 20230504215247.581443-3-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series [1/3] hwsim: remove 'optimization' sending to only known MACs | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood May 4, 2023, 9:52 p.m. UTC
When printing out a namespace the Process.get_all() call was
returning all processes running, even those not in the namespace
being printed. Modifying get_all() is tricky since its a class
method (and used elsewhere for ALL processes) so instead filter
the results to only show processes in the namespace being printed.
---
 tools/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/utils.py b/tools/utils.py
index d2e1c33b..48d5d219 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -529,7 +529,8 @@  class Namespace:
 		ret = 'Namespace: %s\n' % self.name
 		ret += 'Processes:\n'
 		for p in Process.get_all():
-			ret += '\t%s' % str(p)
+			if p.namespace == self.name:
+				ret += '\t%s' % str(p)
 
 		ret += 'Radios:\n'
 		if len(self.radios) > 0: