From: Jouni Malinen Date: Wed, 12 Mar 2014 11:35:10 +0000 (+0200) Subject: tests: Check for AP-DISABLED when setting up AP X-Git-Tag: hostap_2_2~577 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8ad9dc21ad8de3a84dc5e1360834fd1b3c27253;p=thirdparty%2Fhostap.git tests: Check for AP-DISABLED when setting up AP This allows a critical error to be noticed more quickly and reported more clearly in the test log. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index 984e4cc86..83f070401 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -257,9 +257,11 @@ def add_ap(ifname, params, wait_enabled=True): hapd.set(f, v) hapd.enable() if wait_enabled: - ev = hapd.wait_event(["AP-ENABLED"], timeout=30) + ev = hapd.wait_event(["AP-ENABLED", "AP-DISABLED"], timeout=30) if ev is None: raise Exception("AP startup timed out") + if "AP-ENABLED" not in ev: + raise Exception("AP startup failed") return hapd def add_bss(phy, ifname, confname, ignore_error=False):