]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make SAE roaming test cases more reliable
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 16 Feb 2022 17:56:24 +0000 (19:56 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 16 Feb 2022 17:57:49 +0000 (19:57 +0200)
Flush the scan table explicitly to avoid issues with the ROAM command if
the new AP is not found and an entry from a previous test case is used
instead. This was happening in a number of cases where a SAE test case
was run after sigma_dut_ap_cipher_gcmp_256 which used the second AP
instance and allowed that to show up in the scan results in the next
text case.

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

index abadc30379cf231d5d57bd674e6c97e0aec131f9..d5829760868372a4fb7f56d921993725db549c4d 100644 (file)
@@ -2506,6 +2506,7 @@ def test_sae_okc(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], params)
     bssid = hapd.own_addr()
 
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
     id = dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
                         okc=True, scan_freq="2412")
@@ -2538,6 +2539,7 @@ def test_sae_okc_sta_only(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], params)
     bssid = hapd.own_addr()
 
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
     id = dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
                         okc=True, scan_freq="2412")
@@ -2565,6 +2567,7 @@ def test_sae_okc_pmk_lifetime(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], params)
     bssid = hapd.own_addr()
 
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
     dev[0].set("dot11RSNAConfigPMKLifetime", "10")
     dev[0].set("dot11RSNAConfigPMKReauthThreshold", "30")
@@ -2607,6 +2610,7 @@ def test_sae_pmk_lifetime(dev, apdev):
     hapd2 = hostapd.add_ap(apdev[1], params)
     bssid2 = hapd2.own_addr()
 
+    dev[0].flush_scan_cache()
     dev[0].scan_for_bss(bssid2, freq=2412)
     dev[0].roam(bssid2)
     dev[0].dump_monitor()
@@ -2682,6 +2686,7 @@ def test_sae_pmf_roam(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], params)
     bssid = hapd.own_addr()
 
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
     id = dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
                         ieee80211w="2", scan_freq="2412")