tests: Speed up p2ps_connect_adv_go_persistent
authorJouni Malinen <j@w1.fi>
Sun, 11 Oct 2015 16:59:51 +0000 (19:59 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 11 Oct 2015 18:42:03 +0000 (21:42 +0300)
Stop the pending P2P_LISTEN operation priot to issuing P2P_GROUP_ADD to
start a GO. This avoids excessively long wait for the previous Listen
step to complete before being able to start the GO. This makes
p2ps_connect_adv_go_persistent take significantly less time.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_p2ps.py

index ae37366..8a746af 100644 (file)
@@ -292,6 +292,7 @@ def p2ps_connect_pd(dev0, dev1, ev0, ev1, pin=None, join_extra=""):
 
     # Persistent Connection (todo: handle frequency)
     if persist0 is not None:
+        dev0.p2p_stop_find()
         if "OK" not in dev0.global_request("P2P_GROUP_ADD persistent=" + persist0 + " freq=2412"):
             raise Exception("Could not re-start persistent group")
         ev0 = dev0.wait_global_event(["P2P-GROUP-STARTED"], timeout=10)