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.org
Review at https://gerrit.osmocom.org/5366
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, 48 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/5366/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 9cdfe27..85fb249 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -331,6 +331,53 @@
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; }
+ }
+}
+
type record DchanTuple {
integer sccp_conn_id,
@@ -1012,6 +1059,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: newchange
Gerrit-Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>