* [PATCH] auto-t: fix hostapd.ungraceful_restart
@ 2020-07-13 18:02 James Prestwood
0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2020-07-13 18:02 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
This was killing hostapd, but not re-initializing any of the
control socket information so any use of hostapd.wait_for_event
after hostapd.ungraceful_restart would cause an exception.
---
autotests/util/hostapd.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py
index 49047f38..c3a4a0d0 100644
--- a/autotests/util/hostapd.py
+++ b/autotests/util/hostapd.py
@@ -193,6 +193,8 @@ class HostapdCLI:
'''
Ungracefully kill and restart hostapd
'''
+ self.ctrl_sock.close()
+
intf = hostapd_map[self.ifname]
os.system('killall -9 hostapd')
os.system('ifconfig %s down' % intf.name)
@@ -203,6 +205,9 @@ class HostapdCLI:
# set flag so hostapd can be killed after the test
self._hostapd_restarted = True
+ # New hostapd process, so re-init
+ self.__init__(intf)
+
def req_beacon(self, addr, request):
'''
Send a RRM Beacon request
--
2.21.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-13 18:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 18:02 [PATCH] auto-t: fix hostapd.ungraceful_restart James Prestwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.