Parcourir la source

tests: Allow SMPS test case to be skipped

ap_ht_smps needs relatively recern kernel support, so allow it to be
skipped rather than claimed as failure, in case hostapd startup fails.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen il y a 10 ans
Parent
commit
752d58c775
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      tests/hwsim/test_ap_ht.py

+ 5 - 1
tests/hwsim/test_ap_ht.py

@@ -766,7 +766,11 @@ def test_ap_ht40_csa3(dev, apdev):
 def test_ap_ht_smps(dev, apdev):
     """SMPS AP configuration options"""
     params = { "ssid": "ht1", "ht_capab": "[SMPS-STATIC]" }
-    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+    try:
+        hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+    except:
+        logger.info("Assume mac80211_hwsim was not recent enough to support SMPS")
+        return "skip"
     params = { "ssid": "ht2", "ht_capab": "[SMPS-DYNAMIC]" }
     hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)