use osmo_init_logging2() with proper talloc ctx

Since the logging allocations now also show up in the root context report, some
tests need adjusted talloc checks.

In msc_vlr_tests, also output the number of talloc blocks before tests are
started to show that the number didn't change after the tests.

Change-Id: Iae07ae60230c7bab28e52b5df97fa3844778158e
diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c
index 641cc5f..6ce0b88 100644
--- a/tests/sms_queue/sms_queue_test.c
+++ b/tests/sms_queue/sms_queue_test.c
@@ -198,10 +198,12 @@
 int main(int argc, char **argv)
 {
 	void *msgb_ctx;
+	void *logging_ctx;
 
 	talloc_ctx = talloc_named_const(NULL, 0, "sms_queue_test");
-	msgb_ctx = msgb_talloc_ctx_init(NULL, 0);
-	osmo_init_logging(&info);
+	msgb_ctx = msgb_talloc_ctx_init(talloc_ctx, 0);
+	logging_ctx = talloc_named_const(talloc_ctx, 0, "logging");
+	osmo_init_logging2(logging_ctx, &info);
 
 	OSMO_ASSERT(osmo_stderr_target);
 	log_set_use_color(osmo_stderr_target, 0);
@@ -222,6 +224,7 @@
 	OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1);
 	OSMO_ASSERT(talloc_total_size(msgb_ctx) == 0);
 	talloc_free(msgb_ctx);
+	talloc_free(logging_ctx);
 
 	if (talloc_total_blocks(talloc_ctx) != 1
 	    || talloc_total_size(talloc_ctx) != 0)