From 6e9554e3072c6c670f4f3050f0349af49131e883 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 18 Dec 2015 16:14:55 +0200 Subject: [PATCH] tests: Detect invitation GO issues more quickly This speeds up and clarifies error reporting for cases where the GO fails to start in invitation. Signed-off-by: Jouni Malinen --- tests/hwsim/p2p_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/p2p_utils.py b/tests/hwsim/p2p_utils.py index ff6612f88..534390d66 100644 --- a/tests/hwsim/p2p_utils.py +++ b/tests/hwsim/p2p_utils.py @@ -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)