diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2021-12-13 17:30:35 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2022-01-23 00:13:07 +0100 |
commit | 189974920d6c39c5e215f815920fe71fe52f26e1 (patch) | |
tree | 9e2ede20b45e0b32074f0021ffff7211b7f2b22b | |
parent | e23496ad23e2f55441fb9279ad3dcc532062a09c (diff) |
bsc: detect subscr and conn leaks during f_shutdown_helper()
Invoke f_verify_talloc_count() for bsc_subscr and
gsm_subscriber_connection, expecting none to remain after each test.
This makes numerous tests fail, where the test does not properly release
the RSL and BSSAP connections. An upcoming patch fixes all of those
cases: I9396efcabc085d2850244c6468b83c5f3a3ff3a2
Related: OS#5337
Change-Id: I69d4c5c6f8d499bb7f0b96a48af045361433c57b
-rw-r--r-- | bsc/BSC_Tests.ttcn | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 891d3402..d68cba25 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -857,6 +857,11 @@ 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")) { + f_verify_talloc_count(BSCVTY, {"struct bsc_subscr", "struct gsm_subscriber_connection"}); + } + all component.stop; setverdict(pass); mtc.stop; |