From 674c3e2c8477aafe7b2145861ad83dd041d59018 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 13 Jul 2020 15:41:01 -0400 Subject: [PATCH] tests: return the proper TAP exit code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tests/regression/tools/notification/rotation.c | 2 +- tests/unit/test_kernel_data.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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(); } -- 2.34.1