]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Clear scan results from dev5 in WPS testing
authorJouni Malinen <jouni@codeaurora.org>
Wed, 13 Mar 2019 17:27:21 +0000 (19:27 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 13 Mar 2019 17:27:21 +0000 (19:27 +0200)
Test case sequence "ap_wps_ap_scan_2 ap_wps_pbc_2ap" resulted in a
failure due to a scan entry being left behind from the first test case
and the second one ending up using that obsolete result during WPS_PBC
processing. Fix this by clearing the scan results explicitly on dev5.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_wps.py

index 5255f0172bb8c011a67ce28a59861769e875d11a..f0f852b24df6f58353a662b4dcff5f37e9aaea5d 100644 (file)
@@ -3634,6 +3634,9 @@ def test_ap_wps_ap_scan_2(dev, apdev):
     wpas.request("REASSOCIATE")
     wpas.wait_connected(timeout=30)
     wpas.dump_monitor()
+    wpas.request("DISCONNECT")
+    wpas.wait_disconnected()
+    wpas.flush_scan_cache()
 
 @remote_compatible
 def test_ap_wps_eapol_workaround(dev, apdev):
@@ -9734,6 +9737,7 @@ def test_ap_wps_pbc_2ap(dev, apdev):
     wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
     wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
     wpas.dump_monitor()
+    wpas.flush_scan_cache()
 
     wpas.scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True)
     wpas.scan_for_bss(apdev[1]['bssid'], freq="2412")