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
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;
}