]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make sigma_dut AP SAE tests more robust
authorJouni Malinen <j@w1.fi>
Sat, 9 Dec 2023 10:56:27 +0000 (12:56 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 9 Dec 2023 17:02:38 +0000 (19:02 +0200)
Wait some time before requesting disconnection to allow hostapd to
complete 4-way handshake processing. Wait some time after disconnection
has been completed on the STA before trying to use SAE again with the AP
so that hostapd has a chance to complete disconnection with UML
time-travel.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_sigma_dut.py

index a981295b1fc7151b562cf1739ac2293dfec268c2..239bdb061b60162bbcb6d0d37a7f02c9e5a52ffd 100644 (file)
@@ -1078,8 +1078,14 @@ def test_sigma_dut_ap_sae_pw_id(dev, apdev, params):
                 dev[0].connect("test-sae", key_mgmt="SAE", sae_password=pw,
                                sae_password_id=pw_id,
                                ieee80211w="2", scan_freq="2412")
+                # Allow some time for AP to complete handling of connection
+                # before disconnecting.
+                time.sleep(0.1)
                 dev[0].request("REMOVE_NETWORK all")
                 dev[0].wait_disconnected()
+                # Allow some time for AP to complete handling of disconnection
+                # before trying SAE again.
+                time.sleep(0.1)
 
             sigma_dut_cmd_check("ap_reset_default")
         finally:
@@ -1148,8 +1154,14 @@ def test_sigma_dut_ap_sae_pw_id_ft(dev, apdev, params):
                 dev[0].connect("test-sae", key_mgmt=key_mgmt, sae_password=pw,
                                sae_password_id=pw_id,
                                ieee80211w="2", scan_freq="2412")
+                # Allow some time for AP to complete handling of connection
+                # before disconnecting.
+                time.sleep(0.1)
                 dev[0].request("REMOVE_NETWORK all")
                 dev[0].wait_disconnected()
+                # Allow some time for AP to complete handling of disconnection
+                # before trying SAE again.
+                time.sleep(0.1)
 
             sigma_dut_cmd_check("ap_reset_default")
         finally: