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:
parent
7e6ca8a534
commit
39f1cac57e
1 changed files with 15 additions and 4 deletions
|
@ -71,11 +71,16 @@ 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")
|
||||
[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)
|
||||
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)
|
||||
if not i_res['persistent'] or not r_res['persistent']:
|
||||
raise Exception("Formed group was not persistent")
|
||||
terminate_group(go, cli)
|
||||
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue