Change in osmo-ttcn3-hacks[master]: bsc: add TC_stats_conn_fail

osmith gerrit-no-reply at lists.osmocom.org
Thu Aug 26 13:43:56 UTC 2021


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


Change subject: bsc: add TC_stats_conn_fail
......................................................................

bsc: add TC_stats_conn_fail

Verify that stat bts.N.chan.rf_fail_sdcch works correctly.

Related: SYS#4878
Change-Id: I310ea1609168bc26790875767943e0545ed05177
---
M bsc/BSC_Tests.ttcn
M bsc/README.txt
2 files changed, 44 insertions(+), 1 deletion(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 2471a50..6befa69 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1782,6 +1782,48 @@
 	f_shutdown_helper();
 }
 
+private function f_TC_stats_conn_fail(charstring id) runs on MSC_ConnHdlr {
+	var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail;
+	var PDU_BSSAP ass_cmd := f_gen_ass_req();
+
+	f_statsd_reset();
+
+	/* Establish SDCCH */
+	ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCSD);
+	f_establish_fully(ass_cmd, exp_fail);
+
+	/* Expect stats to be 0 */
+	var StatsDExpects expect := {
+		{name := "TTCN3.bts.0.chan.rf_fail", mtype := "c", min := 0, max := 0},
+		{name := "TTCN3.bts.0.chan.rf_fail_sdcch", mtype := "c", min := 0, max := 0}
+	};
+	f_statsd_expect(expect);
+
+	/* Simulate CONN FAIL IND on SDCCH */
+	RSL.send(ts_ASP_RSL_UD(
+			ts_RSL_CONN_FAIL_IND(g_chan_nr, RSL_ERR_RADIO_LINK_FAIL),
+			IPAC_PROTO_RSL_TRX0));
+
+	/* Expect stats to be 1 */
+	expect := {
+		{name := "TTCN3.bts.0.chan.rf_fail", mtype := "c", min := 1, max := 1},
+		{name := "TTCN3.bts.0.chan.rf_fail_sdcch", mtype := "c", min := 1, max := 1}
+	};
+	f_statsd_expect(expect);
+}
+testcase TC_stats_conn_fail() runs on test_CT {
+	var TestHdlrParams pars := f_gen_test_hdlr_pars();
+	var MSC_ConnHdlr vc_conn;
+
+	f_init(1, true);
+	f_sleep(1.0);
+
+	vc_conn := f_start_handler(refers(f_TC_stats_conn_fail), pars);
+	vc_conn.done;
+
+	f_shutdown_helper();
+}
+
 function f_expect_chan_rel(integer bts_nr, RslChannelNr rsl_chan_nr,
 			   boolean expect_deact_sacch := true,
 			   boolean expect_rr_chan_rel := true,
@@ -10092,6 +10134,7 @@
 	/* at bottom as they might crash OsmoBSC before OS#3182 is fixed */
 	execute( TC_early_conn_fail() );
 	execute( TC_late_conn_fail() );
+	execute( TC_stats_conn_fail() );
 
 	/* Emergency call handling (deny / allow) */
 	execute( TC_assignment_emerg_setup_allow() );
diff --git a/bsc/README.txt b/bsc/README.txt
index aa785ad..e992dba 100644
--- a/bsc/README.txt
+++ b/bsc/README.txt
@@ -62,7 +62,7 @@
 
 x no response to CHAN ACT
 x CONN FAIL IND from BTS
-** verify counter increment of BTS_CTR_CHAN_RF_FAIL
+xx verify counter increment of BTS_CTR_CHAN_RF_FAIL
 * no (or late?) response to RF CHAN REL
 * no (or late?) response to RLL RELEASE REQ
 x RLL messages on not-activated channels

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25266
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: I310ea1609168bc26790875767943e0545ed05177
Gerrit-Change-Number: 25266
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210826/2d588ba0/attachment.htm>


More information about the gerrit-log mailing list