Change in osmo-ttcn3-hacks[master]: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun May 26 09:08:33 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14178 )

Change subject: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts
......................................................................

Add TC_pcu_oml_alert() for testing PCU-originated OML alerts

As we don't yet speak OML directly from the TTCN3 test suite,
this requires a currently "RFC/WIP" state patch turning OML
Failure Event Reports into CTRL TRAP on the BSC, see
https://gerrit.osmocom.org/#/c/osmo-bsc/+/14177

Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c
Depends: osmo-bsc I4f8a9737c6ef1b951ea8e742cdbd3689371a99d5
Related: OS#4023
---
M bts/BTS_Tests.ttcn
1 file changed, 29 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index a879f75..c89eeb1 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -57,6 +57,8 @@
 	charstring mp_pcu_socket := PCU_SOCK_DEFAULT;
 	charstring mp_ctrl_ip := "127.0.0.1";
 	integer mp_ctrl_port := 4238;
+	charstring mp_bsc_ctrl_ip := "127.0.0.1";
+	integer mp_bsc_ctrl_port := 4249;
 	integer mp_tolerance_rxqual := 1;
 	integer mp_tolerance_rxlev := 3;
 	integer mp_tolerance_timing_offset_256syms := 0;
@@ -3131,6 +3133,7 @@
  * PCU Socket related tests
  ***********************************************************************/
 
+/* Verify no RTS before ACT_REQ; verify RTS after ACT_REQ */
 private function f_TC_pcu_act_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, boolean exp_success)
 runs on test_CT {
 	timer T := 3.0;
@@ -3171,6 +3174,7 @@
 	}
 }
 
+/* verify no more RTS after DEACT_REQ */
 private function f_TC_pcu_deact_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr)
 runs on test_CT {
 	timer T := 3.0;
@@ -3591,6 +3595,30 @@
 	setverdict(pass);
 }
 
+/* test for generating Abis side OML ALERT from the PCU */
+testcase TC_pcu_oml_alert() runs on test_CT {
+	var PCUIF_send_data pcu_sd;
+	var integer num_time_ind := 0;
+	var integer first_fn, last_fn;
+	var float test_duration := 5.0;
+	timer T;
+
+	f_init_pcu_test();
+	f_TC_pcu_act_req(0, 0, 7, true);
+
+	/* re-connect CTRL port from BTS to BSC */
+	f_ipa_ctrl_stop();
+	f_ipa_ctrl_start(mp_bsc_ctrl_ip, mp_bsc_ctrl_port);
+
+	/* Send that OML Alert */
+	PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_OML_ALERT, testcasename())));
+
+	/* This requires https://gerrit.osmocom.org/#/c/osmo-bsc/+/14177 to be merged */
+	f_ctrl_exp_trap(IPA_CTRL, "bts.0.oml_failure_report", ?);
+	setverdict(pass);
+}
+
+
 
 /***********************************************************************
  * Osmocom Style Dynamic Timeslot Support
@@ -4893,6 +4921,7 @@
 		execute( TC_pcu_ext_rach_content() );
 		execute( TC_pcu_paging_from_rsl() );
 		execute( TC_pcu_time_ind() );
+		execute( TC_pcu_oml_alert() );
 	} else {
 		log("PCU socket path not available, skipping PCU tests");
 	}

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c
Gerrit-Change-Number: 14178
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190526/a445f49e/attachment.htm>


More information about the gerrit-log mailing list