]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Skip hapd_ctrl_test_fail if TEST_* commands not included in build
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 30 Jan 2017 10:01:04 +0000 (12:01 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 30 Jan 2017 10:01:04 +0000 (12:01 +0200)
This test case was triggering false failures with hostapd build that did
not include TEST_* commands.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_hapd_ctrl.py

index 61b30203e43b8beeb55bc2af28105b2d40a0868a..d18a6b4d23da8187468b5c7f30419bbd12d1d2fb 100644 (file)
@@ -7,7 +7,7 @@
 from remotehost import remote_compatible
 import hostapd
 import hwsim_utils
-from utils import skip_with_fips, alloc_fail, fail_test
+from utils import skip_with_fips, alloc_fail, fail_test, HwsimSkip
 
 @remote_compatible
 def test_hapd_ctrl_status(dev, apdev):
@@ -914,6 +914,8 @@ def test_hapd_ctrl_test_fail(dev, apdev):
     ssid = "hapd-ctrl"
     params = { "ssid": ssid }
     hapd = hostapd.add_ap(apdev[0], params)
+    if "OK" not in hapd.request("TEST_ALLOC_FAIL 1:unknownfunc"):
+            raise HwsimSkip("TEST_ALLOC_FAIL not supported")
     if "OK" not in hapd.request("TEST_ALLOC_FAIL "):
         raise Exception("TEST_ALLOC_FAIL clearing failed")
     if "OK" not in hapd.request("TEST_FAIL "):