From f56478ab88c4808089e7b22e3c240310544ed20b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 11 Oct 2015 12:30:47 +0300 Subject: [PATCH] tests: P2PS advertisement as GO having persistent group (no peer entry) This is a regression test case for the dev NULL pointer dereference in p2p_build_prov_disc_resp(). Signed-off-by: Jouni Malinen --- tests/hwsim/test_p2ps.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/hwsim/test_p2ps.py b/tests/hwsim/test_p2ps.py index 8c1359290..cc55a096a 100644 --- a/tests/hwsim/test_p2ps.py +++ b/tests/hwsim/test_p2ps.py @@ -809,6 +809,24 @@ def test_p2ps_connect_adv_go_persistent(dev): p2ps_connect_pd(dev[0], dev[1], ev0, ev1) remove_group(dev[0], dev[1]) +def test_p2ps_adv_go_persistent_no_peer_entry(dev): + """P2PS advertisement as GO having persistent group (no peer entry)""" + go_neg_pin_authorized_persistent(i_dev=dev[0], i_intent=15, + r_dev=dev[1], r_intent=0) + dev[0].remove_group() + dev[1].wait_go_ending_session() + + p2ps_advertise(r_dev=dev[0], r_role='4', svc_name='org.wi-fi.wfds.send.rx', + srv_info='I can receive files upto size 2 GB') + [adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[1], r_dev=dev[0], + svc_name='org.wi-fi.wfds.send.rx', + srv_info='2 GB') + dev[0].global_request("P2P_FLUSH") + dev[0].p2p_listen() + ev1, ev0 = p2ps_provision(dev[1], dev[0], adv_id) + if "persist=" not in ev0 or "persist=" not in ev1: + raise Exception("Persistent group isn't used by peers") + def test_p2ps_pd_follow_on_status_failure(dev): """P2PS PD follow on request with status 11""" addr0 = dev[0].p2p_dev_addr()