diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-05-25 11:03:30 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-25 11:03:30 +0200 |
commit | 07bd2d265b1691b520a511c10227970f82286295 (patch) | |
tree | 3cb88a15baca38b9beaf7500cc031dce25f11d7c | |
parent | d66c9b8d1312c71fafd94c25f21f8eab59677ce7 (diff) |
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
-rw-r--r-- | bts/BTS_Tests.ttcn | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index a879f758..c89eeb1c 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -57,6 +57,8 @@ modulepar { 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 @@ testcase TC_ipa_crcx_sdcch_not_active() runs on test_CT { * 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 @@ runs on test_CT { } } +/* 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 @@ testcase TC_pcu_time_ind() runs on test_CT { 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 @@ control { 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"); } |