aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-12-25 16:36:17 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-25 16:36:17 (GMT)
commit8b5a497325c59bea814e3c090d43505dc57aa34e (patch)
treecfcb29c1cfc6e4cd32153591f7da26fdd48d3dfa
parent481d88c06077ef72524906b2fb2568502d98c3d4 (diff)
downloadhostap-8b5a497325c59bea814e3c090d43505dc57aa34e.zip
hostap-8b5a497325c59bea814e3c090d43505dc57aa34e.tar.gz
hostap-8b5a497325c59bea814e3c090d43505dc57aa34e.tar.bz2
tests: Make dpp_pkex_test_fail and dpp_pkex_alloc_fail more robust
Wait for test/allocation failure for longer than the wait_fail_trigger() default two seconds to allow DPP (in particular, PKEX) retransmission to occur. This removes some issues where the previous wait was more or less exactly the same duration as the retransmission interval and the first Listen operation not always starting quickly enough to receive the first frame. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_dpp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py
index 748331a..3a75e61 100644
--- a/tests/hwsim/test_dpp.py
+++ b/tests/hwsim/test_dpp.py
@@ -3877,7 +3877,7 @@ def test_dpp_pkex_alloc_fail(dev, apdev):
with alloc_fail(dev[1], count, func):
cmd = "DPP_PKEX_ADD own=%d identifier=test init=1 conf=sta-dpp configurator=%d code=secret" % (id1, conf_id)
dev[1].request(cmd)
- wait_fail_trigger(dev[1], "GET_ALLOC_FAIL")
+ wait_fail_trigger(dev[1], "GET_ALLOC_FAIL", max_iter=100)
ev = dev[0].wait_event(["GAS-QUERY-START"], timeout=0.01)
if ev:
dev[0].request("DPP_STOP_LISTEN")
@@ -3931,7 +3931,7 @@ def test_dpp_pkex_alloc_fail(dev, apdev):
with alloc_fail(dev[0], count, func):
cmd = "DPP_PKEX_ADD own=%d identifier=test init=1 conf=sta-dpp configurator=%d code=secret" % (id1, conf_id)
dev[1].request(cmd)
- wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
+ wait_fail_trigger(dev[0], "GET_ALLOC_FAIL", max_iter=100)
ev = dev[0].wait_event(["GAS-QUERY-START"], timeout=0.01)
if ev:
dev[0].request("DPP_STOP_LISTEN")
@@ -4011,7 +4011,7 @@ def test_dpp_pkex_test_fail(dev, apdev):
with fail_test(dev[1], count, func):
cmd = "DPP_PKEX_ADD own=%d identifier=test init=1 conf=sta-dpp configurator=%d code=secret" % (id1, conf_id)
dev[1].request(cmd)
- wait_fail_trigger(dev[1], "GET_FAIL")
+ wait_fail_trigger(dev[1], "GET_FAIL", max_iter=100)
ev = dev[0].wait_event(["GAS-QUERY-START"], timeout=0.01)
if ev:
dev[0].request("DPP_STOP_LISTEN")