]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Wait a bit after 'iw reg set 00' at the end of test cases
authorJouni Malinen <j@w1.fi>
Tue, 1 Jan 2019 09:45:50 +0000 (11:45 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 1 Jan 2019 09:46:50 +0000 (11:46 +0200)
This is needed to avoid leaving unexpected cfg80211 regulatory country
code in place at the point when a test case terminates.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_acs.py
tests/hwsim/test_ap_ht.py
tests/hwsim/test_ap_track.py
tests/hwsim/test_ap_vht.py
tests/hwsim/test_dfs.py
tests/hwsim/test_dpp.py
tests/hwsim/test_scan.py

index 151c5b6f16bd6fc49741396de76335c1784bf580..94ff38a6170b7329a0bff40041bfbb0fc668261f 100644 (file)
@@ -327,6 +327,7 @@ def test_ap_acs_vht160_scan_disable(dev, apdev):
     time.sleep(3)
     hapd.request("DISABLE")
     hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
+    time.sleep(0.1)
 
 def test_ap_acs_bias(dev, apdev):
     """Automatic channel selection with bias values"""
index c0a16c1c70506cb77b97bf287c891d574fab7b99..e6f6502f46596dd775827cda2af169e32cdfaa90 100644 (file)
@@ -30,6 +30,7 @@ def set_world_reg(apdev0=None, apdev1=None, dev0=None):
         hostapd.cmd_execute(apdev1, ['iw', 'reg', 'set', '00'])
     if dev0:
         dev0.cmd_execute(['iw', 'reg', 'set', '00'])
+    time.sleep(0.1)
 
 def test_ap_ht40_scan(dev, apdev):
     """HT40 co-ex scan"""
index 8965af9e6194f7d9cdb68fc415e8b75ab5fd1e44..765aa4314311c39e02314f6653365125c67c20fa 100644 (file)
@@ -19,6 +19,7 @@ def test_ap_track_sta(dev, apdev):
         _test_ap_track_sta(dev, apdev)
     finally:
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def _test_ap_track_sta(dev, apdev):
     params = { "ssid": "track",
@@ -85,6 +86,7 @@ def test_ap_track_sta_no_probe_resp(dev, apdev):
         _test_ap_track_sta_no_probe_resp(dev, apdev)
     finally:
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def _test_ap_track_sta_no_probe_resp(dev, apdev):
     dev[0].flush_scan_cache()
@@ -127,6 +129,7 @@ def test_ap_track_sta_no_auth(dev, apdev):
         _test_ap_track_sta_no_auth(dev, apdev)
     finally:
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def _test_ap_track_sta_no_auth(dev, apdev):
     params = { "ssid": "track",
@@ -173,6 +176,7 @@ def test_ap_track_sta_no_auth_passive(dev, apdev):
         _test_ap_track_sta_no_auth_passive(dev, apdev)
     finally:
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def _test_ap_track_sta_no_auth_passive(dev, apdev):
     dev[0].flush_scan_cache()
@@ -230,6 +234,7 @@ def test_ap_track_sta_force_5ghz(dev, apdev):
         _test_ap_track_sta_force_5ghz(dev, apdev)
     finally:
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def _test_ap_track_sta_force_5ghz(dev, apdev):
     params = { "ssid": "track",
@@ -264,6 +269,7 @@ def test_ap_track_sta_force_2ghz(dev, apdev):
         _test_ap_track_sta_force_2ghz(dev, apdev)
     finally:
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def _test_ap_track_sta_force_2ghz(dev, apdev):
     params = { "ssid": "track",
index 64c0921b0cd8df6a47909021048d98d2879e2b2c..2cd1f995b169ee0f3a1eeae919f16bf81d9d667b 100644 (file)
@@ -199,6 +199,7 @@ def test_ap_vht80_invalid(dev, apdev):
         if hapd:
             hapd.request("DISABLE")
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def test_ap_vht80_invalid2(dev, apdev):
     """VHT with invalid 80 MHz channel configuration (seg0)"""
@@ -229,6 +230,7 @@ def test_ap_vht80_invalid2(dev, apdev):
         if hapd:
             hapd.request("DISABLE")
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def test_ap_vht_20(devs, apdevs):
     """VHT and 20 MHz channel"""
@@ -309,6 +311,7 @@ def test_ap_vht_capab_not_supported(dev, apdev):
                 raise Exception("Unexpected SET failure")
     finally:
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def test_ap_vht160(dev, apdev):
     """VHT with 160 MHz channel width (1)"""
@@ -569,6 +572,7 @@ def test_ap_vht160_no_ht40(dev, apdev):
         if hapd:
             hapd.request("DISABLE")
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def test_ap_vht80plus80(dev, apdev):
     """VHT with 80+80 MHz channel width"""
@@ -672,6 +676,7 @@ def test_ap_vht80plus80_invalid(dev, apdev):
         if hapd:
             hapd.request("DISABLE")
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def test_ap_vht80_csa(dev, apdev):
     """VHT with 80 MHz channel width and CSA"""
index ae07b90d72736ba60458e0e9fc669fea4ce9c610..5983324d5b2e8aa1bf0141bd84865246cb1cb35c 100644 (file)
@@ -299,6 +299,7 @@ def test_dfs_radar2(dev, apdev):
         if hapd:
             hapd.request("DISABLE")
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 @remote_compatible
 def test_dfs_radar_on_non_dfs_channel(dev, apdev):
index 256d1741afba520d11a9a1336024217398cc2a2b..a59e05b3daee496bb6afb8bd1be6fe88c4386b07 100644 (file)
@@ -2829,6 +2829,7 @@ def test_dpp_pkex_5ghz(dev, apdev):
         dev[0].request("SET country 00")
         dev[1].request("SET country 00")
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def run_dpp_pkex_5ghz(dev, apdev):
     check_dpp_capab(dev[0])
index 1ee9ef2650ae24cc7600d7050c989cfc3273a3ee..fc5ebbe9ab3560cab3f3f54e633b087da337680f 100644 (file)
@@ -975,6 +975,7 @@ def test_scan_dfs(dev, apdev, params):
         _test_scan_dfs(dev, apdev, params)
     finally:
         subprocess.call(['iw', 'reg', 'set', '00'])
+        time.sleep(0.1)
 
 def _test_scan_dfs(dev, apdev, params):
     subprocess.call(['iw', 'reg', 'set', 'US'])