Change in osmo-ttcn3-hacks[master]: bsc: properly test assignment counters

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
Tue Nov 30 13:21:17 UTC 2021


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

Change subject: bsc: properly test assignment counters
......................................................................

bsc: properly test assignment counters

Verify the BTS level assignment:attempted_speech / _sign as well as
assignment:completed_speech / _sign counters, in four selected
assignment tests (fr, hr, amr_f, amr_h).

Shows a bug where we counted a speech assignment as
assignment:completed_sign.

Related: SYS#4878
Depends: Ie9fcd1e86f27ecb2f11e2e8813faac365cb470b8 (osmo-bsc)
Change-Id: Icb1386ec2ccd70eb3c026301b9b08ad7177278f7
---
M bsc/BSC_Tests.ttcn
1 file changed, 63 insertions(+), 0 deletions(-)

Approvals:
  fixeria: 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 0c03bde..22df0cb 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -4153,16 +4153,57 @@
 	f_establish_fully(ass_cmd, exp_fail);
 }
 
+const CounterNameVals counternames_bsc_bts_assignment := {
+	{ "assignment:attempted", 0 },
+	{ "assignment:completed", 0 },
+	{ "assignment:stopped", 0 },
+	{ "assignment:no_channel", 0 },
+	{ "assignment:timeout", 0 },
+	{ "assignment:failed", 0 },
+	{ "assignment:error", 0 }
+};
+
+const CounterNameVals counternames_bts_assignment := {
+	{ "assignment:attempted_sign", 0 },
+	{ "assignment:attempted_speech", 0 },
+	{ "assignment:completed_sign", 0 },
+	{ "assignment:completed_speech", 0 },
+	{ "assignment:stopped_sign", 0 },
+	{ "assignment:stopped_speech", 0 },
+	{ "assignment:no_channel_sign", 0 },
+	{ "assignment:no_channel_speech", 0 },
+	{ "assignment:timeout_sign", 0 },
+	{ "assignment:timeout_speech", 0 },
+	{ "assignment:failed_sign", 0 },
+	{ "assignment:failed_speech", 0 },
+	{ "assignment:error_sign", 0 },
+	{ "assignment:error_speech", 0 }
+};
+
+function f_ctrs_bsc_and_bts_assignment_init(integer bts_count := NUM_BTS) runs on test_CT {
+	var CounterNameVals bts_names := counternames_bsc_bts_assignment & counternames_bts_assignment;
+	f_ctrs_bts_init(bts_count, bts_names);
+	f_ctrs_bsc_init(counternames_bsc_bts_assignment);
+}
+
 testcase TC_assignment_codec_fr() 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);
+	f_ctrs_bsc_and_bts_assignment_init(1);
 
 	pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
 	vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars);
 	vc_conn.done;
+
+	f_ctrs_bsc_and_bts_add(0, "assignment:attempted", 1);
+	f_ctrs_bts_add(0, "assignment:attempted_speech", 1);
+	f_ctrs_bsc_and_bts_add(0, "assignment:completed", 1);
+	f_ctrs_bts_add(0, "assignment:completed_speech", 1);
+	f_ctrs_bts_verify();
+
 	f_shutdown_helper();
 }
 
@@ -4172,10 +4213,18 @@
 
 	f_init(1, true);
 	f_sleep(1.0);
+	f_ctrs_bsc_and_bts_assignment_init(1);
 
 	pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecHR}));
 	vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars);
 	vc_conn.done;
+
+	f_ctrs_bsc_and_bts_add(0, "assignment:attempted", 1);
+	f_ctrs_bts_add(0, "assignment:attempted_speech", 1);
+	f_ctrs_bsc_and_bts_add(0, "assignment:completed", 1);
+	f_ctrs_bts_add(0, "assignment:completed_speech", 1);
+	f_ctrs_bts_verify();
+
 	f_shutdown_helper();
 }
 
@@ -4258,10 +4307,17 @@
 	f_init(1, true);
 	f_sleep(1.0);
 	f_vty_amr_start_mode_set(true, "1");
+	f_ctrs_bsc_and_bts_assignment_init(1);
 
 	vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars);
 	vc_conn.done;
 
+	f_ctrs_bsc_and_bts_add(0, "assignment:attempted", 1);
+	f_ctrs_bts_add(0, "assignment:attempted_speech", 1);
+	f_ctrs_bsc_and_bts_add(0, "assignment:completed", 1);
+	f_ctrs_bts_add(0, "assignment:completed_speech", 1);
+	f_ctrs_bts_verify();
+
 	f_vty_amr_start_mode_restore(true);
 	f_shutdown_helper();
 }
@@ -4286,10 +4342,17 @@
 	f_init(1, true);
 	f_sleep(1.0);
 	f_vty_amr_start_mode_set(false, "1");
+	f_ctrs_bsc_and_bts_assignment_init(1);
 
 	vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars);
 	vc_conn.done;
 
+	f_ctrs_bsc_and_bts_add(0, "assignment:attempted", 1);
+	f_ctrs_bts_add(0, "assignment:attempted_speech", 1);
+	f_ctrs_bsc_and_bts_add(0, "assignment:completed", 1);
+	f_ctrs_bts_add(0, "assignment:completed_speech", 1);
+	f_ctrs_bts_verify();
+
 	f_vty_amr_start_mode_restore(false);
 	f_shutdown_helper();
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26422
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: Icb1386ec2ccd70eb3c026301b9b08ad7177278f7
Gerrit-Change-Number: 26422
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
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/20211130/e8e79b0b/attachment.htm>


More information about the gerrit-log mailing list