diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-01-31 15:51:06 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-01-31 16:08:26 +0100 |
commit | 751d3eb19fb0b8041fa6a969fc44ca7c05d07b05 (patch) | |
tree | 9ff140cf23f0986ff08ca7e134c44b68b1a1bbae | |
parent | 2fccd98a63a61a192a5af3bcd43204c0e4fd9be9 (diff) |
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
-rw-r--r-- | bsc/BSC_Tests.ttcn | 37 | ||||
-rw-r--r-- | library/BSSMAP_Templates.ttcn | 12 |
2 files changed, 48 insertions, 1 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 528b1c75..467ce4f7 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -970,6 +970,7 @@ private function f_pageing_helper(hexstring imsi, } 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 @@ testcase TC_paging_imsi_nochan_all() runs on test_CT { } /* Paging by PLMN+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 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 in one LAC): Verify all of them page */ /* 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 @@ control { 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 c98f5eb0..f0a8a084 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -695,6 +695,18 @@ template BSSMAP_FIELD_CellIdentification_LAI ts_BSSMAP_CI_LAI(GsmMcc mcc, GsmMnc 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, |