jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43275?usp=email )
Change subject: IPAd: Add test to verify the correct setting of Device Capabilites ......................................................................
IPAd: Add test to verify the correct setting of Device Capabilites
Specify Device Capabilities via command line option and expect them in the TERMINAL CAPABILIES message towards eUICC.
Related: SYS#8101 Change-Id: I72d2235d3a9f287ea2af2fae3a83ffe6e54fec44 --- M ipad/IPAd_Tests.ttcn 1 file changed, 25 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/75/43275/1
diff --git a/ipad/IPAd_Tests.ttcn b/ipad/IPAd_Tests.ttcn index f924028..dc299d0 100644 --- a/ipad/IPAd_Tests.ttcn +++ b/ipad/IPAd_Tests.ttcn @@ -313,8 +313,10 @@
/* Handle the opening of logical channel 1 and the selection of the ISD-R */ private function f_es10x_init(boolean iot := true, - boolean eim_init := true) runs on IPAd_ConnHdlr { + boolean eim_init := true, + OCT1 dev_capa := '00'O) runs on IPAd_ConnHdlr { var charstring eim_fqdn := mp_esipa_ip & ":" & int2str(mp_esipa_port); + var octetstring term_capa;
/* If we decide not to use vpcd, then we must not initialize anything here */ if (mp_use_vpcd == false) { @@ -325,10 +327,12 @@ * (For RSP Device see also: 3GPP TS 102.221, section 11.1.19.2.4 and SGP.22, section 3.4.2) * (For IoT Device see also: SGP.32, section 3.8.2) */ if (iot) { - f_vpcd_exp(tr_VPCD_DATA('80AA000008A906830107840101'O)); + term_capa := '80AA000008A906830107840101'O; } else { - f_vpcd_exp(tr_VPCD_DATA('80AA000005A903830107'O)); + term_capa := '80AA000005A903830107'O; } + term_capa[9] := term_capa[9] or4b dev_capa[0]; + f_vpcd_exp(tr_VPCD_DATA(term_capa)); f_vpcd_send(ts_VPCD_DATA('9000'O));
/* Expect a MANAGE CHANNEL request that opens logical channel 1 */ @@ -921,6 +925,23 @@ setverdict(pass); }
+/* A testcase to verify if the given device capabilities are set (the lower 3 bits are always set). */ +private function f_TC_set_device_capabilities(charstring id) runs on IPAd_ConnHdlr { + f_exec_ipad("-D 0xF1"); + f_es10x_init(dev_capa := 'F1'O); + f_stop_ipad(); + setverdict(pass); +} +testcase TC_set_device_capabilities() runs on MTC_CT { + var charstring id := testcasename(); + var IPAd_ConnHdlrPars pars := f_init_pars(); + var IPAd_ConnHdlr vc_conn; + f_init(id); + vc_conn := f_start_handler(refers(f_TC_set_device_capabilities), pars); + vc_conn.done; + setverdict(pass); +} + control { execute ( TC_proc_indirect_prfle_dwnld() ); execute ( TC_proc_euicc_pkg_dwnld_exec() ); @@ -933,6 +954,7 @@ execute ( TC_func_dis_emerg_prfle() ); execute ( TC_func_get_conn_params() ); execute ( TC_func_get_conn_params_error() ); + execute ( TC_set_device_capabilities() ); }
}