1# hostapd error paths
2# Copyright (c) 2024, Jouni Malinen <j@w1.fi>
3#
4# This software may be distributed under the terms of the BSD license.
5# See README for more details.
6
7import hostapd
8from utils import *
9
10def test_hostapd_error_drv_init(dev, apdev):
11    """hostapd error path on driver interface initialization failure"""
12    hapd = hostapd.add_ap(apdev[0], {"ssid": "ctrl"})
13    with fail_test(hapd, 1, "nl80211_setup_ap"):
14        hapd1 = hostapd.add_ap(apdev[1], {"ssid": "open"}, no_enable=True)
15        if "FAIL" not in hapd1.request("ENABLE"):
16            raise Exception("ENABLE succeeded unexpectedly")
17