]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: ap_wpa2_eap_assoc_rsn to allow TKIP-disabled hostapd build
authorJouni Malinen <jouni@codeaurora.org>
Fri, 17 Apr 2020 18:51:26 +0000 (21:51 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 17 Apr 2020 20:51:58 +0000 (23:51 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_eap.py

index 7e39aace77204c34802aca50db0bf9b1a699d90e..24de73e6c73341ba5f1300f086df8e30742c35c3 100644 (file)
@@ -6737,7 +6737,7 @@ def test_ap_wpa2_eap_assoc_rsn(dev, apdev):
         dev[0].request("REMOVE_NETWORK all")
         dev[0].wait_disconnected()
 
-    tests = [("Invalid group cipher", "30060100000fac02", 41),
+    tests = [("Invalid group cipher", "30060100000fac02", [40, 41]),
              ("Invalid pairwise cipher", "300c0100000fac040100000fac02", 42)]
     for title, ie, status in tests:
         logger.info(title)
@@ -6749,7 +6749,15 @@ def test_ap_wpa2_eap_assoc_rsn(dev, apdev):
         ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"])
         if ev is None:
             raise Exception("Association rejection not reported")
-        if "status_code=" + str(status) not in ev:
+        ok = False
+        if isinstance(status, list):
+            for i in status:
+                ok = "status_code=" + str(i) in ev
+                if ok:
+                    break
+        else:
+            ok = "status_code=" + str(status) in ev
+        if not ok:
             raise Exception("Unexpected status code: " + ev)
         dev[0].request("REMOVE_NETWORK all")
         dev[0].dump_monitor()