From 6b57784f0f175275fd900eca21c77415e3a5ea52 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 9 Jul 2014 11:24:21 +0200 Subject: TOOLS: Always debug to stderr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://fedorahosted.org/sssd/ticket/2348 Programs that are supposed to only be executed on the foreground should log to stderr automatically. Reviewed-by: Michal Židek --- src/tests/auth-tests.c | 2 +- src/tests/cmocka/sbus_internal_tests.c | 2 +- src/tests/cmocka/test_ad_access_filter.c | 2 +- src/tests/cmocka/test_ad_common.c | 2 +- src/tests/cmocka/test_ad_gpo.c | 2 +- src/tests/cmocka/test_dp_opts.c | 2 +- src/tests/cmocka/test_dyndns.c | 2 +- src/tests/cmocka/test_fqnames.c | 2 +- src/tests/cmocka/test_ifp.c | 2 +- src/tests/cmocka/test_ipa_idmap.c | 2 +- src/tests/cmocka/test_nested_groups.c | 2 +- src/tests/cmocka/test_nss_srv.c | 2 +- src/tests/cmocka/test_responder_common.c | 2 +- src/tests/cmocka/test_sdap.c | 2 +- src/tests/cmocka/test_sss_idmap.c | 2 +- src/tests/cmocka/test_sss_sifp.c | 2 +- src/tests/cmocka/test_utils.c | 2 +- src/tests/crypto-tests.c | 2 +- src/tests/fail_over-tests.c | 2 +- src/tests/files-tests.c | 2 +- src/tests/krb5_child-test.c | 2 +- src/tests/krb5_utils-tests.c | 2 +- src/tests/refcount-tests.c | 2 +- src/tests/resolv-tests.c | 2 +- src/tests/responder_socket_access-tests.c | 2 +- src/tests/simple_access-tests.c | 2 +- src/tests/strtonum-tests.c | 2 +- src/tests/sysdb-tests.c | 2 +- src/tests/sysdb_ssh-tests.c | 2 +- src/tests/util-tests.c | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) (limited to 'src/tests') diff --git a/src/tests/auth-tests.c b/src/tests/auth-tests.c index 810a02be8..670a4d2ad 100644 --- a/src/tests/auth-tests.c +++ b/src/tests/auth-tests.c @@ -317,7 +317,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/cmocka/sbus_internal_tests.c b/src/tests/cmocka/sbus_internal_tests.c index 0d3e25a4e..a79f54d26 100644 --- a/src/tests/cmocka/sbus_internal_tests.c +++ b/src/tests/cmocka/sbus_internal_tests.c @@ -259,7 +259,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); return run_tests(tests); } diff --git a/src/tests/cmocka/test_ad_access_filter.c b/src/tests/cmocka/test_ad_access_filter.c index 3f4e44f14..7654e8498 100644 --- a/src/tests/cmocka/test_ad_access_filter.c +++ b/src/tests/cmocka/test_ad_access_filter.c @@ -349,7 +349,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/cmocka/test_ad_common.c b/src/tests/cmocka/test_ad_common.c index bbd56b1b9..c4b6bd0f2 100644 --- a/src/tests/cmocka/test_ad_common.c +++ b/src/tests/cmocka/test_ad_common.c @@ -234,7 +234,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/cmocka/test_ad_gpo.c b/src/tests/cmocka/test_ad_gpo.c index 231c3608d..e6319118e 100644 --- a/src/tests/cmocka/test_ad_gpo.c +++ b/src/tests/cmocka/test_ad_gpo.c @@ -380,7 +380,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/cmocka/test_dp_opts.c b/src/tests/cmocka/test_dp_opts.c index 31dde47c7..0f3052ab3 100644 --- a/src/tests/cmocka/test_dp_opts.c +++ b/src/tests/cmocka/test_dp_opts.c @@ -400,7 +400,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/cmocka/test_dyndns.c b/src/tests/cmocka/test_dyndns.c index db90e661c..b0e8df81b 100644 --- a/src/tests/cmocka/test_dyndns.c +++ b/src/tests/cmocka/test_dyndns.c @@ -422,7 +422,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/cmocka/test_fqnames.c b/src/tests/cmocka/test_fqnames.c index c76109370..a3d176af0 100644 --- a/src/tests/cmocka/test_fqnames.c +++ b/src/tests/cmocka/test_fqnames.c @@ -537,7 +537,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/cmocka/test_ifp.c b/src/tests/cmocka/test_ifp.c index 650a94969..b0f6e0990 100644 --- a/src/tests/cmocka/test_ifp.c +++ b/src/tests/cmocka/test_ifp.c @@ -475,7 +475,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/cmocka/test_ipa_idmap.c b/src/tests/cmocka/test_ipa_idmap.c index 2fb2cde2f..8ad562987 100644 --- a/src/tests/cmocka/test_ipa_idmap.c +++ b/src/tests/cmocka/test_ipa_idmap.c @@ -241,7 +241,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/cmocka/test_nested_groups.c b/src/tests/cmocka/test_nested_groups.c index 955d05dd4..0c1a53b0e 100644 --- a/src/tests/cmocka/test_nested_groups.c +++ b/src/tests/cmocka/test_nested_groups.c @@ -463,7 +463,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/cmocka/test_nss_srv.c b/src/tests/cmocka/test_nss_srv.c index 24e58abe7..808a7a185 100644 --- a/src/tests/cmocka/test_nss_srv.c +++ b/src/tests/cmocka/test_nss_srv.c @@ -1666,7 +1666,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/cmocka/test_responder_common.c b/src/tests/cmocka/test_responder_common.c index 44627ab99..24bb54ff5 100644 --- a/src/tests/cmocka/test_responder_common.c +++ b/src/tests/cmocka/test_responder_common.c @@ -303,7 +303,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/cmocka/test_sdap.c b/src/tests/cmocka/test_sdap.c index f61c38c5f..7c7eb3436 100644 --- a/src/tests/cmocka/test_sdap.c +++ b/src/tests/cmocka/test_sdap.c @@ -575,7 +575,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/cmocka/test_sss_idmap.c b/src/tests/cmocka/test_sss_idmap.c index ff9332164..ccdfa63ad 100644 --- a/src/tests/cmocka/test_sss_idmap.c +++ b/src/tests/cmocka/test_sss_idmap.c @@ -549,7 +549,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/cmocka/test_sss_sifp.c b/src/tests/cmocka/test_sss_sifp.c index 190dd7629..54f215207 100644 --- a/src/tests/cmocka/test_sss_sifp.c +++ b/src/tests/cmocka/test_sss_sifp.c @@ -1923,7 +1923,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); rv = run_tests(tests); diff --git a/src/tests/cmocka/test_utils.c b/src/tests/cmocka/test_utils.c index 20e21a9ba..e49e7eca5 100644 --- a/src/tests/cmocka/test_utils.c +++ b/src/tests/cmocka/test_utils.c @@ -934,7 +934,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ diff --git a/src/tests/crypto-tests.c b/src/tests/crypto-tests.c index 87184594e..ee807c6bc 100644 --- a/src/tests/crypto-tests.c +++ b/src/tests/crypto-tests.c @@ -206,7 +206,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/fail_over-tests.c b/src/tests/fail_over-tests.c index 78aaf9c10..b21ead382 100644 --- a/src/tests/fail_over-tests.c +++ b/src/tests/fail_over-tests.c @@ -311,7 +311,7 @@ main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/files-tests.c b/src/tests/files-tests.c index e8bd3b97d..09df5cbd4 100644 --- a/src/tests/files-tests.c +++ b/src/tests/files-tests.c @@ -323,7 +323,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug); + DEBUG_CLI_INIT(debug); tests_set_cwd(); diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c index 4046def65..63caa5f6c 100644 --- a/src/tests/krb5_child-test.c +++ b/src/tests/krb5_child-test.c @@ -443,7 +443,7 @@ main(int argc, const char *argv[]) } } - DEBUG_INIT(pc_debug); + DEBUG_CLI_INIT(pc_debug); if (opt != -1) { poptPrintUsage(pc, stderr, 0); diff --git a/src/tests/krb5_utils-tests.c b/src/tests/krb5_utils-tests.c index 11fe1d749..c59356ed0 100644 --- a/src/tests/krb5_utils-tests.c +++ b/src/tests/krb5_utils-tests.c @@ -662,7 +662,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); ret = mkdir(TESTS_PATH, 0775); if (ret != EOK) { diff --git a/src/tests/refcount-tests.c b/src/tests/refcount-tests.c index 9713d4783..7fb398e7a 100644 --- a/src/tests/refcount-tests.c +++ b/src/tests/refcount-tests.c @@ -222,7 +222,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug); + DEBUG_CLI_INIT(debug); tests_set_cwd(); diff --git a/src/tests/resolv-tests.c b/src/tests/resolv-tests.c index abf7539db..5b85bf6ef 100644 --- a/src/tests/resolv-tests.c +++ b/src/tests/resolv-tests.c @@ -967,7 +967,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug); + DEBUG_CLI_INIT(debug); if (!use_net_test) { printf("Network tests disabled. Rerun with the \"-n\" " diff --git a/src/tests/responder_socket_access-tests.c b/src/tests/responder_socket_access-tests.c index a01a5d12c..b1f7a4c17 100644 --- a/src/tests/responder_socket_access-tests.c +++ b/src/tests/responder_socket_access-tests.c @@ -163,7 +163,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); Suite *s = responder_test_suite(); diff --git a/src/tests/simple_access-tests.c b/src/tests/simple_access-tests.c index 999277340..5c74eb85f 100644 --- a/src/tests/simple_access-tests.c +++ b/src/tests/simple_access-tests.c @@ -658,7 +658,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_FILE, LOCAL_SYSDB_FILE); diff --git a/src/tests/strtonum-tests.c b/src/tests/strtonum-tests.c index 009f0049a..73a07114f 100644 --- a/src/tests/strtonum-tests.c +++ b/src/tests/strtonum-tests.c @@ -449,7 +449,7 @@ int main(int argc, const char *argv[]) { } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index 51baae1f6..d24bd4f7d 100644 --- a/src/tests/sysdb-tests.c +++ b/src/tests/sysdb-tests.c @@ -5986,7 +5986,7 @@ int main(int argc, const char *argv[]) { } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); if (!ldb_modules_path_is_set()) { fprintf(stderr, "Warning: LDB_MODULES_PATH is not set, " diff --git a/src/tests/sysdb_ssh-tests.c b/src/tests/sysdb_ssh-tests.c index ae0cb71c7..6a4c219b3 100644 --- a/src/tests/sysdb_ssh-tests.c +++ b/src/tests/sysdb_ssh-tests.c @@ -400,7 +400,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); if (!ldb_modules_path_is_set()) { fprintf(stderr, "Warning: LDB_MODULES_PATH is not set, " diff --git a/src/tests/util-tests.c b/src/tests/util-tests.c index b79153e3e..08e8b8d26 100644 --- a/src/tests/util-tests.c +++ b/src/tests/util-tests.c @@ -1083,7 +1083,7 @@ int main(int argc, const char *argv[]) } poptFreeContext(pc); - DEBUG_INIT(debug_level); + DEBUG_CLI_INIT(debug_level); tests_set_cwd(); -- cgit