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

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.org
Fri Jul 23 02:04:17 UTC 2021


neels has uploaded this change for review. ( 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(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index c764bcf..5ab3cc7 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -5437,7 +5437,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 {
@@ -7112,33 +7112,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) {
@@ -7146,15 +7147,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));
@@ -7162,17 +7164,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;
@@ -7180,10 +7182,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;
 		}
@@ -7194,7 +7196,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) {
@@ -7225,12 +7227,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);
@@ -7239,21 +7241,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 {
 
@@ -7641,7 +7643,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 {
@@ -7693,7 +7695,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 {
@@ -8622,7 +8624,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);
@@ -8731,8 +8733,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. */
 
@@ -8964,7 +8966,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 */
@@ -8981,7 +8983,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);
@@ -9058,7 +9060,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: 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/20210723/a5edcad3/attachment.htm>


More information about the gerrit-log mailing list