tests: Make ap_wps_ap_scan_2 more robust
The test sequence "scan_and_bss_entry_removed ap_wps_ap_scan_2" resulted in failure due to an old BSS entry remaining from the first test case to the second and the WPS_PBC operation on a forced BSSID ending up picking the incorrect BSS entry. Make this more robust by clearing the scan results from cfg80211. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
492c3a9180
commit
e51c8b2e97
2 changed files with 5 additions and 0 deletions
|
@ -2513,6 +2513,7 @@ def test_ap_wps_ap_scan_2(dev, apdev):
|
|||
if "OK" not in wpas.request("AP_SCAN 2"):
|
||||
raise Exception("Failed to set AP_SCAN 2")
|
||||
|
||||
wpas.flush_scan_cache()
|
||||
wpas.scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
wpas.request("WPS_PBC " + apdev[0]['bssid'])
|
||||
ev = wpas.wait_event(["WPS-SUCCESS"], timeout=15)
|
||||
|
|
|
@ -539,6 +539,10 @@ def test_scan_and_bss_entry_removed(dev, apdev):
|
|||
|
||||
dev[0].wait_connected(timeout=15, error="No connection (sme-connect)")
|
||||
wpas.wait_connected(timeout=15, error="No connection (connect)")
|
||||
dev[0].request("DISCONNECT")
|
||||
wpas.request("DISCONNECT")
|
||||
dev[0].flush_scan_cache()
|
||||
wpas.flush_scan_cache()
|
||||
|
||||
def test_scan_reqs_with_non_scan_radio_work(dev, apdev):
|
||||
"""SCAN commands while non-scan radio_work is in progress"""
|
||||
|
|
Loading…
Reference in a new issue