]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: More workarounds for cfg80211 regulatory state clearing (ap_open)
authorJouni Malinen <j@w1.fi>
Sun, 6 Jan 2019 11:21:19 +0000 (13:21 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 6 Jan 2019 11:21:19 +0000 (13:21 +0200)
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 <j@w1.fi>
tests/hwsim/test_ap_open.py

index 7e4a8c11eb9b69f4f29864e18a8c85ace567a071..de7c6d4160e2f81b4010bceb76b263a34789a56f 100644 (file)
@@ -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",