tests: Fix test skipping for some DFS/VHT cases
Due to a typo and missing hapd variable initialization, some of the DFS and VHT test cases were marked as failures even though they were supposed to be marked as skipped in case the kernel and wireless-regdb did not have sufficient support for these modes. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
fb9adae466
commit
e246d7d5b3
2 changed files with 12 additions and 2 deletions
|
@ -82,7 +82,7 @@ def test_ap_vht80_params(dev, apdev):
|
|||
except Exception, e:
|
||||
if isinstance(e, Exception) and str(e) == "AP startup failed":
|
||||
if not vht_supported():
|
||||
raise HwsimSwkip("80 MHz channel not supported in regulatory information")
|
||||
raise HwsimSkip("80 MHz channel not supported in regulatory information")
|
||||
raise
|
||||
finally:
|
||||
dev[0].request("DISCONNECT")
|
||||
|
@ -323,9 +323,12 @@ def test_ap_vht80plus80(dev, apdev):
|
|||
"vht_oper_centr_freq_seg1_idx": "155" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params, wait_enabled=False)
|
||||
|
||||
ev = hapd2.wait_event(["AP-ENABLED"], timeout=5)
|
||||
ev = hapd2.wait_event(["AP-ENABLED", "AP-DISABLED"], timeout=5)
|
||||
if not ev:
|
||||
raise Exception("AP setup timed out(2)")
|
||||
if "AP-DISABLED" in ev:
|
||||
# Assume this failed due to missing regulatory update for now
|
||||
raise HwsimSkip("80+80 MHz channel not supported in regulatory information")
|
||||
|
||||
state = hapd2.get_status_field("state")
|
||||
if state != "ENABLED":
|
||||
|
|
|
@ -86,6 +86,7 @@ def dfs_simulate_radar(hapd):
|
|||
def test_dfs(dev, apdev):
|
||||
"""DFS CAC functionality on clear channel"""
|
||||
try:
|
||||
hapd = None
|
||||
hapd = start_dfs_ap(apdev[0], allow_failure=True)
|
||||
|
||||
ev = wait_dfs_event(hapd, "DFS-CAC-COMPLETED", 70)
|
||||
|
@ -138,6 +139,7 @@ def test_dfs(dev, apdev):
|
|||
def test_dfs_radar(dev, apdev):
|
||||
"""DFS CAC functionality with radar detected"""
|
||||
try:
|
||||
hapd = None
|
||||
hapd2 = None
|
||||
hapd = start_dfs_ap(apdev[0], allow_failure=True)
|
||||
time.sleep(1)
|
||||
|
@ -225,6 +227,7 @@ def test_dfs_radar_on_non_dfs_channel(dev, apdev):
|
|||
def test_dfs_radar_chanlist(dev, apdev):
|
||||
"""DFS chanlist when radar is detected"""
|
||||
try:
|
||||
hapd = None
|
||||
hapd = start_dfs_ap(apdev[0], chanlist="40 44", allow_failure=True)
|
||||
time.sleep(1)
|
||||
|
||||
|
@ -258,6 +261,7 @@ def test_dfs_radar_chanlist(dev, apdev):
|
|||
def test_dfs_radar_chanlist_vht80(dev, apdev):
|
||||
"""DFS chanlist when radar is detected and VHT80 configured"""
|
||||
try:
|
||||
hapd = None
|
||||
hapd = start_dfs_ap(apdev[0], chanlist="36", ht40=True, vht80=True,
|
||||
allow_failure=True)
|
||||
time.sleep(1)
|
||||
|
@ -295,6 +299,7 @@ def test_dfs_radar_chanlist_vht80(dev, apdev):
|
|||
def test_dfs_radar_chanlist_vht20(dev, apdev):
|
||||
"""DFS chanlist when radar is detected and VHT40 configured"""
|
||||
try:
|
||||
hapd = None
|
||||
hapd = start_dfs_ap(apdev[0], chanlist="36", vht20=True,
|
||||
allow_failure=True)
|
||||
time.sleep(1)
|
||||
|
@ -329,6 +334,7 @@ def test_dfs_radar_chanlist_vht20(dev, apdev):
|
|||
def test_dfs_radar_no_ht(dev, apdev):
|
||||
"""DFS chanlist when radar is detected and no HT configured"""
|
||||
try:
|
||||
hapd = None
|
||||
hapd = start_dfs_ap(apdev[0], chanlist="36", ht=False,
|
||||
allow_failure=True)
|
||||
time.sleep(1)
|
||||
|
@ -363,6 +369,7 @@ def test_dfs_radar_no_ht(dev, apdev):
|
|||
def test_dfs_radar_ht40minus(dev, apdev):
|
||||
"""DFS chanlist when radar is detected and HT40- configured"""
|
||||
try:
|
||||
hapd = None
|
||||
hapd = start_dfs_ap(apdev[0], chanlist="36", ht40minus=True,
|
||||
allow_failure=True)
|
||||
time.sleep(1)
|
||||
|
|
Loading…
Reference in a new issue