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, 22 Jul 2020 17:21:11 +0000 (13:21 -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 11768fd81998ca96afc620bcf910a28395261baf..b8089d5c96b9f0492895b1fc776a9faa6d952cbc 100644 (file)
@@ -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();
 }
index 444ae86ae200aad7bb0ef2755465972678d06f8b..4ce6f6c745b0bdff5820227e1c26d0f7b573bb50 100644 (file)
@@ -191,6 +191,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.02634 seconds and 4 git commands to generate.