]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make fils_sk_auth_mismatch more robust
authorJouni Malinen <j@w1.fi>
Sun, 22 Dec 2019 15:20:33 +0000 (17:20 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 22 Dec 2019 15:20:33 +0000 (17:20 +0200)
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 <j@w1.fi>
tests/hwsim/test_fils.py

index 5bdddfac9a3774bfd48a6952b580e7288bd6a3e1..50de4d282ce21ba8a84fa897ccc71697be00137f 100644 (file)
@@ -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,