tests: Make gas_anqp_extra_elements more robust

Explicitly flush cfg80211 scan cache for this test case since the BSS
entry check might fail if there are multiple results for the same BSSID.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-02-11 07:54:47 +02:00
parent c304bddcf9
commit dd900637b2

View file

@ -1209,6 +1209,7 @@ def test_gas_anqp_extra_elements(dev, apdev):
hapd = hostapd.add_ap(apdev[0], params) hapd = hostapd.add_ap(apdev[0], params)
bssid = apdev[0]['bssid'] bssid = apdev[0]['bssid']
dev[0].flush_scan_cache()
dev[0].scan_for_bss(bssid, freq="2412", force_scan=True) dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
if "OK" not in dev[0].request("ANQP_GET " + bssid + " 265,266"): if "OK" not in dev[0].request("ANQP_GET " + bssid + " 265,266"):
raise Exception("ANQP_GET command failed") raise Exception("ANQP_GET command failed")