aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-01-28 22:48:16 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-28 23:32:25 (GMT)
commit0d46095ec87bc6884efde620e03fdc92c98e492f (patch)
treefdda717bf43f919b592ff1acf0eb3222c4f3c4fa /tests
parentb85eaca0ab8297606e3e88f1dab79c093709dceb (diff)
downloadhostap-0d46095ec87bc6884efde620e03fdc92c98e492f.zip
hostap-0d46095ec87bc6884efde620e03fdc92c98e492f.tar.gz
hostap-0d46095ec87bc6884efde620e03fdc92c98e492f.tar.bz2
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_rrm.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index 970cd82..09117a7 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -23,6 +23,11 @@ def check_rrm_support(dev):
if rrm & 0x5 != 0x5 and rrm & 0x10 != 0x10:
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"
lci="01000800101298c0b512926666f6c2f1001c00004104050000c00012"
civic="01000b0011223344556677889900998877665544332211aabbccddeeff"
@@ -1553,6 +1558,7 @@ def test_rrm_req_proto(dev, apdev):
def test_rrm_link_measurement(dev, apdev):
"""Radio measurement request - link measurement"""
+ check_tx_power_support(dev[0])
params = { "ssid": "rrm", "rrm_beacon_report": "1" }
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
bssid = hapd.own_addr()
@@ -1573,6 +1579,7 @@ def test_rrm_link_measurement(dev, apdev):
def test_rrm_link_measurement_oom(dev, apdev):
"""Radio measurement request - link measurement OOM"""
+ check_tx_power_support(dev[0])
params = { "ssid": "rrm", "rrm_beacon_report": "1" }
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
bssid = hapd.own_addr()