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>
This commit is contained in:
Jouni Malinen 2017-11-30 12:56:24 +02:00 committed by Jouni Malinen
parent 0e19300d5b
commit edac8087e6

View file

@ -2740,9 +2740,6 @@ def test_dpp_auth_req_retries(dev, apdev):
ev = dev[1].wait_event(["DPP-TX "], timeout=5) ev = dev[1].wait_event(["DPP-TX "], timeout=5)
if ev is None: if ev is None:
raise Exception("Auth Req not sent (%d)" % i) 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) ev = dev[1].wait_event(["DPP-AUTH-INIT-FAILED"], timeout=5)
if ev is None: if ev is None:
@ -2761,9 +2758,6 @@ def test_dpp_auth_req_retries_multi_chan(dev, apdev):
ev = dev[1].wait_event(["DPP-TX "], timeout=5) ev = dev[1].wait_event(["DPP-TX "], timeout=5)
if ev is None: if ev is None:
raise Exception("Auth Req not sent (%d)" % i) 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) ev = dev[1].wait_event(["DPP-AUTH-INIT-FAILED"], timeout=5)
if ev is None: if ev is None: