[PATCH 1/2] tests: Add tests for removing a P2P group via the group control interface

Toby Gray toby.gray
Tue Oct 14 10:34:42 PDT 2014


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 at realvnc.com>
---
 tests/hwsim/test_p2p_device.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tests/hwsim/test_p2p_device.py b/tests/hwsim/test_p2p_device.py
index 9217720..e811c30 100644
--- a/tests/hwsim/test_p2p_device.py
+++ b/tests/hwsim/test_p2p_device.py
@@ -30,3 +30,20 @@ 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_grpremove(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_name = r_res['ifname']
+    p2p_iface_wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+    p2p_iface_wpas.set_ifname(p2p_iface_name)
+    try:
+        p2p_iface_wpas.request("P2P_GROUP_REMOVE *")
+    except:
+        # Expect command to fail
+        pass
-- 
1.8.3.4




More information about the Hostap mailing list