aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-30 10:56:24 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-30 10:56:24 (GMT)
commitedac8087e663db58fe830d2c66bfc7ea3c9438de (patch)
tree6fc36759a59ca3f3308aa724084c2f160a8e6b17
parent0e19300d5bc3208160cb8082362df6fac967291d (diff)
downloadhostap-edac8087e663db58fe830d2c66bfc7ea3c9438de.zip
hostap-edac8087e663db58fe830d2c66bfc7ea3c9438de.tar.gz
hostap-edac8087e663db58fe830d2c66bfc7ea3c9438de.tar.bz2
tests: Make dpp_auth_req_retries* more reliable
These test cases were failing when run immediately after dpp_pkex_test_fail. It looks like timing of the TX status and the short eloop wait were getting reordered in this cases. This ended up with some of the DPP-TX-STATUS event messages missing. Instead of explicitly checking for those message, simply count the number of DPP-TX messages to verify that the correct number of retries are being sent. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--tests/hwsim/test_dpp.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py
index 1b689d6..c40ae83 100644
--- a/tests/hwsim/test_dpp.py
+++ b/tests/hwsim/test_dpp.py
@@ -2737,12 +2737,9 @@ def test_dpp_auth_req_retries(dev, apdev):
run_dpp_proto_init(dev, 1, 1, unicast=False, listen=False)
for i in range(3):
- ev = dev[1].wait_event(["DPP-TX"], timeout=5)
+ ev = dev[1].wait_event(["DPP-TX "], timeout=5)
if ev is None:
raise Exception("Auth Req not sent (%d)" % i)
- ev = dev[1].wait_event(["DPP-TX-STATUS"], timeout=5)
- if ev is None:
- raise Exception("Auth Req TX status not seen (%d)" % i)
ev = dev[1].wait_event(["DPP-AUTH-INIT-FAILED"], timeout=5)
if ev is None:
@@ -2758,12 +2755,9 @@ def test_dpp_auth_req_retries_multi_chan(dev, apdev):
chan="81/1,81/6,81/11")
for i in range(3 * 3):
- ev = dev[1].wait_event(["DPP-TX"], timeout=5)
+ ev = dev[1].wait_event(["DPP-TX "], timeout=5)
if ev is None:
raise Exception("Auth Req not sent (%d)" % i)
- ev = dev[1].wait_event(["DPP-TX-STATUS"], timeout=5)
- if ev is None:
- raise Exception("Auth Req TX status not seen (%d)" % i)
ev = dev[1].wait_event(["DPP-AUTH-INIT-FAILED"], timeout=5)
if ev is None: