diff options
author | Jouni Malinen <j@w1.fi> | 2016-01-06 22:27:50 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2016-01-06 22:27:50 (GMT) |
commit | 447fb0b0da659b99ba713cdb53df9344a102cf32 (patch) | |
tree | c7ce86dc75f315c014435687a52747a54d6c1987 /tests | |
parent | 4a539abdbdb425d0527eff396a4d4bf3951a6b51 (diff) | |
download | hostap-447fb0b0da659b99ba713cdb53df9344a102cf32.zip hostap-447fb0b0da659b99ba713cdb53df9344a102cf32.tar.gz hostap-447fb0b0da659b99ba713cdb53df9344a102cf32.tar.bz2 |
tests: Make eap_check_auth() error on missing selectedMethod clearer
It was possible to hit an error case in ap_wpa2_eap_in_bridge where the
selectedMethod STATUS field was not available. This resulted in not very
helpful "'selectedMethod'" message in the test log file. Make this
clearer by dumping all received STATUS fields and a clearer exception
message indicating that selectedMethod was missing.
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hwsim/test_ap_eap.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 9efa73c..6a4eec6 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -176,6 +176,9 @@ def eap_check_auth(dev, method, initial, rsn=True, sha256=False, if status["suppPortStatus"] != "Authorized": raise Exception("Port not authorized") + if "selectedMethod" not in status: + logger.info("Status: " + str(status)) + raise Exception("No selectedMethod in status") if method not in status["selectedMethod"]: raise Exception("Incorrect EAP method status") if sha256: |