Change in openbsc[master]: tests: Explicitly drop category from log

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/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Feb 19 13:24:13 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/openbsc/+/22990 )


Change subject: tests: Explicitly drop category from log
......................................................................

tests: Explicitly drop category from log

Let's disable category here since we don't care about its formatting here.

In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.

Change-Id: I2697ec547468019a544b66daf9dbb58aa8d9772b
Related: OS#5034
---
M openbsc/tests/db/db_test.c
M openbsc/tests/subscr/bsc_subscr_test.c
2 files changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/90/22990/1

diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c
index 3d44930..d8440eb 100644
--- a/openbsc/tests/db/db_test.c
+++ b/openbsc/tests/db/db_test.c
@@ -207,6 +207,8 @@
 	osmo_init_logging(&log_info);
 	log_set_print_filename(osmo_stderr_target, 0);
 	log_set_use_color(osmo_stderr_target, 0);
+	log_set_print_category(osmo_stderr_target, 0);
+	log_set_print_category_hex(osmo_stderr_target, 0);
 
 	dummy_net.subscr_group = &dummy_sgrp;
 	dummy_sgrp.net         = &dummy_net;
@@ -216,7 +218,7 @@
 	if (db_init("hlr.sqlite3")) {
 		printf("DB: Failed to init database. Please check the option settings.\n");
 		return 1;
-	}	 
+	}
 	printf("DB: Database initialized.\n");
 
 	/* Muting stdout here because libdbi
diff --git a/openbsc/tests/subscr/bsc_subscr_test.c b/openbsc/tests/subscr/bsc_subscr_test.c
index 60d687d..20ce07d 100644
--- a/openbsc/tests/subscr/bsc_subscr_test.c
+++ b/openbsc/tests/subscr/bsc_subscr_test.c
@@ -118,6 +118,7 @@
 	log_set_print_timestamp(osmo_stderr_target, 0);
 	log_set_use_color(osmo_stderr_target, 0);
 	log_set_print_category(osmo_stderr_target, 1);
+	log_set_print_category_hex(osmo_stderr_target, 0);
 	log_set_category_filter(osmo_stderr_target, DREF, 1, LOGL_DEBUG);
 
 	bsc_subscribers = talloc_zero(NULL, struct llist_head);

-- 
To view, visit https://gerrit.osmocom.org/c/openbsc/+/22990
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Change-Id: I2697ec547468019a544b66daf9dbb58aa8d9772b
Gerrit-Change-Number: 22990
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210219/7b52d900/attachment.htm>


More information about the gerrit-log mailing list