aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-02-19 14:20:42 +0100
committerPau Espin Pedrol <pespin@espeweb.net>2021-02-22 11:25:13 +0100
commit373bc13909728dd92c9a26ad3c47df58ef7a99d6 (patch)
tree64cd3d6d604e791f0d9aa8c19a3555268f2d4c46 /openbsc
parent73790ba26b2034a01790b5830e423d770caad272 (diff)
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
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/tests/db/db_test.c2
-rw-r--r--openbsc/tests/smpp/smpp_test.c2
-rw-r--r--openbsc/tests/subscr/bsc_subscr_test.c1
-rw-r--r--openbsc/tests/subscr/subscr_test.c2
4 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c
index 3d4493012..5742b4333 100644
--- a/openbsc/tests/db/db_test.c
+++ b/openbsc/tests/db/db_test.c
@@ -207,6 +207,8 @@ int main()
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;
diff --git a/openbsc/tests/smpp/smpp_test.c b/openbsc/tests/smpp/smpp_test.c
index 62fa9d2e9..e1e9a8bf7 100644
--- a/openbsc/tests/smpp/smpp_test.c
+++ b/openbsc/tests/smpp/smpp_test.c
@@ -67,6 +67,8 @@ int main(int argc, char **argv)
osmo_init_logging(&log_info);
log_set_use_color(osmo_stderr_target, 0);
log_set_print_filename(osmo_stderr_target, 0);
+ log_set_print_category(osmo_stderr_target, 0);
+ log_set_print_category_hex(osmo_stderr_target, 0);
test_coding_scheme();
return EXIT_SUCCESS;
diff --git a/openbsc/tests/subscr/bsc_subscr_test.c b/openbsc/tests/subscr/bsc_subscr_test.c
index 60d687d58..20ce07dfc 100644
--- a/openbsc/tests/subscr/bsc_subscr_test.c
+++ b/openbsc/tests/subscr/bsc_subscr_test.c
@@ -118,6 +118,7 @@ int main()
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);
diff --git a/openbsc/tests/subscr/subscr_test.c b/openbsc/tests/subscr/subscr_test.c
index 2a5d0e1c2..78fa7bb5f 100644
--- a/openbsc/tests/subscr/subscr_test.c
+++ b/openbsc/tests/subscr/subscr_test.c
@@ -106,6 +106,8 @@ int main()
printf("Testing subscriber core code.\n");
osmo_init_logging(&log_info);
log_set_print_filename(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;