From 970a23f665afa3bd0a3341b3706488de53d5f6da Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 15 Dec 2014 01:13:03 +0200 Subject: [PATCH] tests: Make flush_scan_cache() more robust It was possible for BSS entries on the scanned channel (2412 MHz) to be left behind after flush_scan_cache() call. Use a less likely channel 2417 MHz as the default channel to scan. This will hopefully get rid of most problematic BSS entries from previous test cases. For example, ap_hs20_oen followed by ap_hs20_random_mac could fail due to INTERWORKING_CONNECT seeing non-RSN scan result from the previous test case. Signed-off-by: Jouni Malinen --- tests/hwsim/wpasupplicant.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index d5055a7d7..d3a9e804d 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -845,9 +845,9 @@ class WpaSupplicant: return raise Exception("Could not find BSS " + bssid + " in scan") - def flush_scan_cache(self): + def flush_scan_cache(self, freq=2417): self.request("BSS_FLUSH 0") - self.scan(freq=2412, only_new=True) + self.scan(freq=freq, only_new=True) def roam(self, bssid, fail_test=False): self.dump_monitor()