aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-05-20 20:37:51 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-20 20:37:51 (GMT)
commita68a749322482e003910abd8ee690836e50553fa (patch)
treecab7813bd17efad7c23b28fcff08a9425e039990 /tests
parent31d7fb14af96aa745b5acdf03d8b4f0569c964e5 (diff)
downloadhostap-a68a749322482e003910abd8ee690836e50553fa.zip
hostap-a68a749322482e003910abd8ee690836e50553fa.tar.gz
hostap-a68a749322482e003910abd8ee690836e50553fa.tar.bz2
tests: P2P group formation using P2PS method without specifying PIN
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_p2ps.py13
-rw-r--r--tests/hwsim/wpasupplicant.py2
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/hwsim/test_p2ps.py b/tests/hwsim/test_p2ps.py
index ad2382c..e71b6a5 100644
--- a/tests/hwsim/test_p2ps.py
+++ b/tests/hwsim/test_p2ps.py
@@ -1531,3 +1531,16 @@ def run_p2ps_connect_p2p_device2(dev, no_group_iface):
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(wpas, dev[0])
+
+def test_p2ps_connect_p2ps_method_no_pin(dev):
+ """P2P group formation using P2PS method without specifying PIN"""
+ dev[0].p2p_listen()
+ dev[1].p2p_go_neg_auth(dev[0].p2p_dev_addr(), None, "p2ps", go_intent=15)
+ dev[1].p2p_listen()
+ i_res = dev[0].p2p_go_neg_init(dev[1].p2p_dev_addr(), None, "p2ps",
+ timeout=20, go_intent=0)
+ r_res = dev[1].p2p_go_neg_auth_result()
+ logger.debug("i_res: " + str(i_res))
+ logger.debug("r_res: " + str(r_res))
+ check_grpform_results(i_res, r_res)
+ remove_group(dev[0], dev[1])
diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py
index f26124d..77c84f8 100644
--- a/tests/hwsim/wpasupplicant.py
+++ b/tests/hwsim/wpasupplicant.py
@@ -669,7 +669,7 @@ class WpaSupplicant:
cmd = "P2P_CONNECT " + peer + " " + pin + " " + method
else:
cmd = "P2P_CONNECT " + peer + " " + method
- if go_intent:
+ if go_intent is not None:
cmd = cmd + ' go_intent=' + str(go_intent)
if freq:
cmd = cmd + ' freq=' + str(freq)