[PATCH v2 1/9] auto-t: add explicit stop() to IWD class

James Prestwood
2023-12-06T15:07:15Z

If tests end in an unknown state it is sometimes required that IWD
be stopped manually in order for future tests to run. Add a stop()
method so test tearDown() methods can explicitly stop IWD.
---
autotests/util/iwd.py | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
index 3f200beb..b1a57cab 100755
--- a/autotests/util/iwd.py
+++ b/autotests/util/iwd.py
@@ -1363,6 +1363,10 @@ class IWD(AsyncOpAbstract):

self.psk_agents = []

+ def stop(self):
+ if self.namespace.is_process_running('iwd'):
+ self._iwd_proc.kill()
+
def __del__(self):
for agent in self.psk_agents:
self.unregister_psk_agent(agent)
--
2.34.1