BSC_Tests: add module parameter 'mp_verify_talloc_count'

This parameter allows to enable/disable checking of the IUT's talloc
report in f_shutdown_helper().  This may be useful when running the
test suite against '-latest' with unfixed memory leaks.

Change-Id: Ic7bf8d9def21083ebda1b94659d72dde2bb5e664
This commit is contained in:
Vadim Yanitskiy 2022-02-05 21:35:43 +06:00
parent c1b1ddff61
commit 6e06801a07
1 changed files with 4 additions and 1 deletions

View File

@ -709,6 +709,9 @@ modulepar {
/* Value set in osmo-bsc.cfg "ms max power" */
uint8_t mp_exp_ms_power_level := 7;
/* Whether to check for memory leaks */
boolean mp_verify_talloc_count := true;
}
friend function f_gen_test_hdlr_pars(integer bssap_idx := 0) return TestHdlrParams {
@ -858,7 +861,7 @@ private function f_ctrs_bsc_expect(charstring countername, integer val := 1) run
friend function f_shutdown_helper() runs on test_CT {
/* Run the subscr and conn leak test only when the VTY is initialized */
if (BSCVTY.checkstate("Mapped")) {
if (BSCVTY.checkstate("Mapped") and mp_verify_talloc_count) {
f_verify_talloc_count(BSCVTY, {"struct bsc_subscr", "struct gsm_subscriber_connection"});
}