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.orgHello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5366 to look at the new patch set (#2). BSC_Tests: Add TC_chan_exhaustion to test for channel exhaustion We ensure that all channels are allocated, and that the first allocation beyond the avialable channels will fail and generate an IMM_ASS_REJ. WE also verify that the related counters are incremented as expected. Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 --- M bsc/BSC_Tests.ttcn 1 file changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/5366/2 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 9cdfe27..5988b28 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -25,6 +25,9 @@ const integer NUM_BTS := 3; const float T3101_MAX := 12.0; +/* make sure to sync this with the osmo-bts.cfg you're using */ +const integer NUM_TCHF_PER_BTS := 5; + /* BSC specific CTRL helper functions */ function f_ctrl_get_bts(IPA_CTRL_PT pt, integer bts_nr, charstring suffix) return CtrlValue { @@ -329,6 +332,53 @@ f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack", chact_nack+1); setverdict(pass); +} + +/* Test for channel exhaustion due to RACH overload */ +testcase TC_chan_exhaustion() runs on test_CT { + var ASP_RSL_Unitdata rsl_ud; + var integer i; + var integer chreq_total, chreq_nochan; + + f_init(); + f_bssap_reset(); + + chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); + chreq_nochan := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel"); + + /* expect 5xTCH/F to succeed */ + for (i := 0; i < NUM_TCHF_PER_BTS; i := i+1) { + f_chreq_act_ack('23'O, i); + } + + IPA_RSL[0].clear; + + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+NUM_TCHF_PER_BTS); + + /* now expect additional channel activations to fail */ + f_ipa_tx(0, ts_RSL_CHAN_RQD('42'O, 42)); + + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, + tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) { + setverdict(fail, "Received CHAN ACT ACK without resources?!?"); + } + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_IMM_ASSIGN(?))) -> value rsl_ud { + var GsmRrMessage rr; + /* match on IMM ASS REJ */ + rr := dec_GsmRrMessage(rsl_ud.rsl.ies[1].body.full_imm_ass_info.payload); + if (rr.header.message_type == IMMEDIATE_ASSIGNMENT_REJECT) { + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", + chreq_total+NUM_TCHF_PER_BTS+1); + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel", + chreq_nochan+1); + setverdict(pass); + } else { + repeat; + } + } + [] IPA_RSL[0].receive { repeat; } + } } @@ -1012,6 +1062,7 @@ execute( TC_chan_act_ack_est_ind_noreply() ); execute( TC_chan_act_ack_est_ind_refused() ); execute( TC_chan_act_nack() ); + execute( TC_chan_exhaustion() ); execute( TC_chan_rel_rll_rel_ind() ); execute( TC_chan_rel_conn_fail() ); execute( TC_chan_rel_hard_clear() ); -- To view, visit https://gerrit.osmocom.org/5366 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder