tests: Skip rrm_link_measurement tests if kernel support is not available
rrm_link_measurement and rrm_link_measurement_oom test cases were causing incorrect failures when executed with a kernel version that does not modify mac80211_hwsim to support TX power insertion. Fix this by checking for that capability and skipping the test cases if the kernel does not support this. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
b85eaca0ab
commit
0d46095ec8
1 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,11 @@ def check_rrm_support(dev):
|
||||||
if rrm & 0x5 != 0x5 and rrm & 0x10 != 0x10:
|
if rrm & 0x5 != 0x5 and rrm & 0x10 != 0x10:
|
||||||
raise HwsimSkip("Required RRM capabilities are not supported")
|
raise HwsimSkip("Required RRM capabilities are not supported")
|
||||||
|
|
||||||
|
def check_tx_power_support(dev):
|
||||||
|
rrm = int(dev.get_driver_status_field("capa.rrm_flags"), 16)
|
||||||
|
if rrm & 0x8 != 0x8:
|
||||||
|
raise HwsimSkip("Required RRM capabilities are not supported")
|
||||||
|
|
||||||
nr="00112233445500000000510107"
|
nr="00112233445500000000510107"
|
||||||
lci="01000800101298c0b512926666f6c2f1001c00004104050000c00012"
|
lci="01000800101298c0b512926666f6c2f1001c00004104050000c00012"
|
||||||
civic="01000b0011223344556677889900998877665544332211aabbccddeeff"
|
civic="01000b0011223344556677889900998877665544332211aabbccddeeff"
|
||||||
|
@ -1553,6 +1558,7 @@ def test_rrm_req_proto(dev, apdev):
|
||||||
|
|
||||||
def test_rrm_link_measurement(dev, apdev):
|
def test_rrm_link_measurement(dev, apdev):
|
||||||
"""Radio measurement request - link measurement"""
|
"""Radio measurement request - link measurement"""
|
||||||
|
check_tx_power_support(dev[0])
|
||||||
params = { "ssid": "rrm", "rrm_beacon_report": "1" }
|
params = { "ssid": "rrm", "rrm_beacon_report": "1" }
|
||||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||||
bssid = hapd.own_addr()
|
bssid = hapd.own_addr()
|
||||||
|
@ -1573,6 +1579,7 @@ def test_rrm_link_measurement(dev, apdev):
|
||||||
|
|
||||||
def test_rrm_link_measurement_oom(dev, apdev):
|
def test_rrm_link_measurement_oom(dev, apdev):
|
||||||
"""Radio measurement request - link measurement OOM"""
|
"""Radio measurement request - link measurement OOM"""
|
||||||
|
check_tx_power_support(dev[0])
|
||||||
params = { "ssid": "rrm", "rrm_beacon_report": "1" }
|
params = { "ssid": "rrm", "rrm_beacon_report": "1" }
|
||||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||||
bssid = hapd.own_addr()
|
bssid = hapd.own_addr()
|
||||||
|
|
Loading…
Reference in a new issue