]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make dpp_auth_req_retries* more reliable
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 30 Nov 2017 10:56:24 +0000 (12:56 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 30 Nov 2017 10:56:24 +0000 (12:56 +0200)
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>
tests/hwsim/test_dpp.py

index 1b689d684ae98a31f87a8cde0e56734a56e0fd7f..c40ae83c53441efcff7f5a93c3cebe1c43380e35 100644 (file)
@@ -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: