From 9aac73121be5ee186719653d713b3c1c081ae08a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 6 Jan 2019 13:21:19 +0200 Subject: [PATCH] tests: More workarounds for cfg80211 regulatory state clearing (ap_open) Add even more workarounds for cfg80211 regulatory state clearing since these DFS test cases seem to be the most likely ones to fail due to country=98 issues. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_open.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py index 7e4a8c11e..de7c6d416 100644 --- a/tests/hwsim/test_ap_open.py +++ b/tests/hwsim/test_ap_open.py @@ -15,7 +15,7 @@ import os import hostapd import hwsim_utils from tshark import run_tshark -from utils import alloc_fail, fail_test, wait_fail_trigger +from utils import * from wpasupplicant import WpaSupplicant from test_ap_ht import set_world_reg @@ -770,14 +770,7 @@ def _test_ap_open_country(dev, apdev, country_code, country3): hapd = None hapd = run_ap_open_country(dev, apdev, country_code, country3) finally: - if hapd: - hapd.request("DISABLE") - dev[0].request("DISCONNECT") - dev[0].request("ABORT_SCAN") - dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5) - set_world_reg(apdev[0], apdev[1], dev[0]) - dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5) - dev[0].flush_scan_cache() + clear_regdom(hapd, dev) def run_ap_open_country(dev, apdev, country_code, country3): hapd = hostapd.add_ap(apdev[0], { "ssid": "open",