tests: Check STATUS mode field during P2P group formation
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
67966089a6
commit
061c55a232
1 changed files with 6 additions and 0 deletions
|
@ -774,10 +774,13 @@ def test_grpform_no_wsc_done(dev):
|
||||||
dev[0].p2p_go_neg_init(addr1, "12345670", "enter", timeout=20,
|
dev[0].p2p_go_neg_init(addr1, "12345670", "enter", timeout=20,
|
||||||
go_intent=15, wait_group=False)
|
go_intent=15, wait_group=False)
|
||||||
|
|
||||||
|
mode = None
|
||||||
while True:
|
while True:
|
||||||
ev = dev[0].wait_event(["EAPOL-TX"], timeout=15)
|
ev = dev[0].wait_event(["EAPOL-TX"], timeout=15)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Timeout on EAPOL-TX from GO")
|
raise Exception("Timeout on EAPOL-TX from GO")
|
||||||
|
if not mode:
|
||||||
|
mode = dev[0].get_status_field("mode")
|
||||||
res = dev[1].request("EAPOL_RX " + addr0 + " " + ev.split(' ')[2])
|
res = dev[1].request("EAPOL_RX " + addr0 + " " + ev.split(' ')[2])
|
||||||
if "OK" not in res:
|
if "OK" not in res:
|
||||||
raise Exception("EAPOL_RX failed")
|
raise Exception("EAPOL_RX failed")
|
||||||
|
@ -805,6 +808,9 @@ def test_grpform_no_wsc_done(dev):
|
||||||
raise Exception("Group formation timed out on P2P Client")
|
raise Exception("Group formation timed out on P2P Client")
|
||||||
dev[0].remove_group()
|
dev[0].remove_group()
|
||||||
|
|
||||||
|
if mode != "P2P GO - group formation":
|
||||||
|
raise Exception("Unexpected mode on GO during group formation: " + mode)
|
||||||
|
|
||||||
def test_grpform_wait_peer(dev):
|
def test_grpform_wait_peer(dev):
|
||||||
"""P2P group formation wait for peer to become ready"""
|
"""P2P group formation wait for peer to become ready"""
|
||||||
addr0 = dev[0].p2p_dev_addr()
|
addr0 = dev[0].p2p_dev_addr()
|
||||||
|
|
Loading…
Reference in a new issue