aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ctrl/ctrl_test.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-03-20 11:39:40 +0100
committerHarald Welte <laforge@gnumonks.org>2019-07-31 11:50:27 +0200
commit6079675bdb652045eff48880b0d9938b3e7e79ad (patch)
treeaf0651e53b2cd9023ee69ea5f29cdf6603bac1e7 /tests/ctrl/ctrl_test.c
parent7b4a05d535f0ecc070e9b506ad0a667e24b67f71 (diff)
make use of OTC_GLOBAL when allocating library-internal contexts
As libosmcore is now managing the global talloc contexts, there's no point in having APIs where the user tells the library about which talloc contexts to use for a given sub-system. Change-Id: I48f475efd3ee0d5120b8fc30861e852d1a6920b1
Diffstat (limited to 'tests/ctrl/ctrl_test.c')
-rw-r--r--tests/ctrl/ctrl_test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index b46e9ac5..ff48038a 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -4,6 +4,7 @@
#include <string.h>
#include <stdbool.h>
+#include <osmocom/core/talloc.h>
#include <osmocom/core/utils.h>
#include <osmocom/ctrl/control_cmd.h>
#include <osmocom/core/logging.h>
@@ -459,7 +460,7 @@ static struct log_info info = {
int main(int argc, char **argv)
{
- ctx = talloc_named_const(NULL, 1, "ctrl_test");
+ ctx = OTC_GLOBAL;
osmo_init_logging2(ctx, &info);
msgb_talloc_ctx_init(ctx, 0);
@@ -478,8 +479,8 @@ int main(int argc, char **argv)
test_deferred_cmd();
- /* Expecting root ctx + msgb root ctx + 5 logging elements */
- if (talloc_total_blocks(ctx) != 7) {
+ /* Expecting root ctx + name + select + msgb root ctx + 5 logging elements */
+ if (talloc_total_blocks(ctx) != 9) {
talloc_report_full(ctx, stdout);
OSMO_ASSERT(false);
}