From: Jouni Malinen Date: Sun, 14 Dec 2014 23:13:03 +0000 (+0200) Subject: tests: Make flush_scan_cache() more robust X-Git-Tag: hostap_2_4~764 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=970a23f665afa3bd0a3341b3706488de53d5f6da;p=thirdparty%2Fhostap.git 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 --- 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()