Change in osmo-ttcn3-hacks[master]: BTS: add a test case for RF RESource INDication

fixeria gerrit-no-reply at lists.osmocom.org
Fri Jun 4 22:11:18 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24567 )


Change subject: BTS: add a test case for RF RESource INDication
......................................................................

BTS: add a test case for RF RESource INDication

Change-Id: I78b6d8beffa5228a28231b75728e7aebdd3cb23c
Related: SYS#5313, OS#1569, OS#1866
---
M bts/BTS_Tests.ttcn
1 file changed, 45 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ee5258c..06f21e3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -6772,6 +6772,50 @@
 	f_testmatrix_each_chan(pars, refers(f_TC_rsl_modify_encr));
 }
 
+/* Verify RF RESource INDication messages (periodically sent over the RSL) */
+private function f_TC_rsl_rf_resource_ind(template RSL_ResourceInfo info)
+runs on test_CT {
+	var ASP_RSL_Unitdata ud;
+	timer T;
+
+	/* Intave is 6 SACCH periods by default */
+	var float Tval := int2float(6 * 480) / 1000.0 + 0.5;
+
+	T.start(Tval);
+	alt {
+	[] RSL_CCHAN.receive(tr_ASP_RSL_UD(tr_RSL_RF_RES_IND(info))) {
+		setverdict(pass);
+		}
+	[] RSL_CCHAN.receive(tr_ASP_RSL_UD(tr_RSL_RF_RES_IND(?))) -> value ud {
+		setverdict(fail, "RF RESource INDication mismatch: ", ud.rsl);
+		}
+	[] RSL_CCHAN.receive { repeat; }
+	[] T.timeout {
+		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+			"Timeout waiting for RF RESource INDication");
+		}
+	}
+}
+
+testcase TC_rsl_rf_resource_ind() runs on test_CT {
+	var RSL_ResourceInfo info := { };
+
+	f_init(trx_nr := 0);
+
+	/* g_AllChannels contains all logical channels */
+	for (var integer i := 0; i < lengthof(g_AllChannels); i := i + 1) {
+		var RslChannelNr chan_nr := g_AllChannels[i];
+		info := info & { valueof(ts_RSL_ResourceInfoItem(chan_nr)) };
+	}
+
+	/* Test 4 consecutive messages */
+	for (var integer i := 0; i < 4; i := i + 1) {
+		f_TC_rsl_rf_resource_ind(info);
+	}
+
+	Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
 /* Test unencrypted channel activation followed by explicit ENCR CMD later */
 private function f_TC_encr_cmd(charstring id) runs on ConnHdlr {
 	/* L3 payload doesn't matter, as it is passed transparently */
@@ -7344,6 +7388,7 @@
 	execute( TC_rsl_chan_initial_ms_pwr() );
 	execute( TC_rsl_chan_initial_ta() );
 	execute( TC_rsl_modify_encr() );
+	execute( TC_rsl_rf_resource_ind() );
 	execute( TC_conn_fail_crit() );
 	execute( TC_paging_imsi_80percent() );
 	execute( TC_paging_tmsi_80percent() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24567
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: I78b6d8beffa5228a28231b75728e7aebdd3cb23c
Gerrit-Change-Number: 24567
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210604/bd9af7ed/attachment.htm>


More information about the gerrit-log mailing list