diff mbox series

[10/32] tests: Fix rrm_beacon_req_table_vht false negative by using common finalizer

Message ID 20190625015109.6705-10-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:50 a.m. UTC
rrm_beacon_req_table_vht 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_rrm.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index 1ac66fe23..9f2351544 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -17,6 +17,7 @@  import time
 import hostapd
 from wpasupplicant import WpaSupplicant
 from utils import HwsimSkip, alloc_fail, fail_test, wait_fail_trigger
+from utils import disable_hapd, clear_regdom_dev
 from test_ap_ht import clear_scan_cache
 from remotehost import remote_compatible
 from test_ap_vht import vht_supported
@@ -1253,11 +1254,9 @@  def test_rrm_beacon_req_table_vht(dev, apdev):
                 raise HwsimSkip("80 MHz channel not supported in regulatory information")
         raise
     finally:
-        dev[0].request("DISCONNECT")
-        if hapd:
-            hapd.request("DISABLE")
-        subprocess.call(['iw', 'reg', 'set', '00'])
-        dev[0].flush_scan_cache()
+        disable_hapd(hapd)
+        disable_hapd(hapd2)
+        clear_regdom_dev(dev)
 
 @remote_compatible
 def test_rrm_beacon_req_active(dev, apdev):