]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make go_search_non_social more robust
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 7 Feb 2017 09:08:24 +0000 (11:08 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 7 Feb 2017 09:08:24 +0000 (11:08 +0200)
Try the initial scan on the operating channel twice before claiming a
test failure. It is possible for an active scan to fail to see the GO
especially if running the test under heavy load.

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

index 7d3610598d5235d2958305114556a3ad8d473f43..1bd362ebc362bee1a561039d27a089feb4b5ea4d 100644 (file)
@@ -628,7 +628,11 @@ def test_go_search_non_social(dev):
     dev[1].p2p_find(freq=2422)
     ev = dev[1].wait_global_event(["P2P-DEVICE-FOUND"], timeout=3.5)
     if ev is None:
-        raise Exception("Did not find GO quickly enough")
+        dev[1].p2p_stop_find()
+        dev[1].p2p_find(freq=2422)
+        ev = dev[1].wait_global_event(["P2P-DEVICE-FOUND"], timeout=3.5)
+        if ev is None:
+            raise Exception("Did not find GO quickly enough")
     dev[2].p2p_listen()
     ev = dev[1].wait_global_event(["P2P-DEVICE-FOUND"], timeout=5)
     if ev is None: