From 5a426433dd6aec79187c815e0cc1e3154e08cfbf Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 6 Dec 2023 12:17:50 -0800 Subject: [PATCH] auto-t: add explicit stop() to IWD class 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 ddd021b0..52c35e3d 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)