[PATCH 12/16] tests: Fix p2p_set_discoverability waiting for CTRL-EVENT-CONNECTED

Ilan Peer ilan.peer
Wed Jun 17 06:24:58 PDT 2015


From: Avraham Stern <avraham.stern at intel.com>

Wait on the group control interface to support configurations that
use a dedicated P2P device interface.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 tests/hwsim/test_p2p_set.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/hwsim/test_p2p_set.py b/tests/hwsim/test_p2p_set.py
index eb3b263..ba1e7ce 100644
--- a/tests/hwsim/test_p2p_set.py
+++ b/tests/hwsim/test_p2p_set.py
@@ -61,7 +61,9 @@ def test_p2p_set_discoverability(dev):
         raise Exception("P2P_SET discoverability 1 failed")
     dev[1].dump_monitor()
     dev[1].group_request("REASSOCIATE")
-    dev[1].wait_connected(timeout=20)
+    ev = dev[1].wait_group_event(["CTRL-EVENT-CONNECTED"], timeout=20)
+    if ev is None:
+        raise Exception("Connection timed out")
 
     dev[2].request("P2P_FLUSH")
     if not dev[2].discover_peer(addr1, timeout=10):
-- 
1.9.1




More information about the Hostap mailing list