]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Force GO to have an old entry in test_p2p_go_invite
authorJouni Malinen <j@w1.fi>
Sun, 20 Oct 2013 15:03:33 +0000 (18:03 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 20 Oct 2013 18:38:01 +0000 (21:38 +0300)
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>

tests/hwsim/test_p2p_invitation.py

index 178ea3cf478dcbc4e9136e3c89c3d23e77dae99c..1a4971a4be2b48a1ee26733438d16fbe9fdb9fd2 100644 (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):