Max has submitted this change and it was merged. ( 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, 35 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 86d43fe..e617323 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -2723,33 +2723,43 @@ } } +private function f_init_pcu_test() runs on test_CT { + f_init(); + PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, testcasename()))); +} + /* PDCH activation via PCU socket; check for presence of RTS.req */ testcase TC_pcu_act_req() runs on test_CT { - f_init(); + f_init_pcu_test(); + 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(); + f_init_pcu_test(); + 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(); + f_init_pcu_test(); + 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(); + f_init_pcu_test(); + 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(); + f_init_pcu_test(); + /* Activate PDCH */ f_TC_pcu_act_req(0, 0, 7, true); f_sleep(1.0); @@ -2759,7 +2769,8 @@ /* Attempt to deactivate a PDCH on a non-PDCH timeslot */ testcase TC_pcu_deact_req_wrong_ts() runs on test_CT { - f_init(); + f_init_pcu_test(); + f_TC_pcu_deact_req(0, 0, 1); } @@ -2768,11 +2779,11 @@ const octetstring si13 := '00010203040506070909'O; var PCUIF_send_data sd; timer T:= 3.0; - f_init(); + f_init_pcu_test(); /* 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 { @@ -2824,7 +2835,8 @@ /* Send DATA.req on invalid BTS */ testcase TC_pcu_data_req_wrong_bts() runs on test_CT { - f_init(); + f_init_pcu_test(); + 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? */ @@ -2833,7 +2845,8 @@ /* Send DATA.req on invalid TRX */ testcase TC_pcu_data_req_wrong_trx() runs on test_CT { - f_init(); + f_init_pcu_test(); + 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? */ @@ -2842,7 +2855,8 @@ /* Send DATA.req on invalid timeslot */ testcase TC_pcu_data_req_wrong_ts() runs on test_CT { - f_init(); + f_init_pcu_test(); + 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? */ @@ -2851,14 +2865,16 @@ /* Send DATA.req on timeslot that hasn't been activated */ testcase TC_pcu_data_req_ts_inactive() runs on test_CT { - f_init(); + f_init_pcu_test(); + 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); } testcase TC_pcu_data_req_pdtch() runs on test_CT { - f_init(); + f_init_pcu_test(); + 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 */ @@ -2866,7 +2882,8 @@ } testcase TC_pcu_data_req_ptcch() runs on test_CT { - f_init(); + f_init_pcu_test(); + 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 */ @@ -2876,7 +2893,7 @@ /* Send AGCH from PCU; check it appears on Um side */ testcase TC_pcu_data_req_agch() runs on test_CT { timer T := 3.0; - f_init(); + f_init_pcu_test(); f_init_l1ctl(); f_l1_tune(L1CTL); @@ -2898,7 +2915,7 @@ /* Send IMM.ASS from PCU for PCH; check it appears on Um side */ testcase TC_pcu_data_req_imm_ass_pch() runs on test_CT { var octetstring imm_ass := f_rnd_octstring(23); - f_init(); + f_init_pcu_test(); f_init_l1ctl(); f_l1_tune(L1CTL); @@ -2921,7 +2938,7 @@ /* Send RACH from Um side, expect it to show up on PCU socket */ testcase TC_pcu_rach_content() runs on test_CT { - f_init(); + f_init_pcu_test(); f_init_l1ctl(); f_l1_tune(L1CTL); @@ -2962,7 +2979,7 @@ /* Send PAGING via RSL, expect it to shw up on PCU socket */ testcase TC_pcu_paging_from_rsl() runs on test_CT { - f_init(); + f_init_pcu_test(); for (var integer i := 0; i < 100; i := i+1) { var MobileL3_CommonIE_Types.MobileIdentityLV mi; -- 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: merged Gerrit-Change-Id: I9ef9e46061ef116529bdea196050f914804615b3 Gerrit-Change-Number: 13305 Gerrit-PatchSet: 5 Gerrit-Owner: Max <msur...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <msur...@sysmocom.de>