]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix dfs_radar2 false negative by using common finalizer
authorMasashi Honma <masashi.honma@gmail.com>
Thu, 6 Jun 2019 05:27:37 +0000 (14:27 +0900)
committerJouni Malinen <j@w1.fi>
Sun, 23 Jun 2019 15:03:51 +0000 (18:03 +0300)
dfs_radar2 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_dfs.py

index 38c3373f2f483269564b2e9697053fd034f469b6..bd09840f11b7a44813abb4f44751c8c52441222f 100644 (file)
@@ -275,10 +275,7 @@ def test_dfs_radar2(dev, apdev):
 
         wait_dfs_event(hapd, None, 5)
     finally:
-        if hapd:
-            hapd.request("DISABLE")
-        subprocess.call(['iw', 'reg', 'set', '00'])
-        time.sleep(0.1)
+        clear_regdom(hapd, dev)
 
 @remote_compatible
 def test_dfs_radar_on_non_dfs_channel(dev, apdev):