]> git.lttng.org Git - lttng-tools.git/commitdiff
tests: return the proper TAP exit code
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 13 Jul 2020 19:41:01 +0000 (15:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Jul 2020 17:03:12 +0000 (13:03 -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: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I0de2349609eb34b1c5e58f09012c1db0126923c0

tests/regression/tools/notification/rotation.c
tests/unit/test_kernel_data.c

index 5554f631adcaea8447ec57bbe24a9dc11d333366..dad2e4a1dd7a51d2ef6391765a17ba9a4a02664a 100644 (file)
@@ -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();
 }
index a6c99c858c892cad0cec232bff87b319ec4033ab..533cbbc0f59c214719247cfc94dd7b09b851e866 100644 (file)
@@ -202,6 +202,5 @@ int main(int argc, char **argv)
        test_create_kernel_event();
        test_create_kernel_stream();
 
-       /* Success */
-       return 0;
+       return exit_status();
 }
This page took 0.030127 seconds and 4 git commands to generate.