Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/12536 )
Change subject: BTS_Tests.ttcn: fix: use TRXC interface of the BTS side, not BB ...................................................................... BTS_Tests.ttcn: fix: use TRXC interface of the BTS side, not BB It was observed that 'BTS_Tests.TC_rach_max_ta' started to fail with the following reason: "BTS_Tests.ttcn:1091 : RACH passed but was expected to be dropped: -2560". My initial assumption was that the test case basically sends FAKE_TOA command on a wrong TRXC interface, and it was confirmed using trx_sniff.py: # TRXD of the BB side $ ./trx_sniff.py -p 6700 [DEBUG] trx_sniff.py:110 L1 -> TRX burst: fn=616 tn=0 pwr=0 [DEBUG] trx_sniff.py:110 TRX -> L1 burst: fn=597 tn=0 rssi=-60 toa256=-2560 [DEBUG] trx_sniff.py:110 TRX -> L1 burst: fn=598 tn=0 rssi=-60 toa256=-2560 ... # TRXD of the BTS side (Uplink bursts only) $ ./trx_sniff.py -p 5700 --direction L1 [DEBUG] trx_sniff.py:110 TRX -> L1 burst: fn=719 tn=0 rssi=-60 toa256=0 and additionally be enriching logging messages of fake_trx.py: [DEBUG] fake_trx.py:186 (trx@0.0.0.0:6700) Recv FAKE_TOA cmd Sending FAKE_* commands on TRXC interface of the BB side affects the bursts being forwarded to this side, so we should use the TRXC interface of the BTS side to simulate Uplink delay. The reason why the test case has been passing some time ago is that there was a bug in fake_trx.py, that has been fixed recently. This patch makes 'BTS_Tests.TC_rach_max_ta' green again ;) Change-Id: I7736abd85407c186856be9f1a22613a1fa6e0c32 --- M bts/BTS_Tests.ttcn 1 file changed, 20 insertions(+), 20 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 0de787a..f7caac2 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -50,8 +50,8 @@ charstring mp_rsl_ip := "127.0.0.2"; integer mp_rsl_port := 3003; integer mp_trx0_arfcn := 871; - charstring mp_bb_trxc_ip := "127.0.0.1"; - integer mp_bb_trxc_port := 6701; + charstring mp_bts_trxc_ip := "127.0.0.1"; + integer mp_bts_trxc_port := 5701; charstring mp_pcu_socket := PCU_SOCK_DEFAULT; charstring mp_ctrl_ip := "127.0.0.1"; integer mp_ctrl_port := 4238; @@ -81,8 +81,8 @@ port L1CTL_PT L1CTL; /* TRXC port (for classic tests) */ - port TRXC_CODEC_PT BB_TRXC; - var integer g_bb_trxc_conn_id; + port TRXC_CODEC_PT BTS_TRXC; + var integer g_bts_trxc_conn_id; /* VTY connections to both BTS and BSC */ port TELNETasp_PT BTSVTY; @@ -123,8 +123,8 @@ type component ConnHdlr extends RSL_DchanHdlr { port L1CTL_PT L1CTL; - port TRXC_CODEC_PT BB_TRXC; - var integer g_bb_trxc_conn_id; + port TRXC_CODEC_PT BTS_TRXC; + var integer g_bts_trxc_conn_id; timer g_Tguard; timer g_Tmeas_exp := 2.0; /* >= 103 SACCH multiframe ~ 500ms */ @@ -316,7 +316,7 @@ }; /* FIXME: FACCH/H is unreliable with calypso firmware, see OS#3653 */ - if (mp_bb_trxc_port != -1) { + if (mp_bts_trxc_port != -1) { g_AllChanTypes := { /* TS 1..4: TCH/F */ valueof(ts_RslChanNr_Bm(1)), @@ -358,11 +358,11 @@ map(self:PCU, system:PCU); f_init_pcu(PCU, id, g_pcu_conn_id, g_pcu_last_info); - if (mp_bb_trxc_port != -1) { + if (mp_bts_trxc_port != -1) { var TrxcMessage ret; /* start with a default moderate timing offset equalling TA=2 */ f_main_trxc_connect(); - ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(2*256))); + ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(2*256))); } } @@ -418,24 +418,24 @@ } private function f_trxc_connect() runs on ConnHdlr { - map(self:BB_TRXC, system:BB_TRXC); + map(self:BTS_TRXC, system:BTS_TRXC); var Result res; - res := TRXC_CodecPort_CtrlFunct.f_IPL4_connect(BB_TRXC, mp_bb_trxc_ip, mp_bb_trxc_port, + res := TRXC_CodecPort_CtrlFunct.f_IPL4_connect(BTS_TRXC, mp_bts_trxc_ip, mp_bts_trxc_port, "", -1, -1, {udp:={}}, {}); if (not ispresent(res.connId)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Could not connect to trx-control interface of trxcon, check your configuration"); } - g_bb_trxc_conn_id := res.connId; + g_bts_trxc_conn_id := res.connId; } private function f_trxc_fake_rssi(uint8_t rssi) runs on ConnHdlr { var TrxcMessage ret; - ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi))); + ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi))); } private function f_trx_fake_toffs256(int16_t toffs256) runs on ConnHdlr { var TrxcMessage ret; - ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256))); + ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256))); } /* first function started in ConnHdlr component */ @@ -447,7 +447,7 @@ map(self:L1CTL, system:L1CTL); f_connect_reset(L1CTL); - if (mp_bb_trxc_port != -1) { + if (mp_bts_trxc_port != -1) { f_trxc_connect(); } @@ -1060,20 +1060,20 @@ } private function f_main_trxc_connect() runs on test_CT { - map(self:BB_TRXC, system:BB_TRXC); + map(self:BTS_TRXC, system:BTS_TRXC); var Result res; - res := TRXC_CodecPort_CtrlFunct.f_IPL4_connect(BB_TRXC, mp_bb_trxc_ip, mp_bb_trxc_port, + res := TRXC_CodecPort_CtrlFunct.f_IPL4_connect(BTS_TRXC, mp_bts_trxc_ip, mp_bts_trxc_port, "", -1, -1, {udp:={}}, {}); if (not ispresent(res.connId)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Could not connect to trx-control interface of trxcon, check your configuration"); } - g_bb_trxc_conn_id := res.connId; + g_bts_trxc_conn_id := res.connId; } private function f_rach_toffs(int16_t toffs256, boolean expect_pass) runs on test_CT { var TrxcMessage ret; /* tell fake_trx to use a given timing offset for all bursts */ - ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256))); + ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256))); f_sleep(0.5); /* Transmit RACH request + wait for confirmation */ @@ -1415,7 +1415,7 @@ f_l1_tune(L1CTL); RSL.clear; - if (mp_bb_trxc_port != -1) { + if (mp_bts_trxc_port != -1) { f_trxc_fake_rssi(rxlev2dbm(mp_ul_rxlev_exp)); f_trx_fake_toffs256(g_pars.l1_pars.timing_offset_256syms); } -- To view, visit https://gerrit.osmocom.org/12536 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: I7736abd85407c186856be9f1a22613a1fa6e0c32 Gerrit-Change-Number: 12536 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol <pes...@sysmocom.de> Gerrit-Reviewer: Vadim Yanitskiy <axilira...@gmail.com>