[PATCH 8/9] tests: Add CPT parameters to p2ps_provision()

Ilan Peer ilan.peer at intel.com
Thu Jul 2 09:21:26 EDT 2015


From: Max Stepanov <Max.Stepanov at intel.com>

Add adv_cpt and seeker_cpt parameters to p2ps_provision() function.
The seeker_cpt is used in P2P_ASP_PROVISION command by a seeker, the
adv_cpt parameter is in P2P_ASP_PROVISION_RESP by an advertiser.

Signed-off-by: Max Stepanov <Max.Stepanov at intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Reviewed-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_p2ps.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/hwsim/test_p2ps.py b/tests/hwsim/test_p2ps.py
index 1f8d390..c893d17 100644
--- a/tests/hwsim/test_p2ps.py
+++ b/tests/hwsim/test_p2ps.py
@@ -132,11 +132,11 @@ def p2ps_parse_event(ev, *args):
         ret += (m.group(1) if m is not None else None,)
     return ret
 
-def p2ps_provision(seeker, advertiser, adv_id, auto_accept=True, method="1000"):
+def p2ps_provision(seeker, advertiser, adv_id, auto_accept=True, method="1000", adv_cpt=None, seeker_cpt=None):
     addr0 = seeker.p2p_dev_addr()
     addr1 = advertiser.p2p_dev_addr()
 
-    seeker.asp_provision(addr1, adv_id=str(adv_id), adv_mac=addr1, session_id=1, session_mac=addr0, method=method)
+    seeker.asp_provision(addr1, adv_id=str(adv_id), adv_mac=addr1, session_id=1, session_mac=addr0, method=method, cpt=seeker_cpt)
 
     if not auto_accept or method == "100":
         pin = None
@@ -172,7 +172,7 @@ def p2ps_provision(seeker, advertiser, adv_id, auto_accept=True, method="1000"):
             pin = ev.split()[2]
 
         advertiser.asp_provision(peer, adv_id=advert_id, adv_mac=advert_mac, session_id=int(session, 0),
-                                 session_mac=session_mac, status=12)
+                                 session_mac=session_mac, status=12, cpt=adv_cpt)
 
         ev1 = seeker.wait_global_event(["P2PS-PROV-DONE"], timeout=10)
         if ev1 is None:
-- 
1.9.1



More information about the HostAP mailing list