summaryrefslogtreecommitdiffstats
path: root/src/tests/debug-tests.c
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2013-12-20 16:51:37 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-02-12 22:31:13 +0100
commit5c233380e1ebf641f6106a34d7b94f9e9a606589 (patch)
tree421a41bd27f02d5cca480c0241f38feddbc7b1d4 /src/tests/debug-tests.c
parentdfdc99afd56b605632adc265bfb1f55cd52b3dbe (diff)
downloadsssd-5c233380e1ebf641f6106a34d7b94f9e9a606589.tar.gz
sssd-5c233380e1ebf641f6106a34d7b94f9e9a606589.tar.xz
sssd-5c233380e1ebf641f6106a34d7b94f9e9a606589.zip
Remove DEBUG macro support for old debug levels
Remove support for specifying old debug levels to the DEBUG macro: * remove debug_get_level function which was used for conversion, * remove debug_get_level tests, * remove mentions of old/new levels from DEBUG and DEBUG_IS_SET macro descriptions, * rename "newlevel" argument of debug_fn to just "level". Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/tests/debug-tests.c')
-rw-r--r--src/tests/debug-tests.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/tests/debug-tests.c b/src/tests/debug-tests.c
index 0d2fe39fc..cc422382a 100644
--- a/src/tests/debug-tests.c
+++ b/src/tests/debug-tests.c
@@ -115,70 +115,6 @@ START_TEST(test_debug_convert_old_level_new_format)
}
END_TEST
-START_TEST(test_debug_get_level_old_format)
-{
- fail_unless(debug_get_level(0) == SSSDBG_FATAL_FAILURE, "Invalid conversion of 0");
- fail_unless(debug_get_level(1) == SSSDBG_CRIT_FAILURE, "Invalid conversion of 1");
- fail_unless(debug_get_level(2) == SSSDBG_OP_FAILURE, "Invalid conversion of 2");
- fail_unless(debug_get_level(3) == SSSDBG_MINOR_FAILURE, "Invalid conversion of 3");
- fail_unless(debug_get_level(4) == SSSDBG_CONF_SETTINGS, "Invalid conversion of 4");
- fail_unless(debug_get_level(5) == SSSDBG_FUNC_DATA, "Invalid conversion of 5");
- fail_unless(debug_get_level(6) == SSSDBG_TRACE_FUNC, "Invalid conversion of 6");
- fail_unless(debug_get_level(7) == SSSDBG_TRACE_LIBS, "Invalid conversion of 7");
- fail_unless(debug_get_level(8) == SSSDBG_TRACE_INTERNAL, "Invalid conversion of 8");
- fail_unless(debug_get_level(9) == SSSDBG_TRACE_ALL, "Invalid conversion of 9");
-}
-END_TEST
-
-START_TEST(test_debug_get_level_new_format)
-{
- fail_unless(
- debug_get_level(SSSDBG_UNRESOLVED) == SSSDBG_FATAL_FAILURE,
- "Invalid conversion of SSSDBG_UNRESOLVED"
- );
- fail_unless(
- debug_get_level(SSSDBG_FATAL_FAILURE) == SSSDBG_FATAL_FAILURE,
- "Invalid conversion of SSSDBG_FATAL_FAILURE"
- );
- fail_unless(
- debug_get_level(SSSDBG_CRIT_FAILURE) == SSSDBG_CRIT_FAILURE,
- "Invalid conversion of SSSDBG_CRIT_FAILURE"
- );
- fail_unless(
- debug_get_level(SSSDBG_OP_FAILURE) == SSSDBG_OP_FAILURE,
- "Invalid conversion of SSSDBG_OP_FAILURE"
- );
- fail_unless(
- debug_get_level(SSSDBG_MINOR_FAILURE) == SSSDBG_MINOR_FAILURE,
- "Invalid conversion of SSSDBG_MINOR_FAILURE"
- );
- fail_unless(
- debug_get_level(SSSDBG_CONF_SETTINGS) == SSSDBG_CONF_SETTINGS,
- "Invalid conversion of SSSDBG_CONF_SETTINGS"
- );
- fail_unless(
- debug_get_level(SSSDBG_FUNC_DATA) == SSSDBG_FUNC_DATA,
- "Invalid conversion of SSSDBG_FUNC_DATA"
- );
- fail_unless(
- debug_get_level(SSSDBG_TRACE_FUNC) == SSSDBG_TRACE_FUNC,
- "Invalid conversion of SSSDBG_TRACE_FUNC"
- );
- fail_unless(
- debug_get_level(SSSDBG_TRACE_LIBS) == SSSDBG_TRACE_LIBS,
- "Invalid conversion of SSSDBG_TRACE_LIBS"
- );
- fail_unless(
- debug_get_level(SSSDBG_TRACE_INTERNAL) == SSSDBG_TRACE_INTERNAL,
- "Invalid conversion of SSSDBG_TRACE_INTERNAL"
- );
- fail_unless(
- debug_get_level(SSSDBG_TRACE_ALL) == SSSDBG_TRACE_ALL,
- "Invalid conversion of SSSDBG_TRACE_ALL"
- );
-}
-END_TEST
-
int test_helper_debug_check_message(int level)
{
TALLOC_CTX *ctx = talloc_new(NULL);
@@ -723,8 +659,6 @@ Suite *debug_suite(void)
tcase_add_test(tc_debug, test_debug_convert_old_level_old_format);
tcase_add_test(tc_debug, test_debug_convert_old_level_new_format);
- tcase_add_test(tc_debug, test_debug_get_level_old_format);
- tcase_add_test(tc_debug, test_debug_get_level_new_format);
tcase_add_test(tc_debug, test_debug_is_set_single_no_timestamp);
tcase_add_test(tc_debug, test_debug_is_set_single_timestamp);
tcase_add_test(tc_debug, test_debug_is_set_single_timestamp_microseconds);