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
|
import hostapd
|
||||||
from wpasupplicant import WpaSupplicant
|
from wpasupplicant import WpaSupplicant
|
||||||
from utils import HwsimSkip, fail_test, alloc_fail, wait_fail_trigger, parse_ie
|
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 tshark import run_tshark
|
||||||
from test_ap_csa import switch_channel, wait_channel_switch, csa_supported
|
from test_ap_csa import switch_channel, wait_channel_switch, csa_supported
|
||||||
|
|
||||||
|
@ -974,8 +975,7 @@ def test_scan_dfs(dev, apdev, params):
|
||||||
try:
|
try:
|
||||||
_test_scan_dfs(dev, apdev, params)
|
_test_scan_dfs(dev, apdev, params)
|
||||||
finally:
|
finally:
|
||||||
subprocess.call(['iw', 'reg', 'set', '00'])
|
clear_regdom_dev(dev)
|
||||||
time.sleep(0.1)
|
|
||||||
|
|
||||||
def _test_scan_dfs(dev, apdev, params):
|
def _test_scan_dfs(dev, apdev, params):
|
||||||
subprocess.call(['iw', 'reg', 'set', 'US'])
|
subprocess.call(['iw', 'reg', 'set', 'US'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue