]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix wep_ht_vht false negative by using common finalizer
authorMasashi Honma <masashi.honma@gmail.com>
Thu, 27 Jun 2019 05:44:51 +0000 (14:44 +0900)
committerJouni Malinen <j@w1.fi>
Tue, 30 Jul 2019 20:46:57 +0000 (23:46 +0300)
wep_ht_vht fails with this message:

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

hostap commit 91b6eba7732354ed3dfe0aa9715dc4c0746e3336
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
tests/hwsim/test_wep.py

index 3180184603c79290b03a5d2ff49dd981d64b0db8..d6af730aea6adcbe675c829546f0bf4a78d4d053 100644 (file)
@@ -11,6 +11,7 @@ import subprocess
 from remotehost import remote_compatible
 import hostapd
 import hwsim_utils
+from utils import clear_regdom
 
 @remote_compatible
 def test_wep_open_auth(dev, apdev):
@@ -119,10 +120,7 @@ def test_wep_ht_vht(dev, apdev):
             raise Exception("Unexpected STATUS secondary_channel value")
     finally:
         dev[0].request("DISCONNECT")
-        if hapd:
-            hapd.request("DISABLE")
-        subprocess.call(['iw', 'reg', 'set', '00'])
-        dev[0].flush_scan_cache()
+        clear_regdom(hapd, dev)
 
 def test_wep_ifdown(dev, apdev):
     """AP with WEP and external ifconfig down"""