aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-12-23 05:08:12 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-12-23 05:08:12 +0100
commitf9b1f30558c7c9aca1225a98c64a8f9c345cf7f9 (patch)
tree4723ffb5314b1ca5c5379c8e53cd5967d3e1a8a5 /openbsc/tests
parentb61e3b21580afc6381a6c72618d51697c7ce9771 (diff)
[debug] Make the test case compile and it is still passing
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/debug/debug_test.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/openbsc/tests/debug/debug_test.c b/openbsc/tests/debug/debug_test.c
index 77ac01532..0f0c284ab 100644
--- a/openbsc/tests/debug/debug_test.c
+++ b/openbsc/tests/debug/debug_test.c
@@ -1,6 +1,6 @@
/* simple test for the debug interface */
/*
- * (C) 2008 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2008, 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -24,11 +24,18 @@
int main(int argc, char** argv)
{
- debug_parse_category_mask("DRLL");
- DEBUGP(DCC, "You should not see this\n");
+ struct debug_target *stderr_target;
- debug_parse_category_mask("DRLL:DCC");
- DEBUGP(DRLL, "You should see this\n");
- DEBUGP(DCC, "You should see this\n");
- DEBUGP(DMM, "You should not see this\n");
+ debug_init();
+ stderr_target = debug_target_create_stderr();
+ debug_add_target(stderr_target);
+ debug_set_all_filter(stderr_target, 1);
+
+ debug_parse_category_mask(stderr_target, "DRLL");
+ DEBUGP(DCC, "You should not see this\n");
+
+ debug_parse_category_mask(stderr_target, "DRLL:DCC");
+ DEBUGP(DRLL, "You should see this\n");
+ DEBUGP(DCC, "You should see this\n");
+ DEBUGP(DMM, "You should not see this\n");
}