]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix prefer_vht40 false negative by using common finalizer
authorMasashi Honma <masashi.honma@gmail.com>
Tue, 25 Jun 2019 01:51:00 +0000 (10:51 +0900)
committerJouni Malinen <j@w1.fi>
Wed, 26 Jun 2019 17:42:20 +0000 (20:42 +0300)
prefer_vht40 fails with this message.

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

This patch fixes the issue.

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

index d450624758c5a9de0685d43b92e028e3fc5899a8..a5a13fdfc8821456f1f1228d6e1294ea4520cfcf 100644 (file)
@@ -962,10 +962,9 @@ def test_prefer_vht40(dev, apdev):
             raise Exception("Unexpected BSS1 est_throughput: " + est)
     finally:
         dev[0].request("DISCONNECT")
-        if hapd2:
-            hapd2.request("DISABLE")
-        subprocess.call(['iw', 'reg', 'set', '00'])
-        dev[0].flush_scan_cache()
+        disable_hapd(hapd)
+        disable_hapd(hapd2)
+        clear_regdom_dev(dev)
 
 def test_ap_vht80_pwr_constraint(dev, apdev):
     """VHT with 80 MHz channel width and local power constraint"""