From 8b5a497325c59bea814e3c090d43505dc57aa34e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 25 Dec 2017 18:36:17 +0200 Subject: [PATCH] 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 --- tests/hwsim/test_dpp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py index 748331a24..3a75e61bd 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")