diff mbox series

[v3,01/13] auto-t: add explicit stop() to IWD class

Message ID 20231206201802.2139649-1-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series [v3,01/13] auto-t: add explicit stop() to IWD class | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-testrunner pending Autotest Runner
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint success GitLint
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-alpine-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-alpine-ci-makecheck success Make Check
prestwoj/iwd-ci-incremental_build success Incremental Build with patches
prestwoj/iwd-alpine-ci-incremental_build success Incremental Build with patches

Commit Message

James Prestwood Dec. 6, 2023, 8:17 p.m. UTC
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(+)

Comments

Denis Kenzior Dec. 13, 2023, 4:14 p.m. UTC | #1
Hi James,

On 12/6/23 14:17, James Prestwood wrote:
> 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(+)
> 

All applied, thanks.

Regards,
-Denis
diff mbox series

Patch

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)