From 415458e2b3da4213a92114eb2826d378c7c3a2b2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 16 Jan 2023 12:39:38 +0200 Subject: [PATCH] tests: Make wext_pmksa_cache work with S1G channels 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 --- tests/hwsim/test_wext.py | 4 ++-- tests/hwsim/wpasupplicant.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/test_wext.py b/tests/hwsim/test_wext.py index e14eecede..d67788ba8 100644 --- a/tests/hwsim/test_wext.py +++ b/tests/hwsim/test_wext.py @@ -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) diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index 4a2830c25..d6b4c4891 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -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: