From: Jouni Malinen Date: Sat, 25 May 2019 18:18:24 +0000 (+0300) Subject: tests: Fix robustness issue in DPP test cases with SAE X-Git-Tag: hostap_2_9~262 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9ead82d11e96217367fc31f34e867f091696500;p=thirdparty%2Fhostap.git tests: Fix robustness issue in DPP test cases with SAE The sae_groups parameter needs to be cleared before attempt a SAE connection in a test case to avoid issues with this parameter having been left to something else than the default one by a previous test case. This was found with the following sequence: sae_pwe_failure dpp_auto_connect_legacy_psk_sae_1 Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py index 59c234ff8..ca4cb317c 100644 --- a/tests/hwsim/test_dpp.py +++ b/tests/hwsim/test_dpp.py @@ -1470,6 +1470,7 @@ def test_dpp_and_sae_akm(dev, apdev): if val != "DPP": raise Exception("Unexpected key_mgmt for DPP: " + val) + dev[1].request("SET sae_groups ") id = dev[1].connect("dpp+sae", key_mgmt="SAE", scan_freq="2412", ieee80211w="2", psk="sae-password") val = dev[1].get_status_field("key_mgmt") @@ -1781,6 +1782,7 @@ def run_dpp_auto_connect_legacy(dev, apdev, conf='sta-psk', hapd = hostapd.add_ap(apdev[0], params) + dev[0].request("SET sae_groups ") dev[0].set("dpp_config_processing", "2") id0 = dev[0].dpp_bootstrap_gen(chan="81/1", mac=True) uri0 = dev[0].request("DPP_BOOTSTRAP_GET_URI %d" % id0) @@ -4347,6 +4349,7 @@ def run_dpp_legacy_and_dpp_akm(dev, apdev): except: raise HwsimSkip("DPP not supported") + dev[0].request("SET sae_groups ") conf_id = dev[1].dpp_configurator_add(key=csign) dev[0].set("dpp_config_processing", "1") id0 = dev[0].dpp_bootstrap_gen(chan="81/1", mac=True)