]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make autogo_join_auto_go_neg more robust
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 1 Dec 2015 22:40:17 +0000 (00:40 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 2 Dec 2015 10:37:12 +0000 (12:37 +0200)
It was possible for this test case to fail if the single attempt of
discovering the peer as part of the scan for join failed. This test case
was useful in combination with another test case:
ap_hs20_fetch_osu autogo_join_auto_go_neg

However, there is now an explicit test case (discovery_after_gas) for
this, so autogo_join_auto_go_neg can be made more robust without losing
testing coverage.

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

index edf42d14fc423528d610fbd306400fafdc77988b..c883626ae746b77569b74590ee1daade2b6c7f93 100644 (file)
@@ -532,6 +532,9 @@ def test_autogo_join_auto_go_neg(dev):
     dev[1].flush_scan_cache()
     dev[0].p2p_listen()
     addr = dev[0].p2p_dev_addr()
+    if not dev[1].discover_peer(addr, social=True):
+        raise Exception("Peer not found")
+    dev[1].p2p_stop_find()
     if "OK" not in dev[1].global_request("P2P_CONNECT " + addr + " pbc auto"):
         raise Exception("P2P_CONNECT failed")