From ef10a574d6938770c2af09b1a31b475fc6393f00 Mon Sep 17 00:00:00 2001 From: Shivani Baranwal Date: Thu, 20 Oct 2022 12:43:03 +0530 Subject: [PATCH] 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 --- tests/hwsim/test_p2p_persistent.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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"""