]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make wext_pmksa_cache work with S1G channels
authorJouni Malinen <quic_jouni@quicinc.com>
Mon, 16 Jan 2023 10:39:38 +0000 (12:39 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 16 Jan 2023 10:40:46 +0000 (12:40 +0200)
If mac80211_hwsim has S1G channels enabled, the 15 second timeout was
not sufficiently long for full scan while connected.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_wext.py
tests/hwsim/wpasupplicant.py

index e14eecedeb1a82b9251fdb3624e35447b70af25d..d67788ba8d82b40aeeec7b31a8801b8b1d9e994f 100644 (file)
@@ -108,7 +108,7 @@ def test_wext_pmksa_cache(dev, apdev):
     # of scanning to avoid reporting errors incorrectly just because of scans
     # not having seen the target AP.
     for i in range(3):
-        wpas.scan()
+        wpas.scan(timeout=30)
         if wpas.get_bss(bssid2) is not None:
             break
         logger.info("Scan again to find target AP")
@@ -125,7 +125,7 @@ def test_wext_pmksa_cache(dev, apdev):
 
     wpas.dump_monitor()
     logger.info("Roam back to AP1")
-    wpas.scan()
+    wpas.scan(timeout=30)
     wpas.request("ROAM " + bssid)
     ev = wpas.wait_event(["CTRL-EVENT-EAP-STARTED",
                           "CTRL-EVENT-CONNECTED"], timeout=15)
index 4a2830c255c525557d147aeee5737b046f4b8353..d6b4c48917d8a079b6d5e0dd8544778c0d2822f5 100644 (file)
@@ -1155,7 +1155,7 @@ class WpaSupplicant:
         return id
 
     def scan(self, type=None, freq=None, no_wait=False, only_new=False,
-             passive=False):
+             passive=False, timeout=15):
         if not no_wait:
             self.dump_monitor()
         if type:
@@ -1176,7 +1176,7 @@ class WpaSupplicant:
         if no_wait:
             return
         ev = self.wait_event(["CTRL-EVENT-SCAN-RESULTS",
-                              "CTRL-EVENT-SCAN-FAILED"], 15)
+                              "CTRL-EVENT-SCAN-FAILED"], timeout)
         if ev is None:
             raise Exception("Scan timed out")
         if "CTRL-EVENT-SCAN-FAILED" in ev: