tests: Fix scan_dfs false negative by using common finalizer
scan_dfs fails with this message. --------------- wlan0: Country code not reset back to 00: is US wlan0: Country code cleared back to 00 --------------- This patch fixes the issue. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This commit is contained in:
parent
08d3b3df99
commit
9a1046a7a1
1 changed files with 2 additions and 2 deletions
|
@ -16,6 +16,7 @@ import subprocess
|
|||
import hostapd
|
||||
from wpasupplicant import WpaSupplicant
|
||||
from utils import HwsimSkip, fail_test, alloc_fail, wait_fail_trigger, parse_ie
|
||||
from utils import clear_regdom_dev
|
||||
from tshark import run_tshark
|
||||
from test_ap_csa import switch_channel, wait_channel_switch, csa_supported
|
||||
|
||||
|
@ -974,8 +975,7 @@ def test_scan_dfs(dev, apdev, params):
|
|||
try:
|
||||
_test_scan_dfs(dev, apdev, params)
|
||||
finally:
|
||||
subprocess.call(['iw', 'reg', 'set', '00'])
|
||||
time.sleep(0.1)
|
||||
clear_regdom_dev(dev)
|
||||
|
||||
def _test_scan_dfs(dev, apdev, params):
|
||||
subprocess.call(['iw', 'reg', 'set', 'US'])
|
||||
|
|
Loading…
Reference in a new issue