bsc: set the AMR start-mode that the tests expect

osmo-bsc currently has a bug that fails to reflect the correct
start-mode in the AMR MultiRate config IE.

And it went unnoticed that the ttcn tests expect a MultiRate config of
ICMI = 1, even though the used configuration should yield ICMI = 0.
See mr_conf = '2804'O, where the '8' indicates ICMI = 1.

As a first fix of the ttcn3-bsc-tests, configure the BSC according to
the expected ICMI value and Start Mode, i.e. ICMI = 1 and StartMode = 0,
which is configured by 'amr tch-[fh] start-mode 1'. This should make
these tests pass as-is for both the current osmo-bsc as well as an
osmo-bsc where the bug is fixed, with minimal changes to the current
tests. See also OS#4868.

An upcoming patch will add tests for 'start-mode auto'.

Related: OS#4868
Change-Id: I4cff01c37d5c7e301e9a01f773b7e009a789519b
This commit is contained in:
Neels Hofmeyr 2020-11-25 23:57:47 +00:00 committed by neels
parent 2a5670be4f
commit a6ab821704
1 changed files with 28 additions and 0 deletions

View File

@ -3638,6 +3638,21 @@ private function f_allow_amr_rate_4_75k_5_90k_7_40k_12_20k() runs on test_CT {
});
}
private function f_vty_amr_start_mode_set(boolean fr, charstring startmode) runs on test_CT {
var charstring tch;
if (fr) {
tch := "tch-f";
} else {
tch := "tch-h";
}
f_vty_cfg_bts(BSCVTY, 0, { "amr " & tch & " start-mode " & startmode });
}
/* Set the AMR start-mode for this TCH back to the default configuration. */
private function f_vty_amr_start_mode_restore(boolean fr) runs on test_CT {
f_vty_amr_start_mode_set(fr, "auto");
}
testcase TC_assignment_codec_amr_f() runs on test_CT {
var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;
@ -3659,10 +3674,13 @@ testcase TC_assignment_codec_amr_f() runs on test_CT {
f_init(1, true);
f_sleep(1.0);
f_vty_amr_start_mode_set(true, "1");
vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars);
vc_conn.done;
f_shutdown_helper();
f_vty_amr_start_mode_restore(true);
}
testcase TC_assignment_codec_amr_h() runs on test_CT {
@ -3684,10 +3702,13 @@ testcase TC_assignment_codec_amr_h() runs on test_CT {
f_init(1, true);
f_sleep(1.0);
f_vty_amr_start_mode_set(false, "1");
vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars);
vc_conn.done;
f_shutdown_helper();
f_vty_amr_start_mode_restore(false);
}
function f_TC_assignment_codec_amr(boolean fr, octetstring mrconf, bitstring s8_s0, bitstring exp_s8_s0)
@ -3716,11 +3737,13 @@ runs on test_CT {
f_init(1, true);
f_allow_amr_rate_4_75k_5_90k_7_40k_12_20k();
f_vty_amr_start_mode_set(fr, "1");
f_sleep(1.0);
vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars);
vc_conn.done;
f_allow_amr_rate_5_90k();
f_vty_amr_start_mode_restore(fr);
}
function f_TC_assignment_codec_amr_fail(boolean fr, bitstring s8_s0)
@ -3739,11 +3762,13 @@ runs on test_CT {
f_init(1, true);
f_allow_amr_rate_4_75k_5_90k_7_40k_12_20k();
f_vty_amr_start_mode_set(fr, "1");
f_sleep(1.0);
vc_conn := f_start_handler(refers(f_TC_assignment_codec_fail), pars);
vc_conn.done;
f_allow_amr_rate_5_90k();
f_vty_amr_start_mode_restore(fr);
}
@ -4164,10 +4189,13 @@ testcase TC_assignment_osmux() runs on test_CT {
f_init(1, true, true);
f_sleep(1.0);
f_vty_amr_start_mode_set(false, "1");
vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars);
vc_conn.done;
f_shutdown_helper();
f_vty_amr_start_mode_restore(false);
}
/* test the procedure of the MSC requesting a Classmark Update: