tests: Fix wep_ht_vht false negative by using common finalizer

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 91b6eba773
'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>
This commit is contained in:
Masashi Honma 2019-06-27 14:44:51 +09:00 committed by Jouni Malinen
parent cb5f7f552f
commit cbe7e44d1b

View file

@ -11,6 +11,7 @@ import subprocess
from remotehost import remote_compatible from remotehost import remote_compatible
import hostapd import hostapd
import hwsim_utils import hwsim_utils
from utils import clear_regdom
@remote_compatible @remote_compatible
def test_wep_open_auth(dev, apdev): 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") raise Exception("Unexpected STATUS secondary_channel value")
finally: finally:
dev[0].request("DISCONNECT") dev[0].request("DISCONNECT")
if hapd: clear_regdom(hapd, dev)
hapd.request("DISABLE")
subprocess.call(['iw', 'reg', 'set', '00'])
dev[0].flush_scan_cache()
def test_wep_ifdown(dev, apdev): def test_wep_ifdown(dev, apdev):
"""AP with WEP and external ifconfig down""" """AP with WEP and external ifconfig down"""