mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
tests: Make discovery_group_client more robust
Allow three P2P_FIND attempts for discovering the GO on a non-social channels since the single Probe Response frame can be missed easily under heavy CPU load. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f6ff5160f0
commit
54c20c9b43
@ -100,7 +100,9 @@ def test_discovery_group_client(dev):
|
||||
logger.info("Client connected")
|
||||
hwsim_utils.test_connectivity_p2p(dev[0], dev[1])
|
||||
logger.info("Try to discover a P2P client in a group")
|
||||
if not dev[2].discover_peer(dev[1].p2p_dev_addr(), social=False):
|
||||
if not dev[2].discover_peer(dev[1].p2p_dev_addr(), social=False, timeout=10):
|
||||
if not dev[2].discover_peer(dev[1].p2p_dev_addr(), social=False, timeout=10):
|
||||
if not dev[2].discover_peer(dev[1].p2p_dev_addr(), social=False, timeout=10):
|
||||
raise Exception("Could not discover group client")
|
||||
|
||||
# This is not really perfect, but something to get a bit more testing
|
||||
|
@ -613,6 +613,7 @@ class WpaSupplicant:
|
||||
def p2p_connect_group(self, go_addr, pin, timeout=0, social=False):
|
||||
self.dump_monitor()
|
||||
if not self.discover_peer(go_addr, social=social):
|
||||
if social or not self.discover_peer(go_addr, social=social):
|
||||
raise Exception("GO " + go_addr + " not found")
|
||||
self.dump_monitor()
|
||||
cmd = "P2P_CONNECT " + go_addr + " " + pin + " join"
|
||||
|
Loading…
Reference in New Issue
Block a user