]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Clear ignore_old_scan_res after sigma_dut test cases
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 3 Jul 2017 12:58:58 +0000 (15:58 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 3 Jul 2017 12:58:58 +0000 (15:58 +0300)
sigma_dut can end up setting ignore_old_scan_res=1 and that can result
in some of the consecutive test cases failing. Fix this by explicitly
clearing ignore_old_scan_res after sigma_dut cases that may have ended
up setting the parameter.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_sigma_dut.py

index 76e335f74c00d8a28551c31401c6bb3914fbf4f8..9149429e38a9ab58492bacbe6f7ab1cf08626d8f 100644 (file)
@@ -114,6 +114,12 @@ def test_sigma_dut_basic(dev, apdev):
 
 def test_sigma_dut_open(dev, apdev):
     """sigma_dut controlled open network association"""
+    try:
+        run_sigma_dut_open(dev, apdev)
+    finally:
+        dev[0].set("ignore_old_scan_res", "0")
+
+def run_sigma_dut_open(dev, apdev):
     ifname = dev[0].ifname
     sigma = start_sigma_dut(ifname)
 
@@ -131,6 +137,12 @@ def test_sigma_dut_open(dev, apdev):
 
 def test_sigma_dut_psk_pmf(dev, apdev):
     """sigma_dut controlled PSK+PMF association"""
+    try:
+        run_sigma_dut_psk_pmf(dev, apdev)
+    finally:
+        dev[0].set("ignore_old_scan_res", "0")
+
+def run_sigma_dut_psk_pmf(dev, apdev):
     ifname = dev[0].ifname
     sigma = start_sigma_dut(ifname)
 
@@ -153,6 +165,12 @@ def test_sigma_dut_psk_pmf(dev, apdev):
 
 def test_sigma_dut_sta_override_rsne(dev, apdev):
     """sigma_dut and RSNE override on STA"""
+    try:
+        run_sigma_dut_sta_override_rsne(dev, apdev)
+    finally:
+        dev[0].set("ignore_old_scan_res", "0")
+
+def run_sigma_dut_sta_override_rsne(dev, apdev):
     ifname = dev[0].ifname
     sigma = start_sigma_dut(ifname)