tests: Make p2p_msg_go_neg_both_start more robust
Use same listen channel on both devices to make this test somewhat more likely to succeed. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
406bc79763
commit
ae20eb1d27
1 changed files with 10 additions and 0 deletions
|
@ -14,6 +14,7 @@ logger = logging.getLogger()
|
|||
import hostapd
|
||||
from p2p_utils import *
|
||||
from test_gas import anqp_adv_proto
|
||||
from test_p2ps import set_random_listen_chan
|
||||
|
||||
def ie_ssid(ssid):
|
||||
return struct.pack("<BB", WLAN_EID_SSID, len(ssid)) + ssid.encode()
|
||||
|
@ -1278,6 +1279,15 @@ def check_p2p_response(hapd, dialog_token, status):
|
|||
|
||||
def test_p2p_msg_go_neg_both_start(dev, apdev):
|
||||
"""P2P protocol test for simultaneous GO Neg initiation"""
|
||||
try:
|
||||
dev[0].global_request("P2P_SET listen_channel 6")
|
||||
dev[1].global_request("P2P_SET listen_channel 6")
|
||||
run_p2p_msg_go_neg_both_start(dev)
|
||||
finally:
|
||||
set_random_listen_chan(dev[0])
|
||||
set_random_listen_chan(dev[1])
|
||||
|
||||
def run_p2p_msg_go_neg_both_start(dev):
|
||||
addr0 = dev[0].p2p_dev_addr()
|
||||
addr1 = dev[1].p2p_dev_addr()
|
||||
dev[0].p2p_listen()
|
||||
|
|
Loading…
Reference in a new issue