fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27523 )
Change subject: BSC_Tests: avoid code duplication in f_expect_chan_rel() ......................................................................
BSC_Tests: avoid code duplication in f_expect_chan_rel()
Using a guard statement makes no sense given that we match the cellSelectionIndicatorValue conditionally within the alt branch itself. Removing that guard statement eliminates the need to have an additional alt branch with identical body.
Change-Id: I373376637a083637ce01f3ac59fe5fd2836ac6cd --- M bsc/BSC_Tests.ttcn 1 file changed, 1 insertion(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/23/27523/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b5552e1..9a6980b 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -2052,7 +2052,7 @@ got_deact_sacch := true; repeat; } - [not istemplatekind(expect_cells, "omit")] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE_CellSelectInd))) -> value ud { + [] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE))) -> value ud { got_rr_chan_rel := true;
if (f_rsl_find_ie(ud.rsl, RSL_IE_L3_INFO, l3_ie) == false) { @@ -2084,25 +2084,6 @@ } repeat; } - [istemplatekind(expect_cells, "omit")] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE))) -> value ud { - got_rr_chan_rel := true; - - if (f_rsl_find_ie(ud.rsl, RSL_IE_L3_INFO, l3_ie) == false) { - setverdict(fail, "cannot find L3"); - mtc.stop; - } - l3 := dec_PDU_ML3_NW_MS(l3_ie.l3_info.payload); - - int2enum(oct2int(l3.msgs.rrm.channelRelease.rRCause.valuePart), got_cause); - log("GOT CAUSE CODE: ", l3.msgs.rrm.channelRelease.rRCause.valuePart, " = ", got_cause); - if (match(got_cause, expect_rr_cause)) { - setverdict(pass); - } else { - log("EXPECTED CAUSE CODE: ", expect_rr_cause); - setverdict(fail, "Received RR Channel Release Cause code does not match expectations"); - } - repeat; - } [] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_REL_REQ(rsl_chan_nr, ?))) { got_rll_rel_req := true; /* FIXME: Why are we getting this for LinkID SACCH? */