]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: P2P persistent group during concurrent operation
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 27 May 2014 09:26:21 +0000 (12:26 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 27 May 2014 10:53:00 +0000 (13:53 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_p2p_concurrency.py
tests/hwsim/test_p2p_persistent.py

index 7689b15b5b13f34da26d8ffb9e2caa4b3db45bfa..365ed1201f1715d88e487f7a2ca8ed9df3df3728 100644 (file)
@@ -14,6 +14,9 @@ from test_p2p_grpform import go_neg_pin_authorized
 from test_p2p_grpform import go_neg_pbc
 from test_p2p_grpform import check_grpform_results
 from test_p2p_grpform import remove_group
+from test_p2p_persistent import form
+from test_p2p_persistent import invite_from_cli
+from test_p2p_persistent import invite_from_go
 
 def test_concurrent_autogo(dev, apdev):
     """Concurrent P2P autonomous GO"""
@@ -145,3 +148,19 @@ def test_concurrent_grpform_while_connecting3(dev, apdev):
     logger.info("Confirm AP connection after P2P group removal")
     dev[0].wait_completed()
     hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
+
+def test_concurrent_persistent_group(dev, apdev):
+    """Concurrent P2P persistent group"""
+    logger.info("Connect to an infrastructure AP")
+    hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open", "channel": "2" })
+    dev[0].request("SET p2p_no_group_iface 0")
+    dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2417")
+
+    logger.info("Run persistent group test while associated to an AP")
+    form(dev[0], dev[1])
+    [go_res, cli_res] = invite_from_cli(dev[0], dev[1])
+    if go_res['freq'] != '2417':
+        raise Exception("Unexpected channel selected: " + go_res['freq'])
+    [go_res, cli_res] = invite_from_go(dev[0], dev[1])
+    if go_res['freq'] != '2417':
+        raise Exception("Unexpected channel selected: " + go_res['freq'])
index 2cb69b1795f5e78c4ab89adc2647ecaeec47fbc2..b5c290fd55e46ef0bb2a9cc5a6e159384ba03661 100644 (file)
@@ -93,16 +93,18 @@ def form(go, cli, test_data=True, reverse_init=False):
 def invite_from_cli(go, cli):
     logger.info("Re-invoke persistent group from client")
     invite(cli, go)
-    check_result(go, cli)
+    [go_res, cli_res] = check_result(go, cli)
     hwsim_utils.test_connectivity_p2p(go, cli)
     terminate_group(go, cli)
+    return [go_res, cli_res]
 
 def invite_from_go(go, cli):
     logger.info("Re-invoke persistent group from GO")
     invite(go, cli)
-    check_result(go, cli)
+    [go_res, cli_res] = check_result(go, cli)
     hwsim_utils.test_connectivity_p2p(go, cli)
     terminate_group(go, cli)
+    return [go_res, cli_res]
 
 def test_persistent_group(dev):
     """P2P persistent group formation and re-invocation"""