X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Funit%2Ftest_fd_tracker.c;h=94f54769d18b4f6c1fbf4c591d3c71ffe1d3598b;hp=8c0fc5ffe90a4dcc8b5052adf0dd99c7743122af;hb=c13428b1e67e3dfe64866ee488f16f45522f17b6;hpb=f0faf175a352cdd874e7b24ce76d0d941f5ba720 diff --git a/tests/unit/test_fd_tracker.c b/tests/unit/test_fd_tracker.c index 8c0fc5ffe..94f54769d 100644 --- a/tests/unit/test_fd_tracker.c +++ b/tests/unit/test_fd_tracker.c @@ -83,7 +83,9 @@ int fd_count(void) } /* Don't account for the file descriptor opened by opendir(). */ count--; - closedir(dir); + if (closedir(dir)) { + perror("# Failed to close test program's self/fd directory file descriptor"); + } end: return count; } @@ -664,7 +666,7 @@ void test_unlink(void) char tmp_path_pattern[] = TMP_DIR_PATTERN; const char *output_dir; struct fs_handle *handles[handles_to_open]; - struct fs_handle *new_handle; + struct fs_handle *new_handle = NULL; char *file_path; char *unlinked_file_path; char *unlinked_file_path_suffix; @@ -698,7 +700,8 @@ void test_unlink(void) /* Open two handles to the same file. */ ret = open_same_file(tracker, file_path, handles_to_open, handles); - ok(!ret, "Successfully %i handles to %s", handles_to_open); + ok(!ret, "Successfully opened %i handles to %s", handles_to_open, + file_path); if (ret) { return; }