]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make SAE-PK test cases more robust
authorJouni Malinen <jouni@codeaurora.org>
Mon, 8 Jun 2020 14:48:57 +0000 (17:48 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 8 Jun 2020 14:48:57 +0000 (17:48 +0300)
Clear scan results explicitly in test cases that check BSS entry flags
to avoid incorrect failures based on results from earlier test cases.

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

index cb9a7822c7acc23664e9c22617a48b3a75f5a3c5..e7574a1552e865f9ad19596d299b473adcf7916b 100644 (file)
@@ -39,6 +39,7 @@ def run_sae_pk(apdev, dev, ssid, pw, m, pk, ap_groups=None):
 def test_sae_pk(dev, apdev):
     """SAE-PK"""
     check_sae_pk_capab(dev[0])
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
 
     for i in range(14, len(SAE_PK_SEC2_PW_FULL) + 1):
@@ -51,6 +52,7 @@ def test_sae_pk(dev, apdev):
 def test_sae_pk_group_negotiation(dev, apdev):
     """SAE-PK"""
     check_sae_pk_capab(dev[0])
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "20 19")
 
     try:
@@ -62,6 +64,7 @@ def test_sae_pk_group_negotiation(dev, apdev):
 def test_sae_pk_sec_2(dev, apdev):
     """SAE-PK with Sec 2"""
     check_sae_pk_capab(dev[0])
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
 
     run_sae_pk(apdev[0], dev[0], SAE_PK_SEC2_SSID, SAE_PK_SEC2_PW,
@@ -70,6 +73,7 @@ def test_sae_pk_sec_2(dev, apdev):
 def test_sae_pk_sec_3(dev, apdev):
     """SAE-PK with Sec 3"""
     check_sae_pk_capab(dev[0])
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
 
     ssid = "SAE-PK test"
@@ -82,6 +86,7 @@ def test_sae_pk_sec_3(dev, apdev):
 def test_sae_pk_sec_4(dev, apdev):
     """SAE-PK with Sec 4"""
     check_sae_pk_capab(dev[0])
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
 
     ssid = "SAE-PK test"
@@ -94,6 +99,7 @@ def test_sae_pk_sec_4(dev, apdev):
 def test_sae_pk_sec_5(dev, apdev):
     """SAE-PK with Sec 5"""
     check_sae_pk_capab(dev[0])
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "")
 
     ssid = "SAE-PK test"
@@ -106,6 +112,7 @@ def test_sae_pk_sec_5(dev, apdev):
 def test_sae_pk_group_20(dev, apdev):
     """SAE-PK with group 20"""
     check_sae_pk_capab(dev[0])
+    dev[0].flush_scan_cache()
     dev[0].set("sae_groups", "20")
 
     ssid = "SAE-PK test"