From c61a74f6c432d1bf4a9fb43160a12cca562d50b9 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 28 Feb 2023 11:06:06 +0100 Subject: [PATCH] test-ranap: don't use libosmocore's tall_msgb_ctx Use msgb_ctx from test_common.c instead, which is the same pointer after test_common_init() ran. tall_msgb_ctx from libosmocore is no longer getting exported since I13169c00a59fb59513dfc598de5a71d094492422. Fix for: /usr/bin/ld: test-ranap.o: in function `main': /build/src/tests/test-ranap.c:201: undefined reference to `tall_msgb_ctx' /usr/bin/ld: /build/src/tests/test-ranap.c:201: undefined reference to `tall_msgb_ctx' Change-Id: I7d0b3068760c2cd7067e2a5d929f03c7e7d1decb --- src/tests/test-ranap.c | 4 ++-- src/tests/test_common.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index 633bb2bc..e593bd91 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -32,7 +32,7 @@ #include "test_common.h" -extern void *tall_msgb_ctx; +extern void *msgb_ctx; static void test_aper_int(uint32_t inp) { @@ -198,7 +198,7 @@ int main(int argc, char **argv) printf("report\n"); talloc_report(talloc_asn1_ctx, stdout); - talloc_report(tall_msgb_ctx, stdout); + talloc_report(msgb_ctx, stdout); //talloc_report(NULL, stdout); test_common_cleanup(); diff --git a/src/tests/test_common.c b/src/tests/test_common.c index 187a2697..36d99543 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -71,7 +71,7 @@ static const struct log_info test_log_info = { }; static void *tall_hnb_ctx; -static void *msgb_ctx; +void *msgb_ctx; int test_common_init(void) {