]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Detect invitation GO issues more quickly
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 18 Dec 2015 14:14:55 +0000 (16:14 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 18 Dec 2015 14:14:55 +0000 (16:14 +0200)
This speeds up and clarifies error reporting for cases where the GO
fails to start in invitation.

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

index ff6612f885a5fde623d21f5bdb3d330aeef0d17d..534390d66b5fa8d4f01375b02b2b083eaac014a4 100644 (file)
@@ -118,9 +118,12 @@ def invite(inv, resp, extra=None, persistent_reconnect=True):
     inv.global_request(cmd)
 
 def check_result(go, cli):
-    ev = go.wait_global_event(["P2P-GROUP-STARTED"], timeout=30)
+    ev = go.wait_global_event(["P2P-GROUP-STARTED",
+                               "Failed to start AP functionality"], timeout=30)
     if ev is None:
         raise Exception("Timeout on group re-invocation (on GO)")
+    if "P2P-GROUP-STARTED" not in ev:
+        raise Exception("GO failed to start the group for re-invocation")
     if "[PERSISTENT]" not in ev:
         raise Exception("Re-invoked group not marked persistent")
     go_res = go.group_form_result(ev)