]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Wait longer for hostapd REMOVE command to complete
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 12 Mar 2014 09:42:59 +0000 (11:42 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 12 Mar 2014 09:42:59 +0000 (11:42 +0200)
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>
tests/hwsim/hostapd.py
wpaspy/wpaspy.py

index c6d8a746f3597a2b9fdd069dca8dfa592b246a19..984e4cc86a4e7d5d8a578e9b19966a341e5fbd9e 100644 (file)
@@ -39,7 +39,7 @@ class HostapdGlobal:
                 raise Exception("Could not add hostapd BSS")
 
     def remove(self, ifname):
-        self.ctrl.request("REMOVE " + ifname)
+        self.ctrl.request("REMOVE " + ifname, timeout=30)
 
     def relog(self):
         self.ctrl.request("RELOG")
index 24c371908e66f13392ea17e243be7d9ae03662bd..94943053f79bb225ec7d563c5a4a5b984ce7a4a5 100644 (file)
@@ -45,9 +45,9 @@ class Ctrl:
             os.unlink(self.local)
             self.started = False
 
-    def request(self, cmd):
+    def request(self, cmd, timeout=10):
         self.s.send(cmd)
-        [r, w, e] = select.select([self.s], [], [], 10)
+        [r, w, e] = select.select([self.s], [], [], timeout)
         if r:
             return self.s.recv(4096)
         raise Exception("Timeout on waiting response")