osmo-pcu/tests
Pau Espin d76e3a3427 Make sure GprsMs free() also frees its tbfs
This fixes TBF objects leaking and ending up alive when the MS object is
explicitly freed through talloc_free (and sporadically
crashing TbfTest once a timeout for them occur).

This mostly affects unit tests, where most of the explicit free()
happens.
In osmo-pcu, in general, the GprsMs object only gets _free() called when
its resource count reaches 0, aka no more TBFs are attached to it. Hence
in general GprsMs object is freed() only when no TBFs (to be leaked) are
present.
However, in the unit tests it's usual that we want to wipe the entire
context by eg. feeing the PCU, the BTS or MS object, which should also
free the related TBFs.

When running osmo-pcu this may only be an issue when the MS object is
freed explicitly, which could happen for instance when a BTS is torn down,
ie. PCUIF going down, moment at which all GprsMs of that BTS are freed.
But in there actually it iterates over PDCHs to free all TBFs, so it's
fine.
If we iterated over MS, this could have ended up in a crash, like
it happened in TbfTest sporadically, but it's not a bit problem if we
crash + restart at that time since anyway the BTS is gone ore just
getting up around that time.

Related: OS#6359
Change-Id: Ibbdec94acb8132be20508d3178d88da44bfaf91d
2024-03-25 21:09:25 +01:00
..
alloc Make sure GprsMs free() also frees its tbfs 2024-03-25 21:09:25 +01:00
app_info pcuif_proto: drop support for PCUIF v10 2023-10-23 11:46:13 +02:00
bitcomp tests: Replace deprecated API log_set_print_filename 2021-02-19 16:24:11 +01:00
codel tests: Replace deprecated API log_set_print_filename 2021-02-19 16:24:11 +01:00
edge pcu_l1_if_phy: fix API function names 2023-05-03 09:57:38 +02:00
emu pcu_l1_if_phy: fix API function names 2023-05-03 09:57:38 +02:00
fn pcu_l1_if_phy: fix API function names 2023-05-03 09:57:38 +02:00
llc Reestore last LLC frames never completely acked when freeing DL TBF 2023-06-29 14:53:09 +02:00
llist llist: Add missing const qualifier in llist cast method 2015-08-24 12:23:50 +02:00
ms Make sure GprsMs free() also frees its tbfs 2024-03-25 21:09:25 +01:00
rlcmac tests/rlcmac: use ARRAY_SIZE macro 2022-08-06 02:51:46 +07:00
tbf Make sure GprsMs free() also frees its tbfs 2024-03-25 21:09:25 +01:00
types Make sure GprsMs free() also frees its tbfs 2024-03-25 21:09:25 +01:00
ulc Make sure GprsMs free() also frees its tbfs 2024-03-25 21:09:25 +01:00
Makefile.am Move resource allocation outside of tbf allocation 2023-04-26 13:29:03 +02:00
testsuite.at tests: Introduce unit tests for PDCH UL Controller 2021-03-15 19:35:43 +01:00