aboutsummaryrefslogtreecommitdiffstats
path: root/bts
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-12 13:15:43 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-17 18:21:48 +0100
commit557006605b9e6282ce0ac3865673fc8f3bbb54d8 (patch)
tree98699dd7cddc3b9e1491def09a72ca922e7a246c /bts
parent075d84c895232bb6089da7b79f53090354115ec0 (diff)
bts: Add TC_sacch_multi_chg
Diffstat (limited to 'bts')
-rw-r--r--bts/BTS_Tests.ttcn72
1 files changed, 72 insertions, 0 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index bc295c7e..ecb54973 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -637,6 +637,7 @@ testcase TC_deact_sacch() runs on test_CT {
f_shutdown();
}
+/* verify that given SACCH payload is present */
private function f_sacch_present(template octetstring l3_exp) runs on ConnHdlr {
var L1ctlDlMessage dl;
/* check that the specified SI5 value is actually sent */
@@ -660,6 +661,30 @@ private function f_sacch_present(template octetstring l3_exp) runs on ConnHdlr {
}
}
+/* verify that given SACCH payload is not present */
+private function f_sacch_missing(template octetstring l3_exp) runs on ConnHdlr {
+ var L1ctlDlMessage dl;
+ /* check that the specified SI5 value is actually sent */
+ timer T_sacch := 3.0;
+ L1CTL.clear;
+ T_sacch.start;
+ alt {
+ [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(0))) -> value dl {
+ var octetstring l3 := substr(dl.payload.data_ind.payload, 4, 19);
+ if (match(l3, l3_exp)) {
+ setverdict(fail, "Received unexpected SACCH ", dl);
+ self.stop;
+ } else {
+ repeat;
+ }
+ }
+ [] L1CTL.receive { repeat; }
+ [] T_sacch.timeout {
+ setverdict(pass);
+ }
+ }
+}
+
/* Test for default SACCH FILL transmitted in DL SACCH (all channel types) */
private function f_TC_sacch_filling(charstring id) runs on ConnHdlr {
/* Set a known default SACCH filling for SI5 */
@@ -785,6 +810,52 @@ testcase TC_sacch_multi() runs on test_CT {
f_shutdown();
}
+/* Test if SACH information is modified as expected */
+private function f_TC_sacch_multi_chg(charstring id) runs on ConnHdlr {
+ var octetstring si5 := f_rnd_octstring(19);
+ var octetstring si6 := f_rnd_octstring(19);
+
+ /* First, configure both SI5 and SI6 to be transmitted */
+ RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_5, si5));
+ RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_6, si6));
+
+ f_l1_tune(L1CTL);
+ RSL.clear;
+
+ /* activate the logical channel */
+ f_est_dchan();
+ L1CTL.clear;
+
+ /* check that SACCH actually are received as expected */
+ f_sacch_present(si5);
+ f_sacch_present(si6);
+
+ /* disable SI6 */
+ RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_6, ''O));
+
+ /* check that SI5 is still transmitted */
+ f_sacch_present(si5);
+ /* check if SI6 is now gone */
+ f_sacch_missing(si6);
+
+ /* release the channel */
+ f_rsl_chan_deact();
+ f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+}
+testcase TC_sacch_multi_chg() runs on test_CT {
+ var ConnHdlr vc_conn;
+ var ConnHdlrPars pars;
+ f_init();
+ for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) {
+ pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN));
+ log(testcasename(), ": Starting for ", g_AllChannels[i]);
+ vc_conn := f_start_handler(refers(f_TC_sacch_multi_chg), pars);
+ vc_conn.done;
+ }
+ /* TODO: do the above in parallel, rather than sequentially? */
+ f_shutdown();
+}
+
/* TODO: Test for SACCH information present in RSL CHAN ACT (overrides FILLING) */
/* TODO: Test for SACCH transmission rules in the context of special CHAN ACT (HO) */
@@ -2578,6 +2649,7 @@ control {
execute( TC_sacch_filling() );
execute( TC_sacch_info_mod() );
execute( TC_sacch_multi() );
+ execute( TC_sacch_multi_chg() );
execute( TC_rach_content() );
execute( TC_rach_count() );
execute( TC_rach_max_ta() );