aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorToby Gray <toby.gray@realvnc.com>2014-10-14 17:34:42 (GMT)
committerJouni Malinen <j@w1.fi>2014-10-18 13:22:25 (GMT)
commitfd1776536b7fc8d4e74187c63bb460e57d4a8823 (patch)
tree4cfd64a6e4501d542f4b077af2b4135a4c3bad27 /tests
parentf2b3acc9d7b91fbaccfc9dd8d408252bda4f1be9 (diff)
downloadhostap-fd1776536b7fc8d4e74187c63bb460e57d4a8823.zip
hostap-fd1776536b7fc8d4e74187c63bb460e57d4a8823.tar.gz
hostap-fd1776536b7fc8d4e74187c63bb460e57d4a8823.tar.bz2
tests: Removing a P2P group via the group control interface
This adds a test which attempts to use the control interface for the P2P group to remove the P2P group. Signed-off-by: Toby Gray <toby.gray@realvnc.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_p2p_device.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/hwsim/test_p2p_device.py b/tests/hwsim/test_p2p_device.py
index 9217720..b9b4810 100644
--- a/tests/hwsim/test_p2p_device.py
+++ b/tests/hwsim/test_p2p_device.py
@@ -30,3 +30,21 @@ def test_p2p_device_grpform2(dev, apdev):
r_dev=dev[0], r_intent=0)
check_grpform_results(i_res, r_res)
remove_group(wpas, dev[0])
+
+def test_p2p_device_group_remove(dev, apdev):
+ """P2P group removal via the P2P ctrl interface with driver using cfg80211 P2P Device"""
+ wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+ wpas.interface_add("wlan5")
+ [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
+ r_dev=wpas, r_intent=0)
+ check_grpform_results(i_res, r_res)
+ # Issue the remove request on the interface which will be removed
+ p2p_iface_wpas = WpaSupplicant(ifname=r_res['ifname'])
+ res = p2p_iface_wpas.request("P2P_GROUP_REMOVE *")
+ if "OK" not in res:
+ raise Exception("Failed to remove P2P group")
+ ev = wpas.wait_global_event(["P2P-GROUP-REMOVED"], timeout=10)
+ if ev is None:
+ raise Exception("Group removal event not received")
+ if not wpas.global_ping():
+ raise Exception("Could not ping global ctrl_iface after group removal")