diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 251801b30..7c12559b4 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -3711,6 +3711,42 @@ testcase TC_assignment_codec_amr_h() runs on test_CT { f_vty_amr_start_mode_restore(false); } +/* 'amr start-mode auto' should not keep the (unused) 'smod' bits from previous configuration */ +testcase TC_assignment_codec_amr_startmode_cruft() runs on test_CT { + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + var MSC_ConnHdlr vc_conn; + + var RSL_IE_Body mr_conf := { + other := { + len := 2, + payload := '2004'O /* <- expect ICMI=0, smod=00 */ + } + }; + + pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecAMR_F})); + pars.ass_codec_list.codecElements[0].s0_7 := '00000100'B; /* 5,90k */ + pars.ass_codec_list.codecElements[0].s8_15 := '01010111'B; + pars.expect_mr_conf_ie := mr_conf; + + f_init(1, true); + f_sleep(1.0); + + /* First set nonzero start mode bits */ + f_vty_amr_start_mode_set(true, "4"); + /* Now set to auto, and expect the startmode bits to be zero in the message, i.e. ensure that osmo-bsc does not + * let the startmode bits stick around and has deterministic MultiRate config for 'start-mode auto'; that is + * ensured by above '2004'O, where 'x0xx'O indicates ICMI = 0, spare = 0, smod = 00. */ + f_vty_amr_start_mode_set(true, "auto"); + + vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars); + vc_conn.done; + f_shutdown_helper(); + + /* Clear the startmode bits to not affect subsequent tests, in case the bits should indeed stick around. */ + f_vty_amr_start_mode_set(true, "1"); + f_vty_amr_start_mode_restore(true); +} + function f_TC_assignment_codec_amr(boolean fr, octetstring mrconf, bitstring s8_s0, bitstring exp_s8_s0, charstring start_mode := "1") runs on test_CT { @@ -8415,6 +8451,7 @@ control { execute( TC_assignment_codec_amr_h_S7() ); execute( TC_assignment_codec_amr_f_start_mode_auto() ); execute( TC_assignment_codec_amr_h_start_mode_auto() ); + execute( TC_assignment_codec_amr_startmode_cruft() ); } execute( TC_assignment_codec_fr_exhausted_req_hr() );