X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Frotation.c;h=dad2e4a1dd7a51d2ef6391765a17ba9a4a02664a;hb=8a489ef928a15fd3cd18341340228874a4c94d27;hp=c9f5de4974375bff948f52d55460fca6dcb2e92f;hpb=a72956358a44cc703b4b96a7255454c6f5b09ab8;p=lttng-tools.git diff --git a/tests/regression/tools/notification/rotation.c b/tests/regression/tools/notification/rotation.c index c9f5de497..dad2e4a1d 100644 --- a/tests/regression/tools/notification/rotation.c +++ b/tests/regression/tools/notification/rotation.c @@ -79,7 +79,6 @@ int test_condition(struct lttng_condition *condition, const char *type_name) ok(out_session_name && !strcmp(session_name, out_session_name), "Session name returned by %s condition matches the expected name", type_name); -end: return ret; } @@ -322,10 +321,11 @@ int test_notification( location_status = lttng_trace_archive_location_local_get_absolute_path( location, &chunk_path); - ok(location_status == LTTNG_TRACE_ARCHIVE_LOCATION_STATUS_OK, + ok(location_status == LTTNG_TRACE_ARCHIVE_LOCATION_STATUS_OK && chunk_path, "Retrieved path from location returned by the session rotation completed notification"); diag("Chunk available at %s", chunk_path ? chunk_path : "NULL"); - ok(!strncmp(session->output_path, chunk_path, strlen(session->output_path)), + + ok(chunk_path && !strncmp(session->output_path, chunk_path, strlen(session->output_path)), "Returned path from location starts with the output path"); end: @@ -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(); }