tests: Test p2p_long_listen longer than remain-on-channel
This tests an error, where the p2p_long_listen information from the wrong device was used internally in wpa_supplicant when using the separate P2P Device interface. Signed-off-by: Benjamin Berg <bberg@redhat.com>
This commit is contained in:
parent
9ad3c12dd1
commit
99eb150deb
1 changed files with 16 additions and 0 deletions
|
@ -654,6 +654,22 @@ def test_discovery_long_listen(dev):
|
|||
dev[1].p2p_stop_find()
|
||||
wpas.p2p_stop_find()
|
||||
|
||||
def test_discovery_long_listen2(dev):
|
||||
"""Long P2P_LISTEN longer than remain-on-channel time"""
|
||||
with HWSimRadio(use_p2p_device=True) as (radio, iface):
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add(iface)
|
||||
addr = wpas.p2p_dev_addr()
|
||||
wpas.request("P2P_LISTEN 15")
|
||||
|
||||
# Wait for remain maximum remain-on-channel time to pass
|
||||
time.sleep(7)
|
||||
|
||||
if not dev[0].discover_peer(addr):
|
||||
raise Exception("Device discovery timed out")
|
||||
dev[0].p2p_stop_find()
|
||||
wpas.p2p_stop_find()
|
||||
|
||||
def pd_test(dev, addr):
|
||||
if not dev.discover_peer(addr, freq=2412):
|
||||
raise Exception("Device discovery timed out")
|
||||
|
|
Loading…
Reference in a new issue