Change in osmo-ttcn3-hacks[master]: bsc: split f_start_handler() in two, ..._create() and ..._run()

laforge gerrit-no-reply at lists.osmocom.org
Fri Aug 6 14:03:29 UTC 2021


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

Change subject: bsc: split f_start_handler() in two, ..._create() and ..._run()
......................................................................

bsc: split f_start_handler() in two, ..._create() and ..._run()

This is used by upcoming BSC_Tests.TC_cm_reestablishment().

Related: SYS#5130
Change-Id: I96954a6895a65718d943aa5e73b783a75a9f7256
---
M bsc/BSC_Tests.ttcn
1 file changed, 13 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  dexter: Looks good to me, but someone else must approve
  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 61ae49e..c4ae469 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -3290,7 +3290,7 @@
 	connect(vc_conn:STATSD_PROC, vc_STATSD:STATSD_PROC);
 }
 
-function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars := omit)
+function f_start_handler_create(template (omit) TestHdlrParams pars := omit)
 runs on test_CT return MSC_ConnHdlr {
 	var charstring id := testcasename();
 	var MSC_ConnHdlr vc_conn;
@@ -3300,12 +3300,23 @@
 	}
 	vc_conn := MSC_ConnHdlr.create(id);
 	f_connect_handler(vc_conn, bssap_idx);
+	return vc_conn;
+}
+
+function f_start_handler_run(MSC_ConnHdlr vc_conn, void_fn fn, template (omit) TestHdlrParams pars := omit)
+runs on test_CT return MSC_ConnHdlr {
+	var charstring id := testcasename();
 	/* Emit a marker to appear in the SUT's own logging output */
-	f_logp(BSCVTY, testcasename() & "() start");
+	f_logp(BSCVTY, id & "() start");
 	vc_conn.start(f_handler_init(fn, id, pars));
 	return vc_conn;
 }
 
+function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars := omit)
+runs on test_CT return MSC_ConnHdlr {
+	return f_start_handler_run(f_start_handler_create(pars), fn, pars);
+}
+
 /* first function inside ConnHdlr component; sets g_pars + starts function */
 private function f_handler_init(void_fn fn, charstring id, template (omit) TestHdlrParams pars := omit)
 runs on MSC_ConnHdlr {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25020
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: I96954a6895a65718d943aa5e73b783a75a9f7256
Gerrit-Change-Number: 25020
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
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/20210806/866ff6bc/attachment.htm>


More information about the gerrit-log mailing list