Parcourir la source

tests: Increase test coverage on BSS command

Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen il y a 11 ans
Parent
commit
3a64d523fa
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  1. 10 0
      tests/hwsim/test_p2p_autogo.py

+ 10 - 0
tests/hwsim/test_p2p_autogo.py

@@ -38,6 +38,16 @@ def test_autogo(dev):
     res = connect_cli(dev[0], dev[1])
     if "p2p-wlan" in res['ifname']:
         raise Exception("Unexpected group interface name on client")
+    bss = dev[1].get_bss("p2p_dev_addr=" + dev[0].p2p_dev_addr())
+    if bss['bssid'] != dev[0].p2p_interface_addr():
+        raise Exception("Unexpected BSSID in the BSS entry for the GO")
+    id = bss['id']
+    bss = dev[1].get_bss("ID-" + id)
+    if bss['id'] != id:
+        raise Exception("Could not find BSS entry based on id")
+    res = dev[1].request("BSS RANGE=" + id + "- MASK=0x1")
+    if "id=" + id not in res:
+        raise Exception("Could not find BSS entry based on id range")
     dev[0].remove_group()
     dev[1].wait_go_ending_session()