aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2016-04-07 10:32:09 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-24 21:15:35 (GMT)
commita274b1bcbb79aed3f4518f3e1ec544b36b23b0fc (patch)
tree49673f509b4a1a29cbc6ecb721be4ca912c1164a /tests
parent9b377be0374a11625b4d4387190cc4f02617a54a (diff)
downloadhostap-a274b1bcbb79aed3f4518f3e1ec544b36b23b0fc.zip
hostap-a274b1bcbb79aed3f4518f3e1ec544b36b23b0fc.tar.gz
hostap-a274b1bcbb79aed3f4518f3e1ec544b36b23b0fc.tar.bz2
tests: Test configuration propagation to group interface
When a dedicated P2P Device interface is used, its configuration should be cloned to the group interface. Add a test that covers this both when a separate group interface is used and not. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_p2p_device.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hwsim/test_p2p_device.py b/tests/hwsim/test_p2p_device.py
index 575bad2..36a7041 100644
--- a/tests/hwsim/test_p2p_device.py
+++ b/tests/hwsim/test_p2p_device.py
@@ -476,3 +476,31 @@ def test_p2p_device_persistent_group2_no_group_iface(dev):
form(wpas, dev[0])
invite_from_cli(wpas, dev[0])
invite_from_go(wpas, dev[0])
+
+def p2p_device_group_conf(dev1, dev2):
+ dev1.global_request("SET p2p_group_idle 12")
+ dev1.global_request("SET p2p_go_freq_change_policy 2")
+ dev1.global_request("SET p2p_go_ctwindow 7")
+
+ [i_res, r_res] = go_neg_pin_authorized(i_dev=dev1, i_intent=15,
+ r_dev=dev2, r_intent=0)
+ check_grpform_results(i_res, r_res)
+
+ if (dev1.group_request("GET p2p_group_idle") != "12" or
+ dev1.group_request("GET p2p_go_freq_change_policy") != "2" or
+ dev1.group_request("GET p2p_go_ctwindow") != "7"):
+ raise Exception("Unexpected configuration value")
+
+ remove_group(dev1, dev2)
+ dev1.global_request("P2P_FLUSH")
+ dev2.global_request("P2P_FLUSH")
+
+def test_p2p_device_conf(dev, apdev):
+ """P2P configuration with cfg80211 P2P Device"""
+ with HWSimRadio(use_p2p_device=True) as (radio, iface):
+ wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+ wpas.interface_add(iface)
+ wpas.global_request("SET p2p_no_group_iface 1")
+ p2p_device_group_conf(wpas, dev[0])
+ wpas.global_request("SET p2p_no_group_iface 0")
+ p2p_device_group_conf(wpas, dev[0])