aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-04-01 16:11:39 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-04-04 17:54:37 +0200
commit113e30cb0639cefbafdad2862c5e69b0e17d9bf3 (patch)
tree753dbe0cc7a4e7fd09cb44e9da2db7be401916f7 /tests/misc
parent091fcf147ae83d8daec92b2506d14e5e5ad35f80 (diff)
use osmo_init_logging2() with proper talloc ctx
Completely drop bts_log_init(), call osmo_init_logging2() directly instead: all callers of bts_log_init() passed NULL as category string, so all it ever did was call osmo_init_logging(). The bts_log_info is already declared in the .h. Here and there also define a proper talloc root context instead of using NULL. Change-Id: Ic049f77bef74123b95350bcae182a468e0086b9c
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/misc_test.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/misc/misc_test.c b/tests/misc/misc_test.c
index e4542354..c4d3a595 100644
--- a/tests/misc/misc_test.c
+++ b/tests/misc/misc_test.c
@@ -24,11 +24,14 @@
#include <osmo-bts/msg_utils.h>
#include <osmo-bts/logging.h>
+#include <osmocom/core/application.h>
#include <osmocom/gsm/protocol/ipaccess.h>
#include <stdlib.h>
#include <stdio.h>
+void *ctx = NULL;
+
static const uint8_t ipa_rsl_connect[] = {
0x00, 0x1c, 0xff, 0x10, 0x80, 0x00, 0x0a, 0x0d,
0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x70, 0x61, 0x63,
@@ -161,7 +164,7 @@ static void test_bts_supports_cm(void)
{
struct gsm_bts *bts;
- bts = gsm_bts_alloc(NULL, 0);
+ bts = gsm_bts_alloc(ctx, 0);
gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_V1);
gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_V1);
@@ -184,7 +187,9 @@ static void test_bts_supports_cm(void)
int main(int argc, char **argv)
{
- bts_log_init(NULL);
+ ctx = talloc_named_const(NULL, 0, "misc_test");
+
+ osmo_init_logging2(ctx, &bts_log_info);
test_sacch_get();
test_msg_utils_ipa();