tests: Force GO to have an old entry in test_p2p_go_invite

This adds more coverage to testing by forcing the GO to be found with an
older entry in the BSS table and with that entry having a different
operating channel. Such a case has found issues with PD retries and
scanning if incorrect frequency and SSID is selected for the group.
Instead of relying on the old BSS entry with different operating channel
to happen based on a specific test case sequence, force this to happen
for this test case every time.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-10-20 18:03:33 +03:00
parent d2858883b0
commit 033e48ee2d

View file

@ -16,6 +16,14 @@ def test_p2p_go_invite(dev):
addr0 = dev[0].p2p_dev_addr()
addr1 = dev[1].p2p_dev_addr()
logger.info("Generate BSS table entry for old group")
# this adds more coverage to testing by forcing the GO to be found with an
# older entry in the BSS table and with that entry having a different
# operating channel.
dev[0].p2p_start_go(freq=2422)
dev[1].scan()
dev[0].remove_group()
logger.info("Discover peer")
dev[1].p2p_listen()
if not dev[0].discover_peer(addr1, social=True):