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
This commit is contained in:
Neels Hofmeyr 2018-07-04 00:24:33 +02:00
parent 15de8ba162
commit bcf62bccf4
2 changed files with 36 additions and 0 deletions

View File

@ -1841,6 +1841,26 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
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_efr() runs on test_CT {
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_f() runs on test_CT {
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;
}

View File

@ -390,6 +390,7 @@ type record TestHdlrParams {
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 @@ template (value) TestHdlrParams t_def_TestHdlrPars := {
link_id := valueof(ts_RslLinkID_DCCH(0)),
media_nr := 1,
ass_codec_list := omit,
expect_mr_conf_ie := omit,
encr := omit,
lcls := {
gcr := omit,