]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use SKIPPED_TEST_EXIT_CODE consistently
authorMichal Nowak <mnowak@isc.org>
Mon, 15 Feb 2021 16:20:50 +0000 (17:20 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 16 Feb 2021 12:41:50 +0000 (13:41 +0100)
Commit fa505bfb0e7623d7cfc94ae15a0246ae71000904 omitted two unit tests
while introducing the SKIP_TEST_EXIT_CODE preprocessor macro.  Fix the
outliers to make use of SKIP_TEST_EXIT_CODE consistent across all unit
tests.  Also make sure lib/dns/tests/dnstap_test returns an exit code
that indicates a skipped test when dnstap is not enabled.

lib/dns/tests/dnstap_test.c
lib/isc/tests/doh_test.c
lib/isc/tests/tlsdns_test.c

index 5c46eda56d96e6d55ce8d85154d0ff70979dd175..13b4907d5dcfe7f56de5b85ccc636e060178cabd 100644 (file)
@@ -382,7 +382,8 @@ main(void) {
 
        return (cmocka_run_group_tests(tests, NULL, NULL));
 #else  /* if HAVE_DNSTAP */
-       print_message("1..0 # Skip dnstap not enabled\n");
+       print_message("1..0 # Skipped: dnstap not enabled\n");
+       return (SKIPPED_TEST_EXIT_CODE);
 #endif /* HAVE_DNSTAP */
 }
 
index 879e42a431d799d201ae2fe7be1828c489ec3e72..5159f0e5dfa1b43e6b712a34750295a5b486676d 100644 (file)
@@ -1765,7 +1765,7 @@ main(void) {
 int
 main(void) {
        printf("1..0 # Skipped: cmocka not available\n");
-       return (0);
+       return (SKIPPED_TEST_EXIT_CODE);
 }
 
 #endif /* if HAVE_CMOCKA */
index 9e1f6f5431ab05cc0641a5ee3f090e4e4120d6a4..76b89744177dec10d016c83c5fb2454acd6d23cd 100644 (file)
@@ -893,7 +893,7 @@ main(void) {
 int
 main(void) {
        printf("1..0 # Skipped: cmocka not available\n");
-       return (0);
+       return (SKIPPED_TEST_EXIT_CODE);
 }
 
 #endif /* if HAVE_CMOCKA */