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/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19216 ) Change subject: bsc: test RR Channel Release EARFCNs ...................................................................... bsc: test RR Channel Release EARFCNs Add a DCHAN and release to recently added SI2quater tests (because these tests already configure various amounts of EARFCNs in osmo-bsc). Verify that the RR Channel Release for CSFB contains all configured EARFCNs. In GSM_RR_Types.ttcn, add coding for "Cell selection indicator after release of all TCH and SDCCH IE". In f_expect_chan_rel(), add optional arg csfb_expect_cells, and, if present, decode the RR Channel Release message's L3 part, and in turn the Cell Selection Indicator Value contained. Match against csfb_expect_cells. In f_tc_si2quater_n_earfcns(), also compose a list of EARFCNs as found in the RR Channel Release, and pass to f_expect_chan_rel(). Depends: I59e427e4ebb1c6af99b27a15c40fed82457ac8ab (osmo-bsc) Change-Id: I882c5e1f70bcc4833fc837a95c900ce291919cc5 --- M bsc/BSC_Tests.ttcn M library/GSM_RR_Types.ttcn 2 files changed, 162 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/19216/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index cc7346f..10947b0 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1441,13 +1441,15 @@ boolean expect_rr_chan_rel := true, boolean expect_rll_rel_req := true, boolean handle_rll_rel := true, - boolean is_csfb := false + boolean is_csfb := false, + template CellSelectionIndicatorValue csfb_expect_cells := omit ) runs on test_CT { var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); var boolean got_deact_sacch := false; var boolean got_rr_chan_rel := false; var boolean got_rll_rel_req := false; + var ASP_RSL_Unitdata ud; log("f_expect_chan_rel() expecting: expect_deact_sacch=", expect_deact_sacch, " expect_rr_chan_rel=", expect_rr_chan_rel, " expect_rll_rel_req=", expect_rll_rel_req); alt { @@ -1455,8 +1457,27 @@ got_deact_sacch := true; repeat; } - [is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE_CSFB))) { + [is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE_CSFB))) -> value ud { got_rr_chan_rel := true; + + if (ispresent(csfb_expect_cells)) { + var RSL_IE_Body l3_ie; + if (f_rsl_find_ie(ud.rsl, RSL_IE_L3_INFO, l3_ie) == false) { + setverdict(fail, "cannot find L3"); + mtc.stop; + } + var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(l3_ie.l3_info.payload); + var CellSelectionIndicatorValue cells := dec_CellSelectionIndicatorValue( + l3.msgs.rrm.channelRelease.cellSelectionIndicator.cellSelectionIndicatorValue); + + log("GOT RR CHANNEL RELEASE CSFB CELLS: ", cells); + if (match(cells, csfb_expect_cells)) { + setverdict(pass); + } else { + log("EXPECTED CSFB CELLS: ", csfb_expect_cells); + setverdict(fail, "Received CSFB cells list on RR Channel Release does not match expectations"); + } + } repeat; } [not is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE))) { @@ -1735,7 +1756,8 @@ } } -function f_test_si2quater(integer total_earfcns, template SystemInformationConfig expect_si) runs on test_CT { +function f_test_si2quater(integer total_earfcns, template SystemInformationConfig expect_si, + template CellSelectionIndicatorValue expect_cells := omit) runs on test_CT { f_init(0); @@ -1747,6 +1769,30 @@ f_init_bts_and_check_sysinfo(0, expect_si := expect_si); + f_init(1); + + if (ispresent(expect_cells)) { + /* Also check that RR Channel Release contains these EARFCNs. + * (copied code from TC_chan_rel_hard_clear_csfb) */ + var BSSAP_N_DATA_ind rx_di; + var DchanTuple dt; + + dt := f_est_dchan('23'O, 23, '00010203040506'O); + + /* Instruct BSC to clear channel */ + var BssmapCause cause := 0; + BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_ClearCommandCSFB(cause))); + + /* expect Clear Complete from BSC on A */ + BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_ClearComplete)) { + /* release the SCCP connection */ + BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0)); + } + + f_expect_chan_rel(0, dt.rsl_chan_nr, expect_rll_rel_req := false, is_csfb := true, + csfb_expect_cells := expect_cells); + } + for (var integer i := 1; i < total_earfcns; i := i + 1) { f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list del earfcn " & int2str(f_test_si2quater_earfcn_by_idx(i))}); } @@ -1770,11 +1816,24 @@ return si2quater; } +private function f_tr_rr_chan_rel_earfcns(integer count) return template CellSelectionIndicatorValue +{ + var template CellSelectionIndicatorValue_EUTRAN_Descriptions cells := {}; + + for (var integer i := 0; i < count; i := i + 1) { + var integer earfcn := f_test_si2quater_earfcn_by_idx(i); + cells[i] := tr_CellSelectionIndicatorValue_EUTRAN_Description(earfcn, meas_bw_presence := '0'B, meas_bw := omit); + } + + return tr_CellSelectionIndicatorValue_EUTRAN(cells); +} + private function f_tc_si2quater_n_earfcns(integer n) runs on test_CT { var template SystemInformationConfig sic := SystemInformationConfig_default; sic.si2quater := f_tr_si2quater_earfcns(n); - f_test_si2quater(n, sic); + var template CellSelectionIndicatorValue cells := f_tr_rr_chan_rel_earfcns(n); + f_test_si2quater(n, sic, cells); } testcase TC_si2quater_2_earfcns() runs on test_CT { diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn index 4b460b1..faa0429 100644 --- a/library/GSM_RR_Types.ttcn +++ b/library/GSM_RR_Types.ttcn @@ -1070,4 +1070,103 @@ ext_ra := ext_ra }; + + type record CellSelectionIndicatorValue { + BIT3 discr, + CellSelectionIndicatorValueEnum value_list, + BIT1 value_list_term ('0'B) + } with { + variant (value_list) "CROSSTAG( + gsm, discr='000'B; + utran_fdd, discr='001'B; + utran_tdd, discr='010'B; + eutran, discr='011'B; + )" + }; + + type union CellSelectionIndicatorValueEnum { + CellSelectionIndicatorValue_GSM_Descriptions gsm, + CellSelectionIndicatorValue_UTRAN_Descriptions utran_fdd, + CellSelectionIndicatorValue_UTRAN_Descriptions utran_tdd, + CellSelectionIndicatorValue_EUTRAN_Descriptions eutran + } with { variant "" }; + + type record of CellSelectionIndicatorValue_GSM_Description CellSelectionIndicatorValue_GSM_Descriptions; + type record CellSelectionIndicatorValue_GSM_Description { + BIT1 item_ind ('1'B), + BIT1 band_indicator, + uint10_t arfcn, + uint6_t bsic + } with { + variant "PRESENCE(item_ind = '1'B)" + }; + + type record of CellSelectionIndicatorValue_UTRAN_Description CellSelectionIndicatorValue_UTRAN_Descriptions; + type record CellSelectionIndicatorValue_UTRAN_Description { + BIT1 item_ind ('1'B), + BIT1 bandwidth_presence, + uint3_t bandwidth optional, + uint14_t arfcn, + BIT1 cell_info_presence, + UTRAN_CellInfo cell_info optional + } with { + variant "PRESENCE(item_ind = '1'B)" + variant (bandwidth) "PRESENCE(bandwidth_presence = '1'B)" + variant (cell_info) "PRESENCE(cell_info_presence = '1'B)" + }; + type record UTRAN_CellInfo { + BIT1 indic0, + uint5_t nr_of_cells, + // TODO: define cell_information_field + octetstring cell_information_field + } with { variant "" }; + + type record of CellSelectionIndicatorValue_EUTRAN_Description CellSelectionIndicatorValue_EUTRAN_Descriptions; + type record CellSelectionIndicatorValue_EUTRAN_Description { + BIT1 item_ind ('1'B), + uint16_t earfcn, + BIT1 meas_bw_presence, + uint3_t meas_bw optional, + BIT1 not_allowed_cells_presence, + // define not_allowed_cells + octetstring not_allowed_cells optional, + BIT1 target_pcid_presence, + uint9_t target_pcid optional + } with { + variant "PRESENCE(item_ind = '1'B)" + variant (meas_bw) "PRESENCE(meas_bw_presence = '1'B)" + variant (not_allowed_cells) "PRESENCE(not_allowed_cells_presence = '1'B)" + variant (target_pcid) "PRESENCE(target_pcid_presence = '1'B)" + }; + + template CellSelectionIndicatorValue tr_CellSelectionIndicatorValue_EUTRAN( + template CellSelectionIndicatorValue_EUTRAN_Descriptions cells := {}) + := { + discr := '011'B, + value_list := { + eutran := cells + }, + value_list_term := '0'B + }; + + template CellSelectionIndicatorValue_EUTRAN_Description tr_CellSelectionIndicatorValue_EUTRAN_Description( + template (present) uint16_t earfcn, + template (present) BIT1 meas_bw_presence := ?, + template uint3_t meas_bw := *) + := { + item_ind := '1'B, + earfcn := earfcn, + meas_bw_presence := ?, + meas_bw := meas_bw, + not_allowed_cells_presence := '0'B, + not_allowed_cells := omit, + target_pcid_presence := '0'B, + target_pcid := omit + }; + + external function enc_CellSelectionIndicatorValue(in CellSelectionIndicatorValue ro) return octetstring + with { extension "prototype(convert) encode(RAW)" }; + external function dec_CellSelectionIndicatorValue(in octetstring stream) return CellSelectionIndicatorValue + with { extension "prototype(convert) decode(RAW)" }; + } with { encode "RAW" ; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19216 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: I882c5e1f70bcc4833fc837a95c900ce291919cc5 Gerrit-Change-Number: 19216 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200711/70db2d5c/attachment.htm>