]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix failure for WPA-EAP-SUITE-B-192 key_mgmt
authorMasashi Honma <masashi.honma@gmail.com>
Thu, 31 Jan 2019 08:16:14 +0000 (17:16 +0900)
committerJouni Malinen <j@w1.fi>
Mon, 4 Feb 2019 10:26:33 +0000 (12:26 +0200)
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 <masashi.honma@gmail.com>
tests/hwsim/test_wpas_config.py

index 22f26398c341927925f7095cade267d663afa318..6274abf1cdb7373fbb7c152822a4d257b72d2397 100644 (file)
@@ -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")