tests: return the proper TAP exit code
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 13 Jul 2020 19:22:35 +0000 (15:22 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Aug 2020 20:01:54 +0000 (16:01 -0400)
The C TAP library provides the 'exit_status()' function that will return
the proper exit code according to the number of tests that succeeded or
failed.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I786527dfa9cfe2d1a7c8bc80086d54186f60b4d9

tests/gcc-weak-hidden/main.c
tests/snprintf/snprintf.c
tests/ust-elf/ust-elf.c

index 78199f5b698d4a84498f8d31d4471481010355f9..0a80c05b5f3b5159df1aa52e3bc2152a41a797b3 100644 (file)
@@ -82,5 +82,6 @@ int main()
                "Weak-hidden behavior is the same for 4 bytes integer and pointer objects within main program");
        ok(match_matrix[MATCH_LIB_INT] == match_matrix[MATCH_LIB_PTR],
                "Weak-hidden behavior is the same for 4 bytes integer and pointer objects within shared library");
-       return 0;
+
+       return exit_status();
 }
index 8d3fd5c034bbb634764c09fe009188fbf1c35b62..c1087402aec6a8f8d427176b67d9797a95194ebb 100644 (file)
@@ -38,5 +38,5 @@ int main()
        sprintf(test_desc, test_desc_fmt_str, escaped_test_fmt_str);
        ok(strcmp(buf, expected) == 0, test_desc);
 
-       return 0;
+       return exit_status();
 }
index 4036563ae44b9fa6dd8a7f32a8c1b63b41b1e23d..e45ff845dad55d51705a222ca9172ca1f1344531 100644 (file)
@@ -165,5 +165,5 @@ int main(int argc, char **argv)
                AARCH64_BE_CRC);
        test_pic(test_dir);
 
-       return EXIT_SUCCESS;
+       return exit_status();
 }
This page took 0.025973 seconds and 4 git commands to generate.