From 534d36210b9ea5eecb0b13b35253e6f52a4572ee Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 22 Dec 2019 17:20:33 +0200 Subject: [PATCH] tests: Make fils_sk_auth_mismatch more robust Wait STA connection to be completed in hostapd before testing connectivity. This avoids a possible race condition that could be hit especially when testing with UML time-travel. Signed-off-by: Jouni Malinen --- tests/hwsim/test_fils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/hwsim/test_fils.py b/tests/hwsim/test_fils.py index 5bdddfac9..50de4d282 100644 --- a/tests/hwsim/test_fils.py +++ b/tests/hwsim/test_fils.py @@ -1640,6 +1640,7 @@ def test_fils_sk_auth_mismatch(dev, apdev, params): dev[0].request("DISCONNECT") dev[0].wait_disconnected() + hapd.dump_monitor() dev[0].dump_monitor() dev[0].select_network(id, freq=2412) ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED", @@ -1650,6 +1651,7 @@ def test_fils_sk_auth_mismatch(dev, apdev, params): if "CTRL-EVENT-EAP-STARTED" not in ev: raise Exception("No EAP exchange seen") dev[0].wait_connected() + hapd.wait_sta() hwsim_utils.test_connectivity(dev[0], hapd) def setup_fils_rekey(dev, apdev, params, wpa_ptk_rekey=0, wpa_group_rekey=0,