]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make dpp_pkex_no_responder handle enabled 5 GHz channels
authorJouni Malinen <j@w1.fi>
Tue, 1 Jan 2019 14:17:13 +0000 (16:17 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 1 Jan 2019 14:17:13 +0000 (16:17 +0200)
It was possible for the 5 GHz PKEX channels to be enabled, e.g., when
running "ap_ht40_csa2 dpp_pkex_no_responder" test sequence, and that
resulted in a failure in dpp_pkex_no_responder due to the unexpectedly
long wait needed for the DPP-FAIL event. Increase the wait time to allow
for 5 GHz PKEX channels to be probed.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_dpp.py

index a59e05b3daee496bb6afb8bd1be6fe88c4386b07..c02b17fad3e3cb0791e20c8304b8031f6fc19b9b 100644 (file)
@@ -3262,11 +3262,15 @@ def test_dpp_pkex_no_responder(dev, apdev):
     if "FAIL" in res:
         raise Exception("Failed to set PKEX data (initiator)")
 
-    ev = dev[0].wait_event(["DPP-FAIL"], timeout=15)
-    if ev is None:
-        raise Exception("DPP PKEX failure not reported")
-    if "No response from PKEX peer" not in ev:
-        raise Exception("Unexpected failure reason: " + ev)
+    for i in range(15):
+        ev = dev[0].wait_event(["DPP-TX ", "DPP-FAIL"], timeout=5)
+        if ev is None:
+            raise Exception("DPP PKEX failure not reported")
+        if "DPP-FAIL" not in ev:
+            continue
+        if "No response from PKEX peer" not in ev:
+            raise Exception("Unexpected failure reason: " + ev)
+        break
 
 def test_dpp_pkex_after_retry(dev, apdev):
     """DPP and PKEX completing after retry"""