]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make DPP protocol failure testing more robust
authorJouni Malinen <jouni@codeaurora.org>
Wed, 13 Mar 2019 17:40:50 +0000 (19:40 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 13 Mar 2019 17:44:50 +0000 (19:44 +0200)
Wait explicitly for the DPP-NOT-COMPATIBLE event when going through
protocol testing with local failures instead of just waiting for a fixed
0.1 second duration. This prevents a test failure at least in
dppauth_resp_status_failure in a case where the failing operation may be
delayed under heavy CPU load.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_dpp.py

index 6eb7a292e6c574ea29fe56cdf6b5d54de45674f5..616c91e4f715ed29ff88dd9826d8e21f4242771b 100644 (file)
@@ -3632,6 +3632,10 @@ def run_dpp_proto_auth_resp_missing(dev, test, reason,
     run_dpp_proto_init(dev, 0, test, mutual=True,
                        incompatible_roles=incompatible_roles)
     if reason is None:
+        if incompatible_roles:
+            ev = dev[0].wait_event(["DPP-NOT-COMPATIBLE"], timeout=5)
+            if ev is None:
+                raise Exception("DPP-NOT-COMPATIBLE not reported")
         time.sleep(0.1)
         return
     ev = dev[1].wait_event(["DPP-FAIL"], timeout=5)