Change in osmo-ttcn3-hacks[master]: bsc: add intra-BSC handover tests with encryption

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Jun 21 20:18:36 UTC 2021


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

Change subject: bsc: add intra-BSC handover tests with encryption
......................................................................

bsc: add intra-BSC handover tests with encryption

In f_tc_ho_int(), verify encryption information for the handover
target's chan act.

Add test cases calling f_tc_ho_int() with various A5/n encryption modes.

Related: SYS#5324
Change-Id: Iaab26c708c106a61b762234d42ed9a52cdc2998c
---
M bsc/BSC_Tests.ttcn
1 file changed, 50 insertions(+), 0 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 a008bb8..2908ac8 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -4715,6 +4715,11 @@
 	/* Check the amount of MGCP transactions is still consistant with the
 	 * test expectation */
 	f_check_mgcp_expectations()
+
+	/* Ensure the Channel Activation for the new channel contained the right encryption params. as_handover() set
+	 * g_chan_nr to the new lchan that was handed over to. It lives in bts 1, so look it up at RSL1_PROC. */
+	f_verify_encr_info(f_rslem_get_last_act(RSL1_PROC, 0, g_chan_nr));
+
 	f_sleep(0.5);
 }
 
@@ -4741,6 +4746,47 @@
 	f_shutdown_helper();
 }
 
+function f_tc_ho_int_a5(OCT1 encr_alg) runs on test_CT {
+	var MSC_ConnHdlr vc_conn;
+	var TestHdlrParams pars := f_gen_test_hdlr_pars();
+	pars.encr := valueof(t_EncrParams(encr_alg, f_rnd_octstring(8), f_rnd_octstring(16)));
+
+	f_init(2, true);
+	f_sleep(1.0);
+
+	f_ctrs_bsc_and_bts_init();
+
+	vc_conn := f_start_handler(refers(f_tc_ho_int), pars);
+	vc_conn.done;
+
+	/* from f_establish_fully() */
+	f_ctrs_bsc_and_bts_add(0, "assignment:attempted");
+	f_ctrs_bsc_and_bts_add(0, "assignment:completed");
+	/* from handover */
+	f_ctrs_bsc_and_bts_add(0, "handover:attempted");
+	f_ctrs_bsc_and_bts_add(0, "handover:completed");
+	f_ctrs_bsc_and_bts_add(0, "intra_bsc_ho:attempted");
+	f_ctrs_bsc_and_bts_add(0, "intra_bsc_ho:completed");
+	f_ctrs_bsc_and_bts_verify();
+	f_shutdown_helper();
+}
+
+testcase TC_ho_int_a5_0() runs on test_CT {
+	f_tc_ho_int_a5('01'O);
+}
+
+testcase TC_ho_int_a5_1() runs on test_CT {
+	f_tc_ho_int_a5('02'O);
+}
+
+testcase TC_ho_int_a5_3() runs on test_CT {
+	f_tc_ho_int_a5('08'O);
+}
+
+testcase TC_ho_int_a5_4() runs on test_CT {
+	f_tc_ho_int_a5('10'O);
+}
+
 /* intra-BSC hand-over with CONNection FAILure and cause Radio Link Failure: check RR release cause */
 private function f_tc_ho_int_radio_link_failure(charstring id) runs on MSC_ConnHdlr {
 	g_pars := f_gen_test_hdlr_pars();
@@ -9059,6 +9105,10 @@
 	execute( TC_err_84_unknown_msg() );
 
 	execute( TC_ho_int() );
+	execute( TC_ho_int_a5_0() );
+	execute( TC_ho_int_a5_1() );
+	execute( TC_ho_int_a5_3() );
+	execute( TC_ho_int_a5_4() );
 	execute( TC_ho_int_radio_link_failure() );
 
 	execute( TC_ho_out_of_this_bsc() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24728
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: Iaab26c708c106a61b762234d42ed9a52cdc2998c
Gerrit-Change-Number: 24728
Gerrit-PatchSet: 6
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/20210621/ac35dfdf/attachment.htm>


More information about the gerrit-log mailing list