From a444a6d2623c6e6a4cc547faf5521f2e9e83b9b3 Mon Sep 17 00:00:00 2001 From: Masashi Honma Date: Thu, 31 Jan 2019 17:16:14 +0900 Subject: [PATCH] tests: Fix failure for WPA-EAP-SUITE-B-192 key_mgmt The wpas_config_file_key_mgmt fails with this error if wpa_supplicant is built without CONFIG_SUITEB192=y: Exception: SET_NETWORK failed Exception: SET_NETWORK failed Skip the WPA-EAP-SUITE-B-192 case if it is not supported in wpa_supplicant so that the rest of the key_mgmt test coverage is included. Signed-off-by: Masashi Honma --- tests/hwsim/test_wpas_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/hwsim/test_wpas_config.py b/tests/hwsim/test_wpas_config.py index 22f26398c..6274abf1c 100644 --- a/tests/hwsim/test_wpas_config.py +++ b/tests/hwsim/test_wpas_config.py @@ -575,7 +575,11 @@ def test_wpas_config_file_key_mgmt(dev, apdev, params): "SAE", "FT-SAE", "OSEN", "WPA-EAP-SUITE-B", "WPA-EAP-SUITE-B-192", "FILS-SHA256", "FILS-SHA384", "FT-FILS-SHA256", "FT-FILS-SHA384", "OWE", "DPP" ] + supported_key_mgmts = dev[0].get_capability("key_mgmt") for key_mgmt in tests: + if key_mgmt == "WPA-EAP-SUITE-B-192" and not key_mgmt in supported_key_mgmts: + logger.info("Skip unsupported " + key_mgmt) + continue wpas.set_network(id, "key_mgmt", key_mgmt) if "OK" not in wpas.request("SAVE_CONFIG"): raise Exception("Failed to save configuration file")