From: Shivani Baranwal Date: Thu, 20 Oct 2022 07:13:03 +0000 (+0530) Subject: tests: P2P persistent group formation with extended listen X-Git-Tag: hostap_2_11~1576 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef10a574d6938770c2af09b1a31b475fc6393f00;p=thirdparty%2Fhostap.git tests: P2P persistent group formation with extended listen 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 --- diff --git a/tests/hwsim/test_p2p_persistent.py b/tests/hwsim/test_p2p_persistent.py index 93a0c6826..c1610d2d4 100644 --- a/tests/hwsim/test_p2p_persistent.py +++ b/tests/hwsim/test_p2p_persistent.py @@ -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"""