]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Avoid a race condition in DPP retry validation
authorJouni Malinen <quic_jouni@quicinc.com>
Mon, 18 Dec 2023 15:00:55 +0000 (17:00 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 18 Dec 2023 15:00:55 +0000 (17:00 +0200)
Wait a bit to allow stopping of the DPP_LISTEN operation to be completed
before issuing the DPP_QR_CODE command that would send the frame that
these test cases expect to not get ACKed.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_dpp.py

index bcd100ed28be61d4bb6272bf13ecbbc36247aa50..49da060ad64fe06a207962dc3d48b89412afba4e 100644 (file)
@@ -607,6 +607,11 @@ def test_dpp_auth_resp_retries(dev, apdev):
     # DPP Authentication Response frame with Status=0
     dev[1].request("DPP_STOP_LISTEN")
 
+    ev = dev[0].wait_event(["DPP-TX-STATUS"], timeout=1)
+    if ev is None:
+        raise Exception("No TX status reported for response")
+    time.sleep(0.1)
+
     dev[1].dump_monitor()
     dev[0].dump_monitor()
 
@@ -4551,6 +4556,11 @@ def test_dpp_hostapd_auth_resp_retries(dev, apdev):
     # DPP Authentication Response frame with Status=0
     dev[0].request("DPP_STOP_LISTEN")
 
+    ev = hapd.wait_event(["DPP-TX-STATUS"], timeout=1)
+    if ev is None:
+        raise Exception("No TX status reported for response")
+    time.sleep(0.1)
+
     hapd.dump_monitor()
     dev[0].dump_monitor()