Change in osmo-ttcn3-hacks[master]: BTS_Tests: check paging channel fn (bs_ag_blks_res)

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

dexter gerrit-no-reply at lists.osmocom.org
Wed Sep 12 15:59:28 UTC 2018


dexter has submitted this change and it was merged. ( https://gerrit.osmocom.org/10726 )

Change subject: BTS_Tests: check paging channel fn (bs_ag_blks_res)
......................................................................

BTS_Tests: check paging channel fn (bs_ag_blks_res)

BTS_Tests.ttcn contains numorous tests that issue pagings via RSL and
observe if these pagings are visible on the UM interface as well.
However, it is not checked whether the frame number of the blocks on
which those pagings are sent actually falls into the range that is
specified for PCH. We should check this as well.

(The PCH is part of the CCCH, which also contains the
AGC. How many blocks of the CCCH are to be used by the PCH is set by the
parameter bs_ag_blks_res.)

- Check the FN of each paging message that arrives on L1CTL and make
  sure that those FN are part of the PCH.

Change-Id: I839e75ece05166518bf7132acd3017434b3d3bc2
Related: OS#1575
---
M bts/BTS_Tests.ttcn
1 file changed, 59 insertions(+), 3 deletions(-)

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



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 67f302f..bfa8988 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1532,7 +1532,60 @@
 	}
 }
 
-altstep as_l1_count_paging(inout integer num_paging_rcv_msgs, inout integer num_paging_rcv_ids)
+type record allowedFn { integer frame_nr }
+template allowedFn bs_ag_blks_res_0  := { frame_nr := (6, 12, 16, 22, 26, 32, 36, 42, 46) }
+template allowedFn bs_ag_blks_res_1  := { frame_nr := (12, 16, 22, 26, 32, 36, 42, 46) }
+template allowedFn bs_ag_blks_res_2  := { frame_nr := (16, 22, 26, 32, 36, 42, 46) }
+template allowedFn bs_ag_blks_res_3  := { frame_nr := (22, 26, 32, 36, 42, 46) }
+template allowedFn bs_ag_blks_res_4  := { frame_nr := (26, 32, 36, 42, 46) }
+template allowedFn bs_ag_blks_res_5  := { frame_nr := (32, 36, 42, 46) }
+template allowedFn bs_ag_blks_res_6  := { frame_nr := (36, 42, 46) }
+template allowedFn bs_ag_blks_res_7  := { frame_nr := (42, 46) }
+function check_pch_fn(integer frame_nr, integer bs_ag_blks_res) runs on test_CT
+{
+	var integer frame_nr_51;
+	frame_nr_51 := frame_nr mod 51
+
+	var allowedFn fn_check;
+	fn_check.frame_nr := frame_nr_51;
+
+	if (bs_ag_blks_res < 0 or bs_ag_blks_res > 7) {
+		setverdict(fail, "bs_ag_blks_res out of valid range (0..7)");
+		mtc.stop;
+		return;
+	}
+
+	if (bs_ag_blks_res == 0 and match(fn_check, bs_ag_blks_res_0)) {
+		return;
+	}
+	if (bs_ag_blks_res == 1 and match(fn_check, bs_ag_blks_res_1)) {
+		return;
+	}
+	if (bs_ag_blks_res == 2 and match(fn_check, bs_ag_blks_res_2)) {
+		return;
+	}
+	if (bs_ag_blks_res == 3 and match(fn_check, bs_ag_blks_res_3)) {
+		return;
+	}
+	if (bs_ag_blks_res == 4 and match(fn_check, bs_ag_blks_res_4)) {
+		return;
+	}
+	if (bs_ag_blks_res == 5 and match(fn_check, bs_ag_blks_res_5)) {
+		return;
+	}
+	if (bs_ag_blks_res == 6 and match(fn_check, bs_ag_blks_res_6)) {
+		return;
+	}
+	if (bs_ag_blks_res == 7 and match(fn_check, bs_ag_blks_res_7)) {
+		return;
+	}
+
+	setverdict(fail, "received paging on AGCH");
+	mtc.stop;
+	return;
+}
+
+altstep as_l1_count_paging(inout integer num_paging_rcv_msgs, inout integer num_paging_rcv_ids, PagingTestCfg cfg)
 runs on test_CT {
 	var L1ctlDlMessage dl;
 	[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_DummyUI)) {
@@ -1542,6 +1595,9 @@
 		var octetstring without_plen :=
 			substr(dl.payload.data_ind.payload, 1, lengthof(dl.payload.data_ind.payload)-1);
 		var PDU_ML3_NW_MS rr := dec_PDU_ML3_NW_MS(without_plen);
+
+		check_pch_fn(dl.dl_info.frame_nr, cfg.bs_ag_blks_res);
+
 		if (match(rr, tr_PAGING_REQ1)) {
 			num_paging_rcv_msgs := num_paging_rcv_msgs + 1;
 			num_paging_rcv_ids := num_paging_rcv_ids + 1;
@@ -1659,7 +1715,7 @@
 			repeat;
 			}
 		/* check if paging requests arrive on Um side */
-		[] as_l1_count_paging(st.num_paging_rcv_msgs, st.num_paging_rcv_ids);
+		[] as_l1_count_paging(st.num_paging_rcv_msgs, st.num_paging_rcv_ids, cfg);
 		[] L1CTL.receive { repeat; }
 		[] T_itv.timeout { }
 		[] as_rsl_res_ind();
@@ -1670,7 +1726,7 @@
 	timer T_wait := 18.0;
 	T_wait.start;
 	alt {
-	[] as_l1_count_paging(st.num_paging_rcv_msgs, st.num_paging_rcv_ids);
+	[] as_l1_count_paging(st.num_paging_rcv_msgs, st.num_paging_rcv_ids, cfg);
 	[] L1CTL.receive { repeat; }
 	/* 65535 == empty paging queue, we can terminate*/
 	[] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_PAGING_LOAD_IND(65535))) { }

-- 
To view, visit https://gerrit.osmocom.org/10726
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: I839e75ece05166518bf7132acd3017434b3d3bc2
Gerrit-Change-Number: 10726
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180912/b23efe7f/attachment.htm>


More information about the gerrit-log mailing list