tests: Fix ap_track_taxonomy to clear country code setting
authorJouni Malinen <j@w1.fi>
Fri, 30 Sep 2016 20:46:17 +0000 (23:46 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 30 Sep 2016 20:46:17 +0000 (23:46 +0300)
This test case could have ended with the station devices still in US
regulatory domain and that could make a following test case fail in some
sequences. For example, "ap_track_taxonomy ibss_5ghz" sequence made
ibss_5ghz fail to see the regdom change event since there was not one
due to the US country code already being in use at the beginning of the
test case. Fix this by clearing the country code at the end of
ap_track_taxonomy.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_track.py

index 64ca843..75664a4 100644 (file)
@@ -290,6 +290,10 @@ def test_ap_track_taxonomy(dev, apdev):
         _test_ap_track_taxonomy(dev, apdev)
     finally:
         dev[1].request("SET p2p_disabled 0")
+        subprocess.call(['iw', 'reg', 'set', '00'])
+        dev[0].flush_scan_cache()
+        dev[1].flush_scan_cache()
+        dev[2].flush_scan_cache()
 
 def _test_ap_track_taxonomy(dev, apdev):
     params = { "ssid": "track",