tests: dpp_bootstrap_gen_failures to match implementation changes

The separate dpp_bootstrap_gen() functions were merged into a single
one, so the test case needs a matching change to avoid failures.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-03-24 16:48:31 +02:00
parent 87d8435cf9
commit 5be5b81678

View file

@ -4082,7 +4082,7 @@ def test_dpp_configurator_id_unknown(dev, apdev):
hapd = hostapd.add_ap(apdev[0], {"ssid": "unconfigured"}) hapd = hostapd.add_ap(apdev[0], {"ssid": "unconfigured"})
run_dpp_configurator_id_unknown(hapd) run_dpp_configurator_id_unknown(hapd)
def run_dpp_bootstrap_gen_failures(dev, hostapd): def run_dpp_bootstrap_gen_failures(dev):
check_dpp_capab(dev) check_dpp_capab(dev)
tests = ["type=unsupported", tests = ["type=unsupported",
@ -4113,7 +4113,7 @@ def run_dpp_bootstrap_gen_failures(dev, hostapd):
if "FAIL" not in dev.request("DPP_BOOTSTRAP_INFO %d" % id): if "FAIL" not in dev.request("DPP_BOOTSTRAP_INFO %d" % id):
raise Exception("Failure not reported") raise Exception("Failure not reported")
func = "hostapd_dpp_bootstrap_gen" if hostapd else "wpas_dpp_bootstrap_gen" func = "dpp_bootstrap_gen"
with alloc_fail(dev, 1, "=" + func): with alloc_fail(dev, 1, "=" + func):
if "FAIL" not in dev.request("DPP_BOOTSTRAP_GEN type=qrcode"): if "FAIL" not in dev.request("DPP_BOOTSTRAP_GEN type=qrcode"):
raise Exception("Command accepted unexpectedly") raise Exception("Command accepted unexpectedly")
@ -4127,9 +4127,9 @@ def run_dpp_bootstrap_gen_failures(dev, hostapd):
def test_dpp_bootstrap_gen_failures(dev, apdev): def test_dpp_bootstrap_gen_failures(dev, apdev):
"""DPP_BOOTSTRAP_GEN/REMOVE/GET_URI/INFO error cases""" """DPP_BOOTSTRAP_GEN/REMOVE/GET_URI/INFO error cases"""
run_dpp_bootstrap_gen_failures(dev[0], False) run_dpp_bootstrap_gen_failures(dev[0])
hapd = hostapd.add_ap(apdev[0], {"ssid": "unconfigured"}) hapd = hostapd.add_ap(apdev[0], {"ssid": "unconfigured"})
run_dpp_bootstrap_gen_failures(hapd, True) run_dpp_bootstrap_gen_failures(hapd)
def test_dpp_listen_continue(dev, apdev): def test_dpp_listen_continue(dev, apdev):
"""DPP and continue listen state""" """DPP and continue listen state"""