This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9856 ) Change subject: bsc: verify MultiRate Config IE in RSL Chan Activ ...................................................................... bsc: verify MultiRate Config IE in RSL Chan Activ The current osmo-bsc refactoring causes an erratic MR Config IE. This patch ensures that the ttcn3-bsc-tests catch this error. Add MR Config IE expectations to g_pars, set these in the two tests that expect an MR Config IE in the Chan Activ message: BSC_Tests.TC_assignment_codec_amr_{f,h} All other tests now verify that there is *no* MR Config IE in RSL Chan Activ messages -- all other tests request no voice or a non-AMR codec for Chan Activ. Change-Id: Ie841feed9d5e478bab1fea2bb86f300e84799013 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 36 insertions(+), 0 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 328fc59..2a8ad5f 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1841,6 +1841,26 @@ if (not match(mode_ie, t_mode_ie)) { setverdict(fail, "RSL Channel Mode IE doesn't match expectation"); } + + var RSL_IE_Body mr_conf; + if (g_pars.expect_mr_conf_ie != omit) { + if (f_rsl_find_ie(rsl, RSL_IE_MR_CONFIG, mr_conf) == false) { + setverdict(fail, "Missing MR CONFIG IE in RSL Chan Activ"); + self.stop; + } + log("found RSL MR CONFIG IE: ", mr_conf); + + if (not match(mr_conf, g_pars.expect_mr_conf_ie)) { + setverdict(fail, "RSL MR CONFIG IE does not match expectation. Expected: ", + g_pars.expect_mr_conf_ie); + } + } else { + if (f_rsl_find_ie(rsl, RSL_IE_MR_CONFIG, mr_conf) == true) { + log("found RSL MR CONFIG IE: ", mr_conf); + setverdict(fail, "Found MR CONFIG IE in RSL Chan Activ, expecting omit"); + self.stop; + } + } } testcase TC_assignment_codec_fr() runs on test_CT { @@ -1882,11 +1902,18 @@ testcase TC_assignment_codec_amr_f() runs on test_CT { var TestHdlrParams pars := valueof(t_def_TestHdlrPars); var MSC_ConnHdlr vc_conn; + var RSL_IE_Body mr_conf := { + other := { + len := 2, + payload := '2804'O + } + }; f_init(1, true); f_sleep(1.0); pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecAMR_F})); + pars.expect_mr_conf_ie := mr_conf; vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars); vc_conn.done; } @@ -1894,11 +1921,18 @@ testcase TC_assignment_codec_amr_h() runs on test_CT { var TestHdlrParams pars := valueof(t_def_TestHdlrPars); var MSC_ConnHdlr vc_conn; + var RSL_IE_Body mr_conf := { + other := { + len := 2, + payload := '2804'O + } + }; f_init(1, true); f_sleep(1.0); pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecAMR_H})); + pars.expect_mr_conf_ie := mr_conf; vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars); vc_conn.done; } diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 0f123b6..1261a4d 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -390,6 +390,7 @@ RslLinkId link_id, integer media_nr, /* determins MGCP EP, port numbers */ BSSMAP_IE_SpeechCodecList ass_codec_list optional, + RSL_IE_Body expect_mr_conf_ie optional, /* typically present for AMR codecs */ TestHdlrEncrParams encr optional, TestHdlrParamsLcls lcls }; @@ -401,6 +402,7 @@ link_id := valueof(ts_RslLinkID_DCCH(0)), media_nr := 1, ass_codec_list := omit, + expect_mr_conf_ie := omit, encr := omit, lcls := { gcr := omit, -- To view, visit https://gerrit.osmocom.org/9856 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: Ie841feed9d5e478bab1fea2bb86f300e84799013 Gerrit-Change-Number: 9856 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180704/8f48a4f7/attachment.htm>