tests: Fix p2p_set_discoverability waiting for CTRL-EVENT-CONNECTED
authorAvraham Stern <avraham.stern@intel.com>
Wed, 17 Jun 2015 13:24:58 +0000 (16:24 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 19 Jun 2015 08:27:15 +0000 (11:27 +0300)
Wait on the group control interface to support configurations that
use a dedicated P2P Device interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
tests/hwsim/test_p2p_set.py

index eb3b263..ba1e7ce 100644 (file)
@@ -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):