]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix ap_acs_vht160 false negative by using common finalizer
authorMasashi Honma <masashi.honma@gmail.com>
Thu, 27 Jun 2019 05:44:49 +0000 (14:44 +0900)
committerJouni Malinen <j@w1.fi>
Tue, 30 Jul 2019 20:46:46 +0000 (23:46 +0300)
ap_acs_vht160 fails with this message:

---------------
wlan0: Country code not reset back to 00: is ZA
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba7732354ed3dfe0aa9715dc4c0746e3336
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
tests/hwsim/test_ap_acs.py

index 14ed65b0d11ea13cbb04a6d0663c21efd830f471..43a34dd783d434a6f930fb5b629205c0f20659a8 100644 (file)
@@ -272,12 +272,7 @@ def test_ap_acs_vht160(dev, apdev):
             dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
             dev[0].wait_regdom(country_ie=True)
     finally:
-        if hapd:
-            hapd.request("DISABLE")
-        dev[0].disconnect_and_stop_scan()
-        hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
-        dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
-        dev[0].flush_scan_cache()
+        clear_regdom(hapd, dev)
 
 def test_ap_acs_vht160_scan_disable(dev, apdev):
     """Automatic channel selection for VHT160 and DISABLE during scan"""