Change in osmo-ttcn3-hacks[master]: bsc: verify TSC in RR HO Cmd of TC_ho_neighbor_config_*

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
Sat Oct 2 13:02:21 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25664 )


Change subject: bsc: verify TSC in RR HO Cmd of TC_ho_neighbor_config_*
......................................................................

bsc: verify TSC in RR HO Cmd of TC_ho_neighbor_config_*

Related: SYS#4895 OS#5244
Related: Iae20df4387c3d75752301bd5daeeea7508966393 (osmo-bsc)
Change-Id: I09cb07561a57527880b87147495619a3bbbceb3f
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 19 insertions(+), 7 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 04e895a..cc387f6 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -6267,7 +6267,8 @@
 				      charstring log_descr,
 				      charstring handover_vty_cmd,
 				      boolean expect_handover,
-				      boolean is_inter_bsc_handover := false)
+				      boolean is_inter_bsc_handover := false,
+				      template uint3_t expect_target_tsc := ?)
 runs on MSC_ConnHdlr
 {
 	/* We're going to thwart any and all handover attempts, just be ready to handle (and ignore) handover target
@@ -6299,6 +6300,17 @@
 			log("Handover to new chan ", new_chan_nr, " on ARFCN ", arfcn);
 			log(l3.msgs.rrm.handoverCommand);
 
+			/* Verify correct TSC in handoverCommand */
+			var uint3_t got_tsc := rr_chan_desc_tsc(l3.msgs.rrm.handoverCommand.channelDescription2);
+			if (not match(got_tsc, expect_target_tsc)) {
+				setverdict(fail, "RR Handover Command: unexpected TSC in Channel Description: expected ",
+					   expect_target_tsc, " got ", got_tsc);
+				mtc.stop;
+			} else {
+				log("handoverCommand: verified TSC = ", got_tsc, " (matches ",
+				    expect_target_tsc, ")");
+			}
+
 			/* Need to register for new lchan on new BTS -- it's either bts 1 or bts 2.  It doesn't really
 			 * matter on which BTS it really is, we're not going to follow through an entire handover
 			 * anyway. */
@@ -6407,7 +6419,7 @@
 	f_bts_0_cfg(BSCVTY, {"no neighbors"});
 	f_probe_for_handover("1.a", "HO to bts 1 works, implicitly listed as neighbor (legacy behavior when none are configured)",
 			"handover any to arfcn 871 bsic 11",
-			true);
+			true, expect_target_tsc := BTS_TSC[1]);
 
 	f_probe_for_handover("1.b", "HO to unknown cell does not start",
 			"handover any to arfcn 13 bsic 39",
@@ -6419,7 +6431,7 @@
 
 	f_probe_for_handover("1.d", "HO to 871-11 still works (verify that this test properly cleans up)",
 			"handover any to arfcn 871 bsic 11",
-			true);
+			true, expect_target_tsc := BTS_TSC[1]);
 }
 testcase TC_ho_neighbor_config_1() runs on test_CT {
 	var MSC_ConnHdlr vc_conn;
@@ -6475,7 +6487,7 @@
 
 	f_probe_for_handover("2.a", "HO to bts 1 works, explicitly listed as neighbor",
 			"handover any to arfcn 871 bsic 11",
-			true);
+			true, expect_target_tsc := BTS_TSC[1]);
 
 	f_probe_for_handover("2.b", "HO to bts 2 doesn't work, not listed as neighbor",
 			"handover any to arfcn 871 bsic 12",
@@ -6528,7 +6540,7 @@
 			false);
 	f_probe_for_handover("3.b", "HO to bts 2 works, explicitly listed as neighbor; no ambiguity because bts 3 is not listed as neighbor",
 			"handover any to arfcn 871 bsic 12",
-			true);
+			true, expect_target_tsc := BTS_TSC[2]);
 }
 testcase TC_ho_neighbor_config_3() runs on test_CT {
 	var MSC_ConnHdlr vc_conn;
@@ -6714,7 +6726,7 @@
 
 	f_probe_for_handover("7.a", "HO to 871-12 does HO to bts 2",
 			"handover any to arfcn 871 bsic 12",
-			true);
+			true, expect_target_tsc := BTS_TSC[2]);
 	f_probe_for_handover("7.b", "HO to 123-45 triggers inter-BSC HO",
 			"handover any to arfcn 123 bsic 45",
 			true, true);
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 2b1f711..cb93bfe 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -955,7 +955,7 @@
 
 }
 
-private function rr_chan_desc_tsc(ChannelDescription2_V cd2)
+function rr_chan_desc_tsc(ChannelDescription2_V cd2)
 	return uint3_t
 {
 	var uint3_t tsc := oct2int(cd2.octet3);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25664
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: I09cb07561a57527880b87147495619a3bbbceb3f
Gerrit-Change-Number: 25664
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/20211002/2dab29d6/attachment.htm>


More information about the gerrit-log mailing list