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

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon May 20 18:15:31 UTC 2019


Harald Welte has uploaded this change for review. ( 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, 46 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/14106/1

diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn
index 8efeb2d..9ea60dd 100644
--- a/bts/BTS_Tests_SMSCB.ttcn
+++ b/bts/BTS_Tests_SMSCB.ttcn
@@ -444,6 +444,51 @@
 	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,
+		basic := valueof(t_CbchPC(msgs_1m_3b_default)),
+		extended := omit
+	};
+	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
@@ -459,6 +504,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() );
 	execute( TC_sms_cb_cmd_sdcch8_1block() );
 	execute( TC_sms_cb_cmd_sdcch8_2block() );
 	execute( TC_sms_cb_cmd_sdcch8_3block() );

-- 
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: newchange
Gerrit-Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011
Gerrit-Change-Number: 14106
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190520/56bd2102/attachment.html>


More information about the gerrit-log mailing list