[PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Implement remaining missing paging tests

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
Wed Jan 31 15:08:37 UTC 2018


Review at  https://gerrit.osmocom.org/6215

BSC_Tests: Implement remaining missing paging tests

We now test all of the cell identification types specified in BSSMAP,
and also lists with a length != 1 entry.

Change-Id: I261f948d6054d0c90078c1dd0b2785a967b0a49b
---
M bsc/BSC_Tests.ttcn
M library/BSSMAP_Templates.ttcn
2 files changed, 50 insertions(+), 3 deletions(-)


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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 528b1c7..467ce4f 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -970,6 +970,7 @@
 }
 
 const BtsIdList c_BtsId_all := { 0, 1, 2 };
+const BtsIdList c_BtsId_none := { };
 const BtsIdList c_BtsId_LAC1 := { 0, 1 };
 const BtsIdList c_BtsId_LAC2 := { 2 };
 
@@ -1077,11 +1078,40 @@
 }
 
 /* Paging by PLMN+LAC+RNC */
-/* Paging by RNC */
-/* Paging by LAC+RNC */
+testcase TC_paging_imsi_nochan_plmn_lac_rnc() runs on test_CT {
+	var template BSSMAP_FIELD_CellIdentificationList cid_list;
+	cid_list := { cIl_PLMN_LAC_RNC := { ts_BSSMAP_CI_PLMN_LAC_RNC(cid.mcc, cid.mnc, cid.lac, 12) } };
+	f_pageing_helper('001010000000012'H, cid_list, c_BtsId_none);
+}
 
-/* Paging on multiple cells (multiple in one LAC): Verify all of them page */
+/* Paging by RNC */
+testcase TC_paging_imsi_nochan_rnc() runs on test_CT {
+	var template BSSMAP_FIELD_CellIdentificationList cid_list;
+	cid_list := { cIl_RNC := { int2oct(13, 2) } };
+	f_pageing_helper('001010000000013'H, cid_list, c_BtsId_none);
+}
+
+/* Paging by LAC+RNC */
+testcase TC_paging_imsi_nochan_lac_rnc() runs on test_CT {
+	var template BSSMAP_FIELD_CellIdentificationList cid_list;
+	cid_list := { cIl_LAC_RNC := { ts_BSSMAP_CI_LAC_RNC(cid.lac, 14) } };
+	f_pageing_helper('001010000000014'H, cid_list, c_BtsId_none);
+}
+
 /* Paging on multiple cells (multiple entries in list): Verify all of them page */
+testcase TC_paging_imsi_nochan_lacs() runs on test_CT {
+	var template BSSMAP_FIELD_CellIdentificationList cid_list;
+	cid_list := { cIl_LAC := { ts_BSSMAP_CI_LAC(1), ts_BSSMAP_CI_LAC(2) } };
+	f_pageing_helper('001010000000015'H, cid_list, c_BtsId_all);
+}
+
+/* Paging on empty list: Verify none of them page */
+testcase TC_paging_imsi_nochan_lacs_empty() runs on test_CT {
+	var template BSSMAP_FIELD_CellIdentificationList cid_list;
+	cid_list := { cIl_LAC := { } };
+	f_pageing_helper('001010000000016'H, cid_list, c_BtsId_none);
+}
+
 /* Verify paging retransmission interval + count */
 /* Verify paging stops after channel establishment */
 /* Test behavior under paging overload */
@@ -1421,6 +1451,11 @@
 	execute( TC_paging_imsi_nochan_lai() );
 	execute( TC_paging_imsi_nochan_lac() );
 	execute( TC_paging_imsi_nochan_all() );
+	execute( TC_paging_imsi_nochan_plmn_lac_rnc() );
+	execute( TC_paging_imsi_nochan_rnc() );
+	execute( TC_paging_imsi_nochan_lac_rnc() );
+	execute( TC_paging_imsi_nochan_lacs() );
+	execute( TC_paging_imsi_nochan_lacs_empty() );
 	execute( TC_paging_imsi_a_reset() );
 	execute( TC_paging_imsi_load() );
 
diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index c98f5eb..f0a8a08 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -695,6 +695,18 @@
 template OCT2 ts_BSSMAP_CI_CI(GsmCellId ci) := int2oct(ci, 2);
 template OCT2 ts_BSSMAP_CI_LAC(GsmLac lac) := int2oct(lac, 2);
 
+template BSSMAP_FIELD_CellIdentification_PLMN_LAC_RNC
+ts_BSSMAP_CI_PLMN_LAC_RNC(GsmMcc mcc, GsmMnc mnc, GsmLac lac, uint16_t rnc_id) := {
+	mcc_mnc := f_enc_mcc_mnc(mcc, mnc),
+	lac := int2oct(lac, 2),
+	rncId := int2oct(rnc_id, 2)
+}
+
+template BSSMAP_FIELD_CellIdentification_LAC_RNC ts_BSSMAP_CI_LAC_RNC(GsmLac lac, uint16_t rnc_id) := {
+	lac := int2oct(lac, 2),
+	rncId := int2oct(rnc_id, 2)
+}
+
 template BSSMAP_IE_ChannelNeeded ts_BSSMAP_IE_ChanNeeded(BIT2 chneed) := {
 	elementIdentifier := '24'O,
 	channel := chneed,

-- 
To view, visit https://gerrit.osmocom.org/6215
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I261f948d6054d0c90078c1dd0b2785a967b0a49b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list