diff mbox series

[23/32] tests: Fix prefer_vht40 false negative by using common finalizer

Message ID 20190625015109.6705-23-masashi.honma@gmail.com
State Accepted
Headers show
Series [01/32] tests: Fix nfc_wps_handover_chan14 false negative by using common finalizer | expand

Commit Message

Masashi Honma June 25, 2019, 1:51 a.m. UTC
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 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/tests/hwsim/test_ap_vht.py b/tests/hwsim/test_ap_vht.py
index 62841a1b6..e2cbcb988 100644
--- a/tests/hwsim/test_ap_vht.py
+++ b/tests/hwsim/test_ap_vht.py
@@ -956,11 +956,9 @@  def test_prefer_vht40(dev, apdev):
         if est != "135001":
             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"""