From: Michael Jeanson Date: Mon, 13 Jul 2020 19:41:01 +0000 (-0400) Subject: tests: return the proper TAP exit code X-Git-Tag: v2.11.5~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8a489ef928a15fd3cd18341340228874a4c94d27;p=lttng-tools.git 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: Jérémie Galarneau Change-Id: I0de2349609eb34b1c5e58f09012c1db0126923c0 --- diff --git a/tests/regression/tools/notification/rotation.c b/tests/regression/tools/notification/rotation.c index 5554f631a..dad2e4a1d 100644 --- a/tests/regression/tools/notification/rotation.c +++ b/tests/regression/tools/notification/rotation.c @@ -424,5 +424,5 @@ int main(int argc, const char *argv[]) error: lttng_notification_channel_destroy(notification_channel); lttng_rotation_handle_destroy(rotation_handle); - return ret; + return exit_status(); } diff --git a/tests/unit/test_kernel_data.c b/tests/unit/test_kernel_data.c index a6c99c858..533cbbc0f 100644 --- a/tests/unit/test_kernel_data.c +++ b/tests/unit/test_kernel_data.c @@ -202,6 +202,5 @@ int main(int argc, char **argv) test_create_kernel_event(); test_create_kernel_stream(); - /* Success */ - return 0; + return exit_status(); }