Fix: tests: missing argument in test output print statement
[lttng-tools.git] / tests / unit / test_fd_tracker.c
index 8c0fc5ffe90a4dcc8b5052adf0dd99c7743122af..94f54769d18b4f6c1fbf4c591d3c71ffe1d3598b 100644 (file)
@@ -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;
        }
This page took 0.023368 seconds and 4 git commands to generate.