From 8b944cf779629141896a269fd6b181a05b4d9148 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 13 Mar 2019 19:27:21 +0200 Subject: [PATCH] tests: Clear scan results from dev5 in WPS testing 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 --- tests/hwsim/test_ap_wps.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 5255f0172..f0f852b24 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -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")