aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-01-12 17:18:02 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-12 17:18:02 (GMT)
commit9b8e1f90444f03c37626a2cec05cec43f5436190 (patch)
treed8170fa85bf73a99e34b8cc405d22eb9b19768b8
parenta95906f9381ee8aa4ccb66e1c99952658d8e3369 (diff)
downloadhostap-9b8e1f90444f03c37626a2cec05cec43f5436190.zip
hostap-9b8e1f90444f03c37626a2cec05cec43f5436190.tar.gz
hostap-9b8e1f90444f03c37626a2cec05cec43f5436190.tar.bz2
tests: P2P group formation with random interface addresses
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_p2p_grpform.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/hwsim/test_p2p_grpform.py b/tests/hwsim/test_p2p_grpform.py
index 9b442d2..b967085 100644
--- a/tests/hwsim/test_p2p_grpform.py
+++ b/tests/hwsim/test_p2p_grpform.py
@@ -1161,3 +1161,25 @@ def test_grpform_go_neg_stopped(dev):
dev[1].p2p_stop_find()
if ev is None:
raise Exception("Did not find peer quickly enough after stopped P2P_CONNECT")
+
+def test_grpform_random_addr(dev):
+ """P2P group formation with random interface addresses"""
+ dev[0].global_request("SET p2p_no_group_iface 0")
+ dev[1].global_request("SET p2p_no_group_iface 0")
+ try:
+ if "OK" not in dev[0].global_request("SET p2p_interface_random_mac_addr 1"):
+ raise Exception("Failed to set p2p_interface_random_mac_addr")
+ if "OK" not in dev[1].global_request("SET p2p_interface_random_mac_addr 1"):
+ raise Exception("Failed to set p2p_interface_random_mac_addr")
+ [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
+ r_dev=dev[1], r_intent=0)
+ if "p2p-wlan" not in i_res['ifname']:
+ raise Exception("Unexpected group interface name")
+ check_grpform_results(i_res, r_res)
+ hwsim_utils.test_connectivity_p2p(dev[0], dev[1])
+ remove_group(dev[0], dev[1])
+ if i_res['ifname'] in utils.get_ifnames():
+ raise Exception("Group interface netdev was not removed")
+ finally:
+ dev[0].global_request("SET p2p_interface_random_mac_addr 0")
+ dev[1].global_request("SET p2p_interface_random_mac_addr 0")