3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-21 22:09:23 +01:00

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.
This commit is contained in:
James Prestwood 2023-12-06 12:17:50 -08:00 committed by Denis Kenzior
parent 84d018e722
commit 5a426433dd

View File

@ -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)