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

neels gerrit-no-reply at lists.osmocom.org
Fri Jul 23 02:04:18 UTC 2021


neels has uploaded this change for review. ( 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(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 4d3acc2..53e8133 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: 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/20210723/db7dedc7/attachment.htm>


More information about the gerrit-log mailing list