]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: P2P persistent group formation with extended listen
authorShivani Baranwal <quic_shivbara@quicinc.com>
Thu, 20 Oct 2022 07:13:03 +0000 (12:43 +0530)
committerJouni Malinen <j@w1.fi>
Sat, 5 Nov 2022 10:17:23 +0000 (12:17 +0200)
Add a new P2P persistent group formation, re-invocation, and cancel test
to verify that P2P_EXT_LISTEN is avoided and the scan is performed in
the P2P Client role to find the P2P GO for the ongoing P2P persistent
group formation on the current interface.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
tests/hwsim/test_p2p_persistent.py

index 93a0c6826e196756d6514b75df96b9ed2e1da34f..c1610d2d444d507b5f861605cb392fcd71cd4793 100644 (file)
@@ -612,6 +612,28 @@ def test_persistent_group_cancel_on_cli2(dev):
         raise Exception("P2P_CANCEL succeeded unexpectedly on GO")
     terminate_group(dev[0], dev[1])
 
+@remote_compatible
+def test_persistent_group_cancel_on_cli3(dev):
+    """P2P persistent group formation, re-invocation, and cancel"""
+    dev[0].global_request("SET p2p_no_group_iface 0")
+    dev[1].global_request("SET p2p_no_group_iface 1")
+    dev[1].p2p_ext_listen(30,30)
+    form(dev[0], dev[1])
+
+    invite_from_go(dev[0], dev[1], terminate=False)
+    if "FAIL" not in dev[1].global_request("P2P_CANCEL"):
+        raise Exception("P2P_CANCEL succeeded unexpectedly on CLI")
+    if "FAIL" not in dev[0].global_request("P2P_CANCEL"):
+        raise Exception("P2P_CANCEL succeeded unexpectedly on GO")
+    terminate_group(dev[0], dev[1])
+
+    invite_from_cli(dev[0], dev[1], terminate=False)
+    if "FAIL" not in dev[1].global_request("P2P_CANCEL"):
+        raise Exception("P2P_CANCEL succeeded unexpectedly on CLI")
+    if "FAIL" not in dev[0].global_request("P2P_CANCEL"):
+        raise Exception("P2P_CANCEL succeeded unexpectedly on GO")
+    terminate_group(dev[0], dev[1])
+
 @remote_compatible
 def test_persistent_group_peer_dropped(dev):
     """P2P persistent group formation and re-invocation with peer having dropped group"""