From 65fa9d96ae60d06dc42ff018ba3a6e412ebcf90f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 3 Jul 2017 15:58:58 +0300 Subject: [PATCH] tests: Clear ignore_old_scan_res after sigma_dut test cases 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 --- tests/hwsim/test_sigma_dut.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py index 76e335f74..9149429e3 100644 --- a/tests/hwsim/test_sigma_dut.py +++ b/tests/hwsim/test_sigma_dut.py @@ -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)