Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9900 )
Change subject: BSC_Tests: Also test LCLS with halfrate codecs ...................................................................... BSC_Tests: Also test LCLS with halfrate codecs At the moment LCLS is only tested using GSM-FR. There are not LCLS tests that test with GSM-HR yet. Lets make GSM-HR available and see what happens when we run BSC_Tests_LCLS.TC_lcls_gcr_bway_connect on HR instead of FR. - set channelType depending on g_pars.ass_codec_list.codecElements[0] - add testcase TC_lcls_gcr_bway_connect_hr Related OS#1602 Change-Id: I2421519a642bdb7453ae4a9058e177845690a489 --- M bsc/BSC_Tests.ttcn M bsc/BSC_Tests_LCLS.ttcn M bsc/expected-results.xml 3 files changed, 24 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 2a8ad5f..149d5b7 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1735,7 +1735,7 @@ } /* determine BSSMAP_IE_ChannelType from *first* element of BSSMAP_FIELD_CodecElement */ -private function f_BSSMAP_chtype_from_codec(BSSMAP_FIELD_CodecElement a_elem) +function f_BSSMAP_chtype_from_codec(BSSMAP_FIELD_CodecElement a_elem) return BSSMAP_IE_ChannelType { /* FIXME: actually look at all elements of BSSMAP_IE_SpeechCodecList */ var BSSMAP_IE_ChannelType ret := valueof(ts_BSSMAP_IE_ChannelType); diff --git a/bsc/BSC_Tests_LCLS.ttcn b/bsc/BSC_Tests_LCLS.ttcn index b99ba58..da9fe94 100644 --- a/bsc/BSC_Tests_LCLS.ttcn +++ b/bsc/BSC_Tests_LCLS.ttcn @@ -128,8 +128,12 @@ private function f_lcls_connhdlr_main(charstring id) runs on LCLS_MSC_ConnHdlr { /* 1) establish the connection between RSL and BSSAP side */ var PDU_BSSAP ass_req := f_gen_ass_req(); + var template PDU_BSSAP ass_compl := f_gen_exp_compl(); ass_req.pdu.bssmap.assignmentRequest.codecList := g_pars.ass_codec_list; + ass_req.pdu.bssmap.assignmentRequest.channelType := + f_BSSMAP_chtype_from_codec(g_pars.ass_codec_list.codecElements[0]); + f_establish_fully(ass_req, ass_compl); /* 2) notify master that assignment has completed */ @@ -251,8 +255,7 @@ f_lcls_test_fini(); } -/* Send an ASSIGNMENT REQ with LCLS GCR+CFG+CSC; expect connect both-way */ -testcase TC_lcls_gcr_bway_connect() runs on lcls_test_CT { +private function f_tc_lcls_gcr_bway_connect(boolean hr) runs on lcls_test_CT { var TestHdlrParams pars_a := valueof(t_def_TestHdlrPars); var TestHdlrParams pars_b; var MSC_ConnHdlr vc_conn; @@ -260,7 +263,11 @@ f_lcls_init(); - pars_a.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + if (hr == true) { + pars_a.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecHR})); + } else { + pars_a.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + } pars_a.lcls.gcr := valueof(ts_GCR('010203'O, '0405'O, '060708090a'O)); pars_a.lcls.cfg := LCLS_CFG_both_way; pars_a.lcls.csc := LCLS_CSC_connect; @@ -272,6 +279,7 @@ pars_b.lcls.exp_sts := LCLS_STS_locally_switched; f_lcls_test_init(pars_a, pars_b); + CONN_A.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL); interleave { [] CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_not_yet_ls)); @@ -285,6 +293,16 @@ f_lcls_test_fini(); } +/* Send an ASSIGNMENT REQ with LCLS GCR+CFG+CSC; expect connect both-way (full rate)*/ +testcase TC_lcls_gcr_bway_connect() runs on lcls_test_CT { + f_tc_lcls_gcr_bway_connect(false) +} + +/* Send an ASSIGNMENT REQ with LCLS GCR+CFG+CSC; expect connect both-way (half rate) */ +testcase TC_lcls_gcr_bway_connect_hr() runs on lcls_test_CT { + f_tc_lcls_gcr_bway_connect(true) +} + /* Send an ASSIGNMENT REQ with LCLS CFG+CSC enabling LCLS but GCR doesn't match! */ testcase TC_lcls_gcr_nomatch_bway_connect() runs on lcls_test_CT { var TestHdlrParams pars_a := valueof(t_def_TestHdlrPars); @@ -581,6 +599,7 @@ execute( TC_lcls_gcr_only() ); execute( TC_lcls_gcr_bway_connect() ); + execute( TC_lcls_gcr_bway_connect_hr() ); execute( TC_lcls_gcr_nomatch_bway_connect() ); execute( TC_lcls_gcr_bway_dont_connect() ); execute( TC_lcls_gcr_unsuppported_cfg() ); diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml index 969660e..dbe3d2c 100644 --- a/bsc/expected-results.xml +++ b/bsc/expected-results.xml @@ -87,6 +87,7 @@ <testcase classname='BSC_Tests' name='TC_dyn_pdch_osmo_act_nack' time='MASKED'/> <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_only' time='MASKED'/> <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_bway_connect' time='MASKED'/> + <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_bway_connect_hr' time='MASKED'/> <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_nomatch_bway_connect' time='MASKED'/> <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_bway_dont_connect' time='MASKED'/> <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_unsuppported_cfg' time='MASKED'/> -- To view, visit https://gerrit.osmocom.org/9900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2421519a642bdb7453ae4a9058e177845690a489 Gerrit-Change-Number: 9900 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pma...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder