pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27970 )
Change subject: bsc: Introduce test TC_paging_450req_no_paging_load_ind ......................................................................
bsc: Introduce test TC_paging_450req_no_paging_load_ind
Change-Id: I787cba895f1cb6c5bfef95259bcf69b4291a9237 --- M bsc/BSC_Tests.ttcn M library/General_Types.ttcn 2 files changed, 35 insertions(+), 13 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 26d47b6..f514c43 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -3582,28 +3582,29 @@ f_shutdown_helper(); }
-/* Verify BSC can schedule 500 paging requests under one minute if BTS buffer is good enough */ -testcase TC_paging_500req() runs on test_CT { +/* Verify BSC can schedule N paging requests under one minute if BTS buffer is good enough */ +function f_TC_paging_Nreq(integer num_subscribers, boolean send_pag_load_ind) runs on test_CT { var ASP_RSL_Unitdata rx_rsl_ud; - const integer num_subscribers := 500; - var hexstring imsis[num_subscribers]; - var boolean rx_paging_done[num_subscribers]; + var Hexstrings imsis := {}; + var Booleans rx_paging_done := {}; var integer rx_paging_num := 0; var integer i; timer T_rx := 60.0; timer T_load_ind := 1.0;
for (i := 0; i < num_subscribers; i := i + 1) { - imsis[i] := f_gen_imsi(i); - rx_paging_done[i] := false; + imsis := imsis & {f_gen_imsi(i)}; + rx_paging_done := rx_paging_done & { false }; }
f_init(1, guard_timeout := 100.0);
/* Clear the queue, it might still contain stuff like BCCH FILLING */ IPA_RSL[0].clear; - /* Tell there's plenty of space at the BTS (UINT16_MAX): */ - f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(65535)); + if (send_pag_load_ind) { + /* Tell there's plenty of space at the BTS (UINT16_MAX): */ + f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(65535)); + }
for (i := 0; i < num_subscribers; i := i + 1) { BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap[0].sccp_addr_peer, g_bssap[0].sccp_addr_own, @@ -3622,7 +3623,7 @@ rx_paging_done[imsi_idx] := true; rx_paging_num := rx_paging_num + 1; } else { - setverdict(fail, "Retrans happened before Rx initial trans for all reqs. ", rx_paging_num); + setverdict(fail, "Retrans of ", imsi_str, " happened before Rx initial trans for all reqs. rx_paging_num=", rx_paging_num); mtc.stop; } if (rx_paging_num < num_subscribers) { @@ -3631,8 +3632,10 @@ } [] IPA_RSL[0].receive { repeat; } [] T_load_ind.timeout { - log("Tx CCH Load Ind, received paging requests so far: ", rx_paging_num); - f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(40)); + log("[CCH Load Ind timer] received paging requests so far: ", rx_paging_num); + if (send_pag_load_ind) { + f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(40)); + } T_load_ind.start; repeat; } @@ -3644,6 +3647,17 @@
f_shutdown_helper(); } +/* Verify BSC can schedule 500 paging requests under one minute if BTS buffer is good enough */ +testcase TC_paging_500req() runs on test_CT { + f_TC_paging_Nreq(500, true); +} +/* Same as TC_paging_500req, but without sending CCCH Load Indication, which + * means BTS is always under CCH Load Threshold, aka capable of sending tons of requests. + * Since No CCCH Load Ind, BSC uses a conservative estimation of BTS load, which + * for current config yields ~8req/sec, so 480req/min maximum. */ +testcase TC_paging_450req_no_paging_load_ind() runs on test_CT { + f_TC_paging_Nreq(450, false); +}
/* Test RSL link drop causes counter increment */ testcase TC_rsl_drop_counter() runs on test_CT { @@ -11531,6 +11545,7 @@ execute( TC_paging_counter() ); execute( TC_paging_resp_unsol() ); execute( TC_paging_500req() ); + execute( TC_paging_450req_no_paging_load_ind() );
execute( TC_rsl_drop_counter() ); execute( TC_rsl_unknown_unit_id() ); diff --git a/library/General_Types.ttcn b/library/General_Types.ttcn index 40f0770..9a8489f 100644 --- a/library/General_Types.ttcn +++ b/library/General_Types.ttcn @@ -175,6 +175,8 @@ type hexstring HEX1_20n length(1..20) with { variant "" }; type hexstring HEX1_34n length(1..34) with { variant "" };
+ type record of hexstring Hexstrings with { variant "" }; + //**************************************************** // Integers //**************************************************** @@ -194,6 +196,12 @@ type integer INT13nbp (0..8191) with { variant "" }; type integer INT15nbp (0..32767) with { variant "" };
+ //**************************************************** + // Booleans + //**************************************************** + + type record of boolean Booleans with { variant "" }; + } // end group NativeTypes
//**************************************************** @@ -328,4 +336,3 @@ } // end group CompositeTypes
} with { encode "RAW" } /* End of module General_Types */ -