diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/abis/abis_test.c | 8 | ||||
-rw-r--r-- | tests/bsc-nat-trie/bsc_nat_trie_test.c | 8 | ||||
-rw-r--r-- | tests/bsc-nat/bsc_nat_test.c | 8 | ||||
-rw-r--r-- | tests/bsc/bsc_test.c | 33 | ||||
-rw-r--r-- | tests/bssap/bssap_test.c | 18 | ||||
-rw-r--r-- | tests/channel/channel_test.c | 8 | ||||
-rw-r--r-- | tests/gsm0408/gsm0408_test.c | 8 | ||||
-rw-r--r-- | tests/nanobts_omlattr/nanobts_omlattr_test.c | 8 | ||||
-rw-r--r-- | tests/subscr/bsc_subscr_test.c | 14 |
9 files changed, 112 insertions, 1 deletions
diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index 461f24ed5..36a45a3a4 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -83,6 +83,14 @@ static void test_sw_selection(void) printf("%s(): OK\n", __func__); } +static const struct log_info_cat log_categories[] = { +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; + int main(int argc, char **argv) { osmo_init_logging(&log_info); diff --git a/tests/bsc-nat-trie/bsc_nat_trie_test.c b/tests/bsc-nat-trie/bsc_nat_trie_test.c index 3c04a9f84..1c48564a4 100644 --- a/tests/bsc-nat-trie/bsc_nat_trie_test.c +++ b/tests/bsc-nat-trie/bsc_nat_trie_test.c @@ -28,6 +28,14 @@ #include <string.h> +static const struct log_info_cat log_categories[] = { +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; + int main(int argc, char **argv) { struct nat_rewrite *trie; diff --git a/tests/bsc-nat/bsc_nat_test.c b/tests/bsc-nat/bsc_nat_test.c index a61da0058..3d3b4558d 100644 --- a/tests/bsc-nat/bsc_nat_test.c +++ b/tests/bsc-nat/bsc_nat_test.c @@ -1549,6 +1549,14 @@ static void test_nat_extract_lac() bsc_nat_free(nat); } +static const struct log_info_cat log_categories[] = { +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; + int main(int argc, char **argv) { msgb_talloc_ctx_init(NULL, 0); diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 420ef73d6..19bb608e0 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -194,6 +194,39 @@ out: talloc_free(net); } +static const struct log_info_cat log_categories[] = { + [DNM] = { + .name = "DNM", + .description = "A-bis Network Management / O&M (NM/OML)", + .color = "\033[1;36m", + .enabled = 1, .loglevel = LOGL_INFO, + }, + [DNAT] = { + .name = "DNAT", + .description = "GSM 08.08 NAT/Multiplexer", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, + [DMSC] = { + .name = "DMSC", + .description = "Mobile Switching Center", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, + [DCTRL] = { + .name = "DCTRL", + .description = "Control interface", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, + [DFILTER] = { + .name = "DFILTER", + .description = "BSC/NAT IMSI based filtering", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; int main(int argc, char **argv) { diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c index 1d8fe7720..dac0ff762 100644 --- a/tests/bssap/bssap_test.c +++ b/tests/bssap/bssap_test.c @@ -120,6 +120,24 @@ void test_cell_identifier() } } +static const struct log_info_cat log_categories[] = { + [DMSC] = { + .name = "DMSC", + .description = "Mobile Switching Center", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, + [DREF] = { + .name = "DREF", + .description = "Reference Counting", + .enabled = 0, .loglevel = LOGL_DEBUG, + }, +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; + int main(int argc, char **argv) { osmo_init_logging(&log_info); diff --git a/tests/channel/channel_test.c b/tests/channel/channel_test.c index 933df9c9d..f37877e94 100644 --- a/tests/channel/channel_test.c +++ b/tests/channel/channel_test.c @@ -88,6 +88,14 @@ void test_dyn_ts_subslots(void) OSMO_ASSERT(ts_subslots(&ts) == 0); } +static const struct log_info_cat log_categories[] = { +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; + int main(int argc, char **argv) { osmo_init_logging(&log_info); diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 784c3e995..8cd9f81af 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -708,6 +708,14 @@ static void test_si_ba_ind(struct gsm_network *net) OSMO_ASSERT(si5ter->bcch_frequency_list[0] & 0x10); } +static const struct log_info_cat log_categories[] = { +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; + int main(int argc, char **argv) { struct gsm_network *net; diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c index 674148a25..1d248c277 100644 --- a/tests/nanobts_omlattr/nanobts_omlattr_test.c +++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -183,6 +183,14 @@ static void test_nanobts_attr_radio_get(struct gsm_bts *bts, printf("\n"); } +static const struct log_info_cat log_categories[] = { +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; + int main(int argc, char **argv) { void *ctx; diff --git a/tests/subscr/bsc_subscr_test.c b/tests/subscr/bsc_subscr_test.c index 934684f27..d15c1141d 100644 --- a/tests/subscr/bsc_subscr_test.c +++ b/tests/subscr/bsc_subscr_test.c @@ -110,6 +110,19 @@ static void test_bsc_subscr(void) OSMO_ASSERT(llist_empty(bsc_subscribers)); } +static const struct log_info_cat log_categories[] = { + [DREF] = { + .name = "DREF", + .description = "Reference Counting", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, +}; + +static const struct log_info log_info = { + .cat = log_categories, + .num_cat = ARRAY_SIZE(log_categories), +}; + int main() { printf("Testing BSC subscriber core code.\n"); @@ -118,7 +131,6 @@ 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_category_filter(osmo_stderr_target, DREF, 1, LOGL_DEBUG); bsc_subscribers = talloc_zero(NULL, struct llist_head); INIT_LLIST_HEAD(bsc_subscribers); |