[PATCH 11/32] tests: Fix rrm_beacon_req_passive_scan_vht160 false negative by using common finalizer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rrm_beacon_req_passive_scan_vht160 fails with this message.

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

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx>
---
 tests/hwsim/test_rrm.py | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index 9f2351544..d3343bb0e 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -17,7 +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 utils import disable_hapd, clear_regdom_dev, clear_regdom
 from test_ap_ht import clear_scan_cache
 from remotehost import remote_compatible
 from test_ap_vht import vht_supported
@@ -1714,12 +1714,7 @@ def test_rrm_beacon_req_passive_scan_vht160(dev, apdev):
             raise HwsimSkip("ZA regulatory rule likely did not have DFS requirement removed")
         raise
     finally:
-        if hapd:
-            hapd.request("DISABLE")
-        dev[0].disconnect_and_stop_scan()
-        subprocess.call(['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_rrm_beacon_req_ap_errors(dev, apdev):
     """Beacon request - AP error cases"""
-- 
2.17.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux