Change in osmo-ttcn3-hacks[master]: BTS: use PCU-related test cases as version string

Max gerrit-no-reply at lists.osmocom.org
Mon Mar 18 16:27:56 UTC 2019


Max has uploaded this change for review. ( https://gerrit.osmocom.org/13305


Change subject: BTS: use PCU-related test cases as version string
......................................................................

BTS: use PCU-related test cases as version string

When running PCU-related tests against BTS use name of the test as a PCU
version string sent from TTCN-3 code. This makes it easier to separate
OsmoBTS log output related to different test cases.

Change-Id: I9ef9e46061ef116529bdea196050f914804615b3
---
M bts/BTS_Tests.ttcn
1 file changed, 34 insertions(+), 1 deletion(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 86d43fe..5c43453 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2726,30 +2726,40 @@
 /* PDCH activation via PCU socket; check for presence of RTS.req */
 testcase TC_pcu_act_req() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "act_req")));
+
 	f_TC_pcu_act_req(0, 0, 7, true);
 }
 
 /* PDCH activation via PCU socket on non-PDCU timeslot */
 testcase TC_pcu_act_req_wrong_ts() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "act_req_wrong_ts")));
+
 	f_TC_pcu_act_req(0, 0, 1, false);
 }
 
 /* PDCH activation via PCU socket on wrong BTS */
 testcase TC_pcu_act_req_wrong_bts() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "act_req_wrong_bts")));
+
 	f_TC_pcu_act_req(23, 0, 7, false);
 }
 
 /* PDCH activation via PCU socket on wrong TRX */
 testcase TC_pcu_act_req_wrong_trx() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "act_req_wrong_trx")));
+
 	f_TC_pcu_act_req(0, 23, 7, false);
 }
 
 /* PDCH deactivation via PCU socket; check for absence of RTS.req */
 testcase TC_pcu_deact_req() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "deact_req")));
+
 	/* Activate PDCH */
 	f_TC_pcu_act_req(0, 0, 7, true);
 	f_sleep(1.0);
@@ -2760,6 +2770,8 @@
 /* Attempt to deactivate a PDCH on a non-PDCH timeslot */
 testcase TC_pcu_deact_req_wrong_ts() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "deact_req_wrong_ts")));
+
 	f_TC_pcu_deact_req(0, 0, 1);
 }
 
@@ -2769,10 +2781,11 @@
 	var PCUIF_send_data sd;
 	timer T:= 3.0;
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "ver_si13")));
 
 	/* Set SI13 via RSL */
 	f_rsl_bcch_fill_raw(RSL_SYSTEM_INFO_13, si13);
-	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "BTS_Test v23")));
+
 	T.start;
 	alt {
 	[] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_DATA_IND(0, 0, 0, ?, PCU_IF_SAPI_BCCH))) -> value sd {
@@ -2825,6 +2838,8 @@
 /* Send DATA.req on invalid BTS */
 testcase TC_pcu_data_req_wrong_bts() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "data_req_wrong_bts")));
+
 	f_TC_pcu_act_req(0, 0, 7, true);
 	f_pcu_data_req(23, 0, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA);
 	/* FIXME: how to check this wasn't actually sent and didn't crash BTS? */
@@ -2834,6 +2849,8 @@
 /* Send DATA.req on invalid TRX */
 testcase TC_pcu_data_req_wrong_trx() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "data_req_wrong_trx")));
+
 	f_TC_pcu_act_req(0, 0, 7, true);
 	f_pcu_data_req(0, 100, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA);
 	/* FIXME: how to check this wasn't actually sent and didn't crash BTS? */
@@ -2843,6 +2860,8 @@
 /* Send DATA.req on invalid timeslot */
 testcase TC_pcu_data_req_wrong_ts() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "data_req_wrong_ts")));
+
 	f_TC_pcu_act_req(0, 0, 7, true);
 	f_pcu_data_req(0, 0, 70, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA);
 	/* FIXME: how to check this wasn't actually sent and didn't crash BTS? */
@@ -2852,6 +2871,8 @@
 /* Send DATA.req on timeslot that hasn't been activated */
 testcase TC_pcu_data_req_ts_inactive() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "data_req_ts_inactive")));
+
 	f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA);
 	/* FIXME: how to check this wasn't actually sent and didn't crash BTS? */
 	f_sleep(2.0);
@@ -2859,6 +2880,8 @@
 
 testcase TC_pcu_data_req_pdtch() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "data_req_pdtch")));
+
 	f_TC_pcu_act_req(0, 0, 7, true);
 	f_pcu_wait_rts_and_data_req(0, 0, 7, PCU_IF_SAPI_PDTCH, c_PCU_DATA);
 	/* FIXME: how to check this was actually sent */
@@ -2867,6 +2890,8 @@
 
 testcase TC_pcu_data_req_ptcch() runs on test_CT {
 	f_init();
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "data_req_ptcch")));
+
 	f_TC_pcu_act_req(0, 0, 7, true);
 	f_pcu_wait_rts_and_data_req(0, 0, 7, PCU_IF_SAPI_PTCCH, c_PCU_DATA);
 	/* FIXME: how to check this was actually sent */
@@ -2880,6 +2905,8 @@
 	f_init_l1ctl();
 	f_l1_tune(L1CTL);
 
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "data_req_agch")));
+
 	f_TC_pcu_act_req(0, 0, 7, true);
 	f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_AGCH, c_PCU_DATA);
 
@@ -2902,6 +2929,8 @@
 	f_init_l1ctl();
 	f_l1_tune(L1CTL);
 
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "data_req_imm_ass_pch")));
+
 	/* append 3 last imsi digits so BTS can compute pagng group */
 	var uint32_t fn := f_PCUIF_tx_imm_ass_pch(PCU, g_pcu_conn_id, imm_ass, '123459987'H);
 
@@ -2925,6 +2954,8 @@
 	f_init_l1ctl();
 	f_l1_tune(L1CTL);
 
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "rach_content")));
+
 	var GsmFrameNumber fn_last := 0;
 	for (var integer i := 0; i < 1000; i := i+1) {
 		var OCT1 ra := f_rnd_ra_ps();
@@ -2964,6 +2995,8 @@
 testcase TC_pcu_paging_from_rsl() runs on test_CT {
 	f_init();
 
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, "paging_from_rsl")));
+
 	for (var integer i := 0; i < 100; i := i+1) {
 		var MobileL3_CommonIE_Types.MobileIdentityLV mi;
 		timer T := 3.0;

-- 
To view, visit https://gerrit.osmocom.org/13305
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ef9e46061ef116529bdea196050f914804615b3
Gerrit-Change-Number: 13305
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190318/e2356b33/attachment.html>


More information about the gerrit-log mailing list