tests: Persistent group formation with reverse roles

This increase test coverage a bit for the Persistent group flag in GO
Negotiation Response.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2014-03-05 22:23:01 +02:00 committed by Jouni Malinen
parent 7e6ca8a534
commit 39f1cac57e

View file

@ -71,8 +71,13 @@ def check_result(go, cli):
raise Exception("Persistent group not re-invoked as persistent (cli)")
return [go_res, cli_res]
def form(go, cli, test_data=True):
def form(go, cli, test_data=True, reverse_init=False):
logger.info("Form a persistent group")
if reverse_init:
[i_res, r_res] = go_neg_pin_authorized_persistent(i_dev=cli, i_intent=0,
r_dev=go, r_intent=15,
test_data=test_data)
else:
[i_res, r_res] = go_neg_pin_authorized_persistent(i_dev=go, i_intent=15,
r_dev=cli, r_intent=0,
test_data=test_data)
@ -100,6 +105,12 @@ def test_persistent_group(dev):
invite_from_cli(dev[0], dev[1])
invite_from_go(dev[0], dev[1])
def test_persistent_group2(dev):
"""P2P persistent group formation with reverse roles"""
form(dev[0], dev[1], reverse_init=True)
invite_from_cli(dev[0], dev[1])
invite_from_go(dev[0], dev[1])
def test_persistent_group_per_sta_psk(dev):
"""P2P persistent group formation and re-invocation using per-client PSK"""
addr0 = dev[0].p2p_dev_addr()