Change in osmo-ttcn3-hacks[master]: BTS_Tests: do not connect to PCUIF socket if not used

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Tue Mar 23 05:54:13 UTC 2021


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


Change subject: BTS_Tests: do not connect to PCUIF socket if not used
......................................................................

BTS_Tests: do not connect to PCUIF socket if not used

The PCUIF connection involves a lot of frequent messages, such as
the TIME.ind and since recently DATA.ind with len=0.  As a result,
the test suite logs are getting unreadable due to lots of coding
warnings and port queueing notifications.

This change is aimed to improve the situation a bit, by establishing
the PCUIF connection only for those test cases which actually use it.

Side effects:

  * TC_pcu_socket_verify_info_ind becomes reliable, because the
    PCUIF establishment is done after the RSL bootstrapping;

  * TC_pcu_socket_connect_multi starts to fail, because it used
    to pass due to timeout, since not all messages are handled
    in the 'alt' statement.

Change-Id: I09ccb65ce94a41ffdad4e93da650c3f32d422af4
Related: OS#5083
---
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_SMSCB.ttcn
2 files changed, 20 insertions(+), 23 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 0ad55ce..59b60f0 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -472,7 +472,7 @@
 	trxc_conn_id := res.connId;
 }
 
-/* global init function */
+/* global init function (without PCUIF connection) */
 friend function f_init(uint8_t trx_nr := 0)
 runs on test_CT
 {
@@ -555,9 +555,6 @@
 	f_rsl_bcch_fill(RSL_SYSTEM_INFO_2, ts_SI2_default);
 	f_rsl_bcch_fill(RSL_SYSTEM_INFO_4, ts_SI4_default);
 
-	map(self:PCU, system:PCU);
-	f_init_pcu(PCU, id, g_pcu_conn_id, g_pcu_last_info);
-
 	if (mp_bts_trxc_port != -1) {
 		var TrxcMessage ret;
 
@@ -4283,7 +4280,9 @@
 }
 
 testcase TC_si_sched_13() runs on test_CT {
-	f_init();
+	/* NOTE: PCUIF connection is not used in this test case, but
+	 * without it the IUT would not broadcast SI13 (see OS#3075). */
+	f_init_with_pcuif();
 	si_cfg.si13_present := true;
 	f_rsl_bcch_fill_raw(RSL_SYSTEM_INFO_13, '0106009000185a6fc9e08410ab2b2b2b2b2b2b2b2b2b2b'O);
 	f_TC_si_sched();
@@ -4291,7 +4290,9 @@
 }
 
 testcase TC_si_sched_13_2bis_2ter_2quater() runs on test_CT {
-	f_init();
+	/* NOTE: PCUIF connection is not used in this test case, but
+	 * without it the IUT would not broadcast SI13 (see OS#3075). */
+	f_init_with_pcuif();
 	si_cfg.si2bis_present := true;
 	f_rsl_bcch_fill_raw(RSL_SYSTEM_INFO_2bis, '550602bfe809b3ff00000000000000000000007900002b'O);
 	si_cfg.si2ter_present := true;
@@ -4626,6 +4627,8 @@
 
 friend function f_init_with_pcuif() runs on test_CT {
 	f_init();
+	map(self:PCU, system:PCU);
+	f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info);
 	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, testcasename())));
 }
 
@@ -5453,7 +5456,7 @@
 	var ConnHdlrPars pars;
 	var ConnHdlr vc_conn;
 
-	f_init();
+	f_init_with_pcuif();
 
 	pars := valueof(t_Pars(t_RslChanNr_SDCCH4(0,3), ts_RSL_ChanMode_SIGN));
 	vc_conn := f_start_handler(refers(f_TC_rr_suspend_req), pars, true);
@@ -5466,7 +5469,7 @@
 	timer T := 5.0;
 
 	/* this (among other things) establishes the first connection to the PCUIF socket */
-	f_init();
+	f_init_with_pcuif();
 
 	/* try to establish a second connection, expect it to fail */
 	PCU.send(UD_connect:{mp_pcu_socket, -1});
@@ -5488,7 +5491,7 @@
 /* Ensure that PCUIF socket can disconnect + reconnect */
 testcase TC_pcu_socket_reconnect() runs on test_CT {
 	/* this (among other things) establishes the first connection to the PCUIF socket */
-	f_init();
+	f_init_with_pcuif();
 
 	f_sleep(1.0);
 
@@ -5549,13 +5552,7 @@
 /* Make sure that GPRS Indicator is absent when the PCU is not connected */
 private function f_TC_pcu_socket_noconnect(RrMessageType si_type)
 runs on test_CT {
-	/* don't call f_init() as this would connect PCU socket */
-	f_init_rsl(testcasename());
-
-	/* Send both System Information Type 3 and 4 (with GPRS Indicator) */
-	f_rsl_bcch_fill(RSL_SYSTEM_INFO_3, ts_SI3_default);
-	f_rsl_bcch_fill(RSL_SYSTEM_INFO_4, ts_SI4_default);
-
+	f_init();
 	f_init_l1ctl();
 	f_l1_tune(L1CTL);
 	f_sleep(2.0);
@@ -5582,7 +5579,7 @@
 private function f_TC_pcu_socket_connect(RrMessageType si_type)
 runs on test_CT {
 	/* this (among other things) establishes the first connection to the PCUIF socket */
-	f_init();
+	f_init_with_pcuif();
 	f_init_l1ctl();
 	f_l1_tune(L1CTL);
 
@@ -5610,7 +5607,7 @@
 private function f_TC_pcu_socket_disconnect(RrMessageType si_type)
 runs on test_CT {
 	/* this (among other things) establishes the first connection to the PCUIF socket */
-	f_init();
+	f_init_with_pcuif();
 	f_init_l1ctl();
 	f_l1_tune(L1CTL);
 
@@ -5647,7 +5644,7 @@
 testcase TC_pcu_socket_verify_info_ind() runs on test_CT {
 	var SystemInformation si3 := valueof(ts_SI3_default);
 
-	f_init();
+	f_init_with_pcuif();
 
 	/* actually give the BTS some time to fully come up and to send a PCU INFO IND with the correct
 	 * information */
@@ -5682,7 +5679,7 @@
 	var PCUIF_info_ind info_ind;
 	var FreqHopPars fhp;
 
-	f_init();
+	f_init_with_pcuif();
 
 	info_ind := g_pcu_last_info.u.info_ind;
 
@@ -5727,7 +5724,7 @@
 	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 remote ip 127.127.127.127");
 	f_vty_transceive(BSCVTY, "drop bts connection 0 oml");
 
-	f_init();
+	f_init_with_pcuif();
 
 	var PCUIF_RemoteAddr remote_addr := g_pcu_last_info.u.info_ind.remote_addr;
 	var template PCUIF_RemoteAddr tr_remote_addr := {
@@ -5747,7 +5744,7 @@
 	f_init_vty_bsc();
 	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 remote ip fd00::ca:ff:ee");
 
-	f_init();
+	f_init_with_pcuif();
 
 	var PCUIF_RemoteAddr remote_addr := g_pcu_last_info.u.info_ind.remote_addr;
 	var template PCUIF_RemoteAddr tr_remote_addr := {
diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn
index 102e2ac..dda78fd 100644
--- a/bts/BTS_Tests_SMSCB.ttcn
+++ b/bts/BTS_Tests_SMSCB.ttcn
@@ -1051,7 +1051,7 @@
 testcase TC_etws_pcu() runs on test_CT {
 	timer T := 10.0;
 
-	f_init();
+	f_init_with_pcuif();
 	f_init_l1ctl();
 	f_l1_tune(L1CTL, ccch_mode := CCCH_MODE_COMBINED_CBCH);
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23465
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: I09ccb65ce94a41ffdad4e93da650c3f32d422af4
Gerrit-Change-Number: 23465
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210323/05f1bd6e/attachment.htm>


More information about the gerrit-log mailing list