tests: Force p2p_find in p2p_service_discovery_fragmentation

It was possible for this test case to fail if P2P_FLUSH was issued
during a search scan and that scan adding back the peer. Avoid this by
forcing p2p_find to be started regardless of the current P2P peer table
contents for each round of service discovery.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-01-05 16:42:48 +02:00
parent cb33ee143b
commit d4b21766e5
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ def run_sd(dev, dst, query, exp_query=None, fragment=False):
dev[1].request("P2P_FLUSH")
dev[1].request("P2P_SERV_DISC_REQ " + dst + " " + query)
if not dev[1].discover_peer(addr0, social=True):
if not dev[1].discover_peer(addr0, social=True, force_find=True):
raise Exception("Peer " + addr0 + " not found")
ev = dev[0].wait_event(["P2P-SERV-DISC-REQ"], timeout=10)

View File

@ -299,9 +299,9 @@ class WpaSupplicant:
return True
return "[PROBE_REQ_ONLY]" not in res
def discover_peer(self, peer, full=True, timeout=15, social=True):
def discover_peer(self, peer, full=True, timeout=15, social=True, force_find=False):
logger.info(self.ifname + ": Trying to discover peer " + peer)
if self.peer_known(peer, full):
if not force_find and self.peer_known(peer, full):
return True
self.p2p_find(social)
count = 0