]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make p2ps_wildcard_p2ps more robust
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 9 Dec 2016 22:33:33 +0000 (00:33 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 9 Dec 2016 22:33:33 +0000 (00:33 +0200)
The final check in this test case was issuing a new P2P_FIND command
immediately after the P2P_SERVICE_DEL command on the peer. It looked
like it was possible for the scan timing to go in a sequence that made
the new P2P_FIND operation eventually accept a cfg80211 BSS entry from
the very end of the previous P2P_FIND. This resulted in unexpected
P2P-DEVICE-FOUND event even though there was no new Probe Response frame
from the peer at that point in time.

Make this less likely to show unrelated failures by waiting a bit before
starting a new P2P_FIND operation after having changes peer
configuration.

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

index 4ae086878311f65f77df1218d9950372456e9a81..075e440f720e7e7be53d2de73467ae92ebb88bfd 100644 (file)
@@ -995,6 +995,8 @@ def test_p2ps_wildcard_p2ps(dev):
     if res is None:
         raise Exception("Unable to remove the advertisement instance 2")
 
+    dev[1].p2p_stop_find()
+    time.sleep(0.1)
     if "OK" not in dev[1].global_request("P2P_FIND 10 type=social seek=" + p2ps_wildcard):
         raise Exception("Failed on P2P_FIND command")