Change in osmo-ttcn3-hacks[master]: bsc: add RSL, RSL_PROC port args in various places

laforge gerrit-no-reply at lists.osmocom.org
Tue Jul 27 07:28:27 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25017 )

Change subject: bsc: add RSL, RSL_PROC port args in various places
......................................................................

bsc: add RSL, RSL_PROC port args in various places

To be able to run tests on a cell other than bts 0, there needs to be a
way to select the RSL_DCHAN_PT and RSLEM_PROC_PT in various places.

Upcoming BSC_Tests.TC_cm_reestablishment depends on this, to be able to
run through an Assignment on bts 1.

Related: SYS#5130
Change-Id: Ia14f46d4e5e8d4722224b97c346c0cb7973fff97
---
M bsc/BSC_Tests.ttcn
1 file changed, 40 insertions(+), 38 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index dc3df66..6860907 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -5539,7 +5539,7 @@
 		exp_rr_rel_tmpl := tr_RRM_RR_RELEASE;
 	}
 	f_ho_into_this_bsc(id, oldToNewBSSIEs);
-	f_perform_clear(RSL, exp_rr_rel_tmpl);
+	f_perform_clear(exp_rr_rel_tmpl := exp_rr_rel_tmpl);
 	setverdict(pass);
 }
 function f_tc_ho_into_this_bsc_main(TestHdlrParams pars) runs on test_CT {
@@ -7215,33 +7215,34 @@
 template MobileIdentityLV ts_MI_TMSI_NRI_LV(integer nri_v, integer nri_bitlen := 10) :=
 	ts_MI_TMSI_LV(tmsi := f_gen_tmsi(suffix := 0, nri_v := nri_v, nri_bitlen := nri_bitlen));
 
-private function f_expect_lchan_rel(RSL_DCHAN_PT rsl, template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE)
+private function f_expect_lchan_rel(RSL_DCHAN_PT rsl_pt, RSLEM_PROC_PT rsl_proc_pt, template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE)
 runs on MSC_ConnHdlr {
 	interleave {
-	[] rsl.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch exp_rr_rel_tmpl)) {
+	[] rsl_pt.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch exp_rr_rel_tmpl)) {
 			f_logp(BSCVTY, "Got RSL RR Release");
 		}
-	[] rsl.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
+	[] rsl_pt.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
 			f_logp(BSCVTY, "Got RSL Deact SACCH");
 		}
-	[] rsl.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
+	[] rsl_pt.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
 			f_logp(BSCVTY, "Got RSL RF Chan Rel, sending Rel Ack");
-			rsl.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
-			f_rslem_unregister(0, g_chan_nr);
+			rsl_pt.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
+			f_rslem_unregister(0, g_chan_nr, PT := rsl_proc_pt);
 			break;
 		}
 	}
 }
 
-friend function f_perform_clear(RSL_DCHAN_PT rsl, template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE)
+friend function f_perform_clear(RSL_DCHAN_PT rsl_pt := RSL, RSLEM_PROC_PT rsl_proc_pt := RSL_PROC,
+                                template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE)
 runs on MSC_ConnHdlr {
 	f_logp(BSCVTY, "MSC instructs BSC to clear channel");
 	BSSAP.send(ts_BSSMAP_ClearCommand(0));
 	interleave {
-	[] rsl.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch exp_rr_rel_tmpl)) {
+	[] rsl_pt.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch exp_rr_rel_tmpl)) {
 			f_logp(BSCVTY, "Got RSL RR Release");
 		}
-	[] rsl.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
+	[] rsl_pt.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
 			f_logp(BSCVTY, "Got RSL Deact SACCH");
 		}
 	[] BSSAP.receive(tr_BSSMAP_ClearComplete) {
@@ -7249,15 +7250,16 @@
 			/* Also drop the SCCP connection */
 			BSSAP.send(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
 		}
-	[] rsl.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
+	[] rsl_pt.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
 			f_logp(BSCVTY, "Got RSL RF Chan Rel, sending Rel Ack");
-			rsl.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
-			f_rslem_unregister(0, g_chan_nr);
+			rsl_pt.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
+			f_rslem_unregister(0, g_chan_nr, PT := rsl_proc_pt);
 		}
 	}
 }
 
-private function f_perform_compl_l3(RSL_DCHAN_PT rsl, template PDU_ML3_MS_NW l3_info, boolean do_clear := true, boolean expect_bssmap_l3 := true)
+private function f_perform_compl_l3(RSL_DCHAN_PT rsl_pt, RSLEM_PROC_PT rsl_proc_pt,
+                                    template PDU_ML3_MS_NW l3_info, boolean do_clear := true, boolean expect_bssmap_l3 := true)
 runs on MSC_ConnHdlr {
 	timer T := 10.0;
 	var octetstring l3_enc := enc_PDU_ML3_MS_NW(valueof(l3_info));
@@ -7265,17 +7267,17 @@
 	f_logp(BSCVTY, "establish channel, send Complete Layer 3 Info");
 	f_create_bssmap_exp(l3_enc);
 
-	/* RSL_Emulation.f_chan_est() on rsl:
-	 * This is basically code dup with s/RSL/rsl from:
+	/* RSL_Emulation.f_chan_est() on rsl_pt:
+	 * This is basically code dup with s/RSL/rsl_pt from:
 	 * RSL_Emulation.f_chan_est(g_pars.ra, l3_enc, g_pars.link_id, g_pars.fn);
 	 */
 	var RSL_Message rx_rsl;
 	var GsmRrMessage rr;
 
 	/* request a channel to be established */
-	rsl.send(ts_RSLDC_ChanRqd(g_pars.ra, g_pars.fn));
+	rsl_pt.send(ts_RSLDC_ChanRqd(g_pars.ra, g_pars.fn));
 	/* expect immediate assignment.
-	 * Code dup with s/RSL/rsl from:
+	 * Code dup with s/RSL/rsl_pt from:
 	 * rx_rsl := f_rx_or_fail(tr_RSL_IMM_ASSIGN);
 	 */
 	timer Tt := 10.0;
@@ -7283,10 +7285,10 @@
 	/* request a channel to be established */
 	Tt.start;
 	alt {
-		[] rsl.receive(tr_RSL_IMM_ASSIGN) -> value rx_rsl {
+		[] rsl_pt.receive(tr_RSL_IMM_ASSIGN) -> value rx_rsl {
 			Tt.stop;
 		}
-		[] rsl.receive {
+		[] rsl_pt.receive {
 			setverdict(fail, "Unexpected RSL message on DCHAN");
 			mtc.stop;
 		}
@@ -7297,7 +7299,7 @@
 	}
 	rr := dec_GsmRrMessage(rx_rsl.ies[1].body.full_imm_ass_info.payload);
 	g_chan_nr := rr.payload.imm_ass.chan_desc.chan_nr;
-	rsl.send(ts_RSL_EST_IND(g_chan_nr, valueof(g_pars.link_id), l3_enc));
+	rsl_pt.send(ts_RSL_EST_IND(g_chan_nr, valueof(g_pars.link_id), l3_enc));
 
 
 	if (expect_bssmap_l3) {
@@ -7328,12 +7330,12 @@
 		/* start ciphering, if requested */
 		if (ispresent(g_pars.encr)) {
 			f_logp(BSCVTY, "start ciphering");
-			f_cipher_mode(g_pars.encr);
+			f_cipher_mode(g_pars.encr, rsl_pt := rsl_pt, rsl_proc_pt := rsl_proc_pt);
 		}
 	}
 
 	if (do_clear) {
-		f_perform_clear(rsl);
+		f_perform_clear(rsl_pt, rsl_proc_pt);
 	}
 	setverdict(pass);
 	f_sleep(1.0);
@@ -7342,21 +7344,21 @@
 private function f_tc_mscpool_compl_l3(charstring id) runs on MSC_ConnHdlr {
 	f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
 	if (g_pars.mscpool.rsl_idx == 0) {
-		f_perform_compl_l3(RSL, g_pars.mscpool.l3_info);
+		f_perform_compl_l3(RSL, RSL_PROC, g_pars.mscpool.l3_info);
 	} else if (g_pars.mscpool.rsl_idx == 1) {
-		f_perform_compl_l3(RSL1, g_pars.mscpool.l3_info);
+		f_perform_compl_l3(RSL1, RSL1_PROC, g_pars.mscpool.l3_info);
 	} else if (g_pars.mscpool.rsl_idx == 2) {
-		f_perform_compl_l3(RSL2, g_pars.mscpool.l3_info);
+		f_perform_compl_l3(RSL2, RSL2_PROC, g_pars.mscpool.l3_info);
 	}
 }
 
 /* Various Complete Layer 3 by IMSI all end up with the first MSC, because the other MSCs are not connected. */
 private function f_tc_mscpool_L3Compl_on_1_msc(charstring id) runs on MSC_ConnHdlr {
 	f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
-	f_perform_compl_l3(RSL, ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_IMSI_LV('001010000000001'H)), '00F110'O) );
-	f_perform_compl_l3(RSL, ts_CM_SERV_REQ(CM_TYPE_MO_SMS, valueof(ts_MI_IMSI_LV('001010000000002'H))) );
-	f_perform_compl_l3(RSL, ts_PAG_RESP(valueof(ts_MI_IMSI_LV('001010000000003'H))) );
-	f_perform_compl_l3(RSL, ts_ML3_MO_MM_IMSI_DET_Ind(valueof(ts_MI_IMSI_LV('001010000000004'H))) );
+	f_perform_compl_l3(RSL, RSL_PROC, ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_IMSI_LV('001010000000001'H)), '00F110'O) );
+	f_perform_compl_l3(RSL, RSL_PROC, ts_CM_SERV_REQ(CM_TYPE_MO_SMS, valueof(ts_MI_IMSI_LV('001010000000002'H))) );
+	f_perform_compl_l3(RSL, RSL_PROC, ts_PAG_RESP(valueof(ts_MI_IMSI_LV('001010000000003'H))) );
+	f_perform_compl_l3(RSL, RSL_PROC, ts_ML3_MO_MM_IMSI_DET_Ind(valueof(ts_MI_IMSI_LV('001010000000004'H))) );
 }
 testcase TC_mscpool_L3Compl_on_1_msc() runs on test_CT {
 
@@ -7744,7 +7746,7 @@
 
 	/* Despite the round robin pointing at the second MSC ('roundrobin next 1'), the earlier Paging for the same IMSI
 	 * causes this Paging Response to go to the first MSC (bssap_idx := 0). */
-	f_perform_compl_l3(RSL, ts_PAG_RESP(valueof(ts_MI_IMSI_LV(imsi))) );
+	f_perform_compl_l3(RSL, RSL_PROC, ts_PAG_RESP(valueof(ts_MI_IMSI_LV(imsi))) );
 	f_sleep(1.0);
 }
 testcase TC_mscpool_paging_and_response_imsi() runs on test_CT {
@@ -7796,7 +7798,7 @@
 	/* Despite the NRI matching the second MSC (NRI from 'msc 1' in osmo-bsc.cfg) and round robin pointing at the
 	 * third MSC ('roundrobin next 2'), the earlier Paging for the same TMSI causes this Paging Response to go to
 	 * the first MSC (bssap_idx := 0). */
-	f_perform_compl_l3(RSL, ts_PAG_RESP(valueof(ts_MI_TMSI_NRI_LV(nri_v))) );
+	f_perform_compl_l3(RSL, RSL_PROC, ts_PAG_RESP(valueof(ts_MI_TMSI_NRI_LV(nri_v))) );
 	f_sleep(1.0);
 }
 testcase TC_mscpool_paging_and_response_tmsi() runs on test_CT {
@@ -8738,7 +8740,7 @@
 	/* The LCS was using an active A-interface conn. It should still remain active after this. */
 	f_mo_l3_transceive();
 
-	f_perform_clear(RSL);
+	f_perform_clear();
 
 	f_sleep(2.0);
 	setverdict(pass);
@@ -8847,8 +8849,8 @@
 
 	/* MS requests channel. Since the Paging was for LCS, the Paging Response does not trigger a Complete Layer 3 to
 	 * the MSC, and releases the lchan directly. */
-	f_perform_compl_l3(RSL, ts_PAG_RESP(valueof(ts_MI_IMSI_LV(g_pars.imsi))), do_clear := false, expect_bssmap_l3 := false);
-	f_expect_lchan_rel(RSL);
+	f_perform_compl_l3(RSL, RSL_PROC, ts_PAG_RESP(valueof(ts_MI_IMSI_LV(g_pars.imsi))), do_clear := false, expect_bssmap_l3 := false);
+	f_expect_lchan_rel(RSL, RSL_PROC);
 
 	/* From the Paging Response, the TA is now known to the BSC, and it responds to the SMLC. */
 
@@ -9080,7 +9082,7 @@
 
 	/* As the A-interface conn was established for LCS, the MS coincidentally decides to issue a CM Service Request
 	 * and establish Layer 3. It should use the existing A-interface conn. */
-	f_perform_compl_l3(RSL, valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_IMSI_LV(g_pars.imsi)))),
+	f_perform_compl_l3(RSL, RSL_PROC, valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_IMSI_LV(g_pars.imsi)))),
 			do_clear := false, expect_bssmap_l3 := true);
 
 	/* SMLC wants to ask the TA from the BSC explicitly in a BSSLAP TA Request message */
@@ -9097,7 +9099,7 @@
 	/* The lchan should still exist, it was from a CM Service Request. */
 	f_mo_l3_transceive();
 
-	f_perform_clear(RSL);
+	f_perform_clear();
 
 	f_sleep(2.0);
 	setverdict(pass);
@@ -9174,7 +9176,7 @@
 	f_mo_l3_transceive(RSL1);
 
 	/* MSC decides it is done now. */
-	f_perform_clear(RSL1);
+	f_perform_clear(RSL1, RSL1_PROC);
 
 	f_sleep(2.0);
 	setverdict(pass);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25017
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: Ia14f46d4e5e8d4722224b97c346c0cb7973fff97
Gerrit-Change-Number: 25017
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210727/3b3db320/attachment.htm>


More information about the gerrit-log mailing list