Change in osmo-ttcn3-hacks[master]: bts: Test for removal of CBCH DEFAULT message

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue May 21 14:42:08 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14106 )

Change subject: bts: Test for removal of CBCH DEFAULT message
......................................................................

bts: Test for removal of CBCH DEFAULT message

Add a new testcase TC_sms_cb_cmd_sdcch4_default_then_null() which first
installes a DEFAULT message, verifies that, then removes the default
message and verifies only NULL CBCH blocks are sent anymore.

Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011
Related: OS#4011
---
M bts/BTS_Tests_SMSCB.ttcn
1 file changed, 52 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn
index 34e17be..c991877 100644
--- a/bts/BTS_Tests_SMSCB.ttcn
+++ b/bts/BTS_Tests_SMSCB.ttcn
@@ -120,6 +120,13 @@
 	}
 }
 
+private function f_rsl_smscb_default_null() runs on test_CT
+{
+	var RSL_IE_CbCommandType cmd_type :=
+				valueof(ts_RSL_IE_CbCmdType(RSL_CB_CMD_DEFAULT, 1, true));
+	RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, ''O)));
+}
+
 private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT {
 	var integer i;
 
@@ -446,6 +453,50 @@
 	Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass);
 }
 
+/* first set a DEFAULT message, then disable it again */
+testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT {
+	var CbchTestPars pars := {
+		use_sdcch4 := true,
+		msgs := msgs_1m_3b_default
+	};
+	var L1ctlDlMessage dl;
+	timer T := 5.0;
+
+	f_TC_smscb_default_only(pars);
+
+	/* disable DEFAULT message; switch back to NULL */
+	f_rsl_smscb_default_null();
+
+	/* ensure whatever initial non-NULL messages have all been drained */
+	f_sleep(5.0);
+	L1CTL.clear;
+
+	T.start;
+	alt {
+	[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl {
+		log("CBCH: ", dl);
+		var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload);
+		/* detect the proper CBCH messages; check frame number */
+		f_cbch_fn_verify(dl.dl_info.frame_nr, cb);
+		if (not match(cb, tr_CBCH_Block)) {
+			setverdict(fail, "Illegal CBCH Block received: ", cb);
+		} else {
+			if (not match(cb, tr_CBCH_Block(15, ?, ?))) {
+				setverdict(fail, "Unexpected non-NULL CBCH block received");
+			}
+			repeat;
+		}
+		}
+	[] L1CTL.receive { repeat; }
+	[] T.timeout {
+		setverdict(pass);
+		}
+	}
+
+	Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass);
+}
+
+
 
 /* SMSCB TODO:
    * multiple SMS BC CMD at the same time: Ensure all of them are sent exactly once
@@ -461,6 +512,7 @@
 	execute( TC_sms_cb_cmd_sdcch4_multi() );
 	execute( TC_sms_cb_cmd_sdcch4_schedule() );
 	execute( TC_sms_cb_cmd_sdcch4_default_only() );
+	execute( TC_sms_cb_cmd_sdcch4_default_then_null() );
 	if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */
 	execute( TC_sms_cb_cmd_sdcch8_1block() );
 	execute( TC_sms_cb_cmd_sdcch8_2block() );

-- 
To view, visit https://gerrit.osmocom.org/14106
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011
Gerrit-Change-Number: 14106
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190521/eb373564/attachment.htm>


More information about the gerrit-log mailing list