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.12.2~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d2d77525ab283446bd07a857cc43edf37ae583a3;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 11768fd81..b8089d5c9 100644 --- a/tests/regression/tools/notification/rotation.c +++ b/tests/regression/tools/notification/rotation.c @@ -409,5 +409,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 444ae86ae..4ce6f6c74 100644 --- a/tests/unit/test_kernel_data.c +++ b/tests/unit/test_kernel_data.c @@ -191,6 +191,5 @@ int main(int argc, char **argv) test_create_kernel_event(); test_create_kernel_stream(); - /* Success */ - return 0; + return exit_status(); }