[MERGED] libosmo-netif[master]: tests: use osmo_init_logging2

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 17 12:06:47 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: tests: use osmo_init_logging2
......................................................................


tests: use osmo_init_logging2

Change-Id: Icc84bbd53e1589e26e445e3460024e77162bd76f
---
M tests/jibuf/jibuf_test.c
M tests/osmux/osmux_test.c
2 files changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/jibuf/jibuf_test.c b/tests/jibuf/jibuf_test.c
index 8771eeb..6e8c805 100644
--- a/tests/jibuf/jibuf_test.c
+++ b/tests/jibuf/jibuf_test.c
@@ -735,7 +735,9 @@
 		exit(EXIT_FAILURE);
 	}
 
-	osmo_init_logging(&jibuf_test_log_info);
+	void *tall_ctx = talloc_named_const(NULL, 1, "Root context");
+	msgb_talloc_ctx_init(tall_ctx, 0);
+	osmo_init_logging2(tall_ctx, &jibuf_test_log_info);
 	log_set_print_filename(osmo_stderr_target, 0);
 	log_set_log_level(osmo_stderr_target, LOGL_DEBUG);
 	log_set_category_filter(osmo_stderr_target, DLJIBUF, 1, LOGL_DEBUG);
diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c
index 09b7a9a..01ce2d1 100644
--- a/tests/osmux/osmux_test.c
+++ b/tests/osmux/osmux_test.c
@@ -260,7 +260,9 @@
 #endif
 
 	/* This test doesn't use it, but osmux requires it internally. */
-	osmo_init_logging(&osmux_test_log_info);
+	void *tall_ctx = talloc_named_const(NULL, 1, "Root context");
+	msgb_talloc_ctx_init(tall_ctx, 0);
+	osmo_init_logging2(tall_ctx, &osmux_test_log_info);
 	log_set_log_level(osmo_stderr_target, LOGL_DEBUG);
 
 	osmux_xfrm_output_init(&h_output, 0x7000000);

-- 
To view, visit https://gerrit.osmocom.org/7847
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc84bbd53e1589e26e445e3460024e77162bd76f
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list