aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-10-03 08:35:42 (GMT)
committerJouni Malinen <j@w1.fi>2016-10-03 08:35:42 (GMT)
commitc64b454a2f81c53e644abb888e159943282c8d29 (patch)
treee2f4a2c429ae5fd2e0bdf5faa11aa5b2bd14c69d /tests
parent9d3f4a74b6940aaa7920370da8dab3ca401e7101 (diff)
downloadhostap-c64b454a2f81c53e644abb888e159943282c8d29.zip
hostap-c64b454a2f81c53e644abb888e159943282c8d29.tar.gz
hostap-c64b454a2f81c53e644abb888e159943282c8d29.tar.bz2
tests: Fix wpas_ctrl_sched_scan_plans without WPA_TRACE
This test case did not clear sched_scan_plans if alloc_fail() resulted in skipping the test case. This would result in the following autoscan_exponential and autoscan_periodic test cases failing. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_wpas_ctrl.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py
index 96ed551..76731e5 100644
--- a/tests/hwsim/test_wpas_ctrl.py
+++ b/tests/hwsim/test_wpas_ctrl.py
@@ -1913,12 +1913,14 @@ def test_wpas_ctrl_sched_scan_plans(dev, apdev):
"""wpa_supplicant sched_scan_plans parsing"""
dev[0].request("SET sched_scan_plans foo")
dev[0].request("SET sched_scan_plans 10:100 20:200 30")
- with alloc_fail(dev[0], 1, "wpas_sched_scan_plans_set"):
- dev[0].request("SET sched_scan_plans 10:100")
dev[0].request("SET sched_scan_plans 4294967295:0")
dev[0].request("SET sched_scan_plans 1 1")
dev[0].request("SET sched_scan_plans ")
- dev[0].request("SET sched_scan_plans ")
+ try:
+ with alloc_fail(dev[0], 1, "wpas_sched_scan_plans_set"):
+ dev[0].request("SET sched_scan_plans 10:100")
+ finally:
+ dev[0].request("SET sched_scan_plans ")
def test_wpas_ctrl_signal_monitor(dev, apdev):
"""wpa_supplicant SIGNAL_MONITOR command"""