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/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26417 ) Change subject: bsc: properly test various bts.N.chreq:* counters ...................................................................... bsc: properly test various bts.N.chreq:* counters Related: SYS#4878 Depends: I1fde77d5d5920093ab037184eb3518876804353d (osmo-bsc) Change-Id: I17a7702b151ac03fd9f7ecd6927ef42133aad953 --- M bsc/BSC_Tests.ttcn 1 file changed, 75 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/26417/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index d54ffac..780e512 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1279,7 +1279,57 @@ f_shutdown_helper(); } -/* verify if the "chreq:total" counter increments as expected */ +const CounterNameVals counternames_bts_chreq := { + { "chreq:total", 0 }, + { "chreq:attempted_emerg", 0 }, + { "chreq:attempted_call", 0 }, + { "chreq:attempted_location_upd", 0 }, + { "chreq:attempted_pag", 0 }, + { "chreq:attempted_pdch", 0 }, + { "chreq:attempted_other", 0 }, + { "chreq:attempted_unknown", 0 }, + { "chreq:successful", 0 }, + { "chreq:successful_emerg", 0 }, + { "chreq:successful_call", 0 }, + { "chreq:successful_location_upd", 0 }, + { "chreq:successful_pag", 0 }, + { "chreq:successful_pdch", 0 }, + { "chreq:successful_other", 0 }, + { "chreq:successful_unknown", 0 }, + { "chreq:no_channel", 0 }, + { "chreq:max_delay_exceeded", 0 } +}; + +/* verify the "chreq:*" counters */ +private function f_chan_act_counter(OCT1 ra, charstring chreq_ctr_suffix) runs on test_CT +{ + var GsmFrameNumber fn := 23; + + f_logp(BSCVTY, "f_chan_act_counter(" & chreq_ctr_suffix & ")"); + + var RSL_Message rx_rsl; + f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn)); + rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); + var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; + + f_ctrs_bts_add(0, "chreq:total"); + f_ctrs_bts_add(0, "chreq:attempted_" & chreq_ctr_suffix); + f_ctrs_bts_verify(); + + f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, fn+10)); + rx_rsl := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0)); + + f_ctrs_bts_add(0, "chreq:successful"); + f_ctrs_bts_add(0, "chreq:successful_" & chreq_ctr_suffix); + f_ctrs_bts_verify(); + + /* test is done, release RSL Conn Fail Ind to clean up */ + f_ipa_tx(0, ts_RSL_CONN_FAIL_IND(chan_nr, RSL_ERR_RADIO_LINK_FAIL)); + rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), 10.0); + f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(chan_nr)); + f_sleep(1.0); +} + testcase TC_chan_act_counter() runs on test_CT { var BSSAP_N_UNITDATA_ind ud_ind; var integer chreq_total; @@ -1287,10 +1337,30 @@ f_init(1); - chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); - IPA_RSL[0].send(ts_ASP_RSL_UD(ts_RSL_CHAN_RQD('23'O, 23))); - rsl_unused := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+1); + f_vty_allow_emerg_bts(true, 0); + + f_ctrs_bts_init(1, counternames_bts_chreq); + + /* emergency call: RA & 0xe0 == 0xa0 --> CHREQ_T_EMERG_CALL */ + f_chan_act_counter('a3'O, "emerg"); + + /* voice TCH/H: RA & 0xf0 == 0x40 --> CHREQ_T_VOICE_CALL_TCH_H */ + f_chan_act_counter('43'O, "call"); + + /* LU: RA & 0xf0 == 0x00 --> CHREQ_T_LOCATION_UPD */ + f_chan_act_counter('03'O, "location_upd"); + + /* Paging: RA & 0xf0 == 0x20 --> CHREQ_T_PAG_R_TCH_F */ + f_chan_act_counter('23'O, "pag"); + /* Paging: RA & 0xf0 == 0x30 --> CHREQ_T_PAG_R_TCH_FH */ + f_chan_act_counter('33'O, "pag"); + + /* LU: RA & 0xfc == 0x78 --> CHREQ_T_PDCH_TWO_PHASE */ + /* no PCU, so PDCH not allowed. Skip this test for now. */ + /* f_chan_act_counter('7b'O, "pdch"); */ + + /* LU: RA & 0xf0 == 0x10 --> CHREQ_T_SDCCH */ + f_chan_act_counter('13'O, "other"); f_shutdown_helper(); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26417 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I17a7702b151ac03fd9f7ecd6927ef42133aad953 Gerrit-Change-Number: 26417 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211129/05848daf/attachment.htm>