Change in osmo-ttcn3-hacks[master]: bsc: add TC_assignment_codec_amr_startmode_cruft

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/.

neels gerrit-no-reply at lists.osmocom.org
Mon Nov 30 15:59:16 UTC 2020


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21373 )

Change subject: bsc: add TC_assignment_codec_amr_startmode_cruft
......................................................................

bsc: add TC_assignment_codec_amr_startmode_cruft

Make sure that when a 'start-mode auto' is set, that the previous start
mode setting does not linger in the unused bits.

- after I577ff590d7588fd7e3ee4846c7955ab8f84cf2b1, osmo-bsc sets its
  ICMI bit properly, but passes this test only because it *always* sends
  smod (start-mode) bits as zero.

- in I49691df01745a7c485bf165e897872c35fc4b147, the smod bits are
  properly sent on RSL, but this test shows that when ICMI becomes zero
  for 'start-mode auto', the smod bits will remain whatever start-mode
  was set in the previous osmo-bsc config. Instead, osmo-bsc should
  clear the smod bits for 'start-mode auto' so that its MultiRate Config
  does not vary depending on what was previously configured.

- in I1ec5bad0bce01cc425ee05ecf70c83ec662a226a, clearing smod is
  implemented and this test is expected to pass.

Change-Id: I151678f64e680f30f35b6bb2b0036d63efde9f2c
---
M bsc/BSC_Tests.ttcn
1 file changed, 37 insertions(+), 0 deletions(-)

Approvals:
  neels: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 251801b..7c12559 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3711,6 +3711,42 @@
 	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 @@
 		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() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21373
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I151678f64e680f30f35b6bb2b0036d63efde9f2c
Gerrit-Change-Number: 21373
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201130/cdff1fc5/attachment.htm>


More information about the gerrit-log mailing list