From: Michael Jeanson Date: Mon, 13 Jul 2020 19:22:35 +0000 (-0400) Subject: tests: return the proper TAP exit code X-Git-Tag: v2.13.0-rc1~489 X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=commitdiff_plain;h=bf746e7d3ca3d5769c6b72a87825dd94ae7238c8 tests: return the proper TAP exit code 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 Signed-off-by: Mathieu Desnoyers Change-Id: I786527dfa9cfe2d1a7c8bc80086d54186f60b4d9 --- diff --git a/tests/gcc-weak-hidden/main.c b/tests/gcc-weak-hidden/main.c index 78199f5b..0a80c05b 100644 --- a/tests/gcc-weak-hidden/main.c +++ b/tests/gcc-weak-hidden/main.c @@ -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(); } diff --git a/tests/snprintf/snprintf.c b/tests/snprintf/snprintf.c index 8d3fd5c0..c1087402 100644 --- a/tests/snprintf/snprintf.c +++ b/tests/snprintf/snprintf.c @@ -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(); } diff --git a/tests/ust-elf/ust-elf.c b/tests/ust-elf/ust-elf.c index af9b1239..24102819 100644 --- a/tests/ust-elf/ust-elf.c +++ b/tests/ust-elf/ust-elf.c @@ -166,5 +166,5 @@ int main(int argc, char **argv) AARCH64_BE_CRC); test_pic(test_dir); - return EXIT_SUCCESS; + return exit_status(); }