tests: Wait longer for hostapd REMOVE command to complete
Some kernel debugging options (especially CONFIG_DEBUG_KOBJECT_RELEASE=y) can add significant blocking time to interface removal with NL80211_CMD_DEL_INTERFACE and SIOCGIFBR(BRCTL_DEL_BRIDGE) block for 1-8 seconds. This could result in the VLAN test cases failing due to a wpaspy timeout on the REMOVE command even though the issue was only in the kernel debugging code making the operations significantly slower. Work around this by using a longer timeout for that control interface command to allow this type of debug kernel to be used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
39b420f7b1
commit
c2149b08da
2 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ class HostapdGlobal:
|
||||||
raise Exception("Could not add hostapd BSS")
|
raise Exception("Could not add hostapd BSS")
|
||||||
|
|
||||||
def remove(self, ifname):
|
def remove(self, ifname):
|
||||||
self.ctrl.request("REMOVE " + ifname)
|
self.ctrl.request("REMOVE " + ifname, timeout=30)
|
||||||
|
|
||||||
def relog(self):
|
def relog(self):
|
||||||
self.ctrl.request("RELOG")
|
self.ctrl.request("RELOG")
|
||||||
|
|
|
@ -45,9 +45,9 @@ class Ctrl:
|
||||||
os.unlink(self.local)
|
os.unlink(self.local)
|
||||||
self.started = False
|
self.started = False
|
||||||
|
|
||||||
def request(self, cmd):
|
def request(self, cmd, timeout=10):
|
||||||
self.s.send(cmd)
|
self.s.send(cmd)
|
||||||
[r, w, e] = select.select([self.s], [], [], 10)
|
[r, w, e] = select.select([self.s], [], [], timeout)
|
||||||
if r:
|
if r:
|
||||||
return self.s.recv(4096)
|
return self.s.recv(4096)
|
||||||
raise Exception("Timeout on waiting response")
|
raise Exception("Timeout on waiting response")
|
||||||
|
|
Loading…
Reference in a new issue