From: Jouni Malinen Date: Sun, 13 Mar 2022 16:18:28 +0000 (+0200) Subject: tests: Make DPP relay tests more robust X-Git-Tag: hostap_2_11~2153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f661f942d2dc7f6ee8547508e236cbc14f881d5;p=thirdparty%2Fhostap.git tests: Make DPP relay tests more robust Flush scan results to avoid failure caused by incorrect channel selection based on an old result for the same BSSID. This was found with the following test sequence: ap_track_sta_no_auth dpp_network_intro_version_missing_req dpp_controller_relay_pkex Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py index 5ffe909b8..94b9f8207 100644 --- a/tests/hwsim/test_dpp.py +++ b/tests/hwsim/test_dpp.py @@ -5406,6 +5406,8 @@ def run_dpp_controller_relay(dev, apdev, params, chirp=False): wait_auth_success(relay, dev[1], configurator=dev[1], enrollee=relay) update_hapd_config(relay) + dev[0].flush_scan_cache() + # Initiate from Enrollee with broadcast DPP Authentication Request or # using chirping dev[0].set("dpp_config_processing", "2") diff --git a/tests/hwsim/test_dpp3.py b/tests/hwsim/test_dpp3.py index c3f57f621..9cf6f9634 100644 --- a/tests/hwsim/test_dpp3.py +++ b/tests/hwsim/test_dpp3.py @@ -260,6 +260,8 @@ def run_dpp_controller_relay_pkex(dev, apdev, params): if "FAIL" in res: raise Exception("Failed to set PKEX data (Controller)") + dev[0].flush_scan_cache() + # Initiate PKEX from Enrollee dev[0].set("dpp_config_processing", "2") dev[0].dpp_pkex_init(identifier=None, code=code, role="enrollee")