X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_fd_tracker.c;h=7c818b94bd2fb6cee2749016f89fc902f4278cce;hb=674c3e2c8477aafe7b2145861ad83dd041d59018;hp=cb192ff80019d95b1932502c501f4882e9fbb533;hpb=f6bef9660a264ebeb2a00e80bf48bec41fb47c1a;p=lttng-tools.git diff --git a/tests/unit/test_fd_tracker.c b/tests/unit/test_fd_tracker.c index cb192ff80..7c818b94b 100644 --- a/tests/unit/test_fd_tracker.c +++ b/tests/unit/test_fd_tracker.c @@ -54,6 +54,7 @@ const char file_contents[] = "Bacon ipsum dolor amet jerky drumstick sirloin " "Landjaeger tri-tip salami leberkas ball tip, ham hock chuck sausage " "flank jerky cupim. Pig bacon chuck pancetta andouille."; +static void get_temporary_directories(char **_test_directory, char **_unlink_directory) { int ret; @@ -76,6 +77,7 @@ void get_temporary_directories(char **_test_directory, char **_unlink_directory) } } +static int fd_count(void) { DIR *dir; @@ -327,7 +329,7 @@ int close_pipes(void *data, int *fds) /* * Validate that the tracker enforces the open file descriptor limit - * when unsuspendable file descritptors are being opened. + * when unsuspendable file descriptors are being opened. */ static void test_unsuspendable_limit(void) @@ -347,7 +349,7 @@ void test_unsuspendable_limit(void) ret = fd_tracker_open_unsuspendable_fd(tracker, fds, NULL, TRACKER_FD_LIMIT, open_pipes, NULL); - ok(ret == 0, "File descriptor tracker allowed the user to meet its limit with unsuspendable file descritptors (%d)", + ok(ret == 0, "File descriptor tracker allowed the user to meet its limit with unsuspendable file descriptors (%d)", TRACKER_FD_LIMIT); ret = fd_tracker_open_unsuspendable_fd(tracker, &out_fd, @@ -891,15 +893,15 @@ int main(int argc, char **argv) test_unsuspendable_duplicate(); diag("Unsuspendable - closing an untracked file descriptor"); test_unsuspendable_close_untracked(); - diag("Unsuspendable - check that file descritptor limit is enforced"); + diag("Unsuspendable - check that file descriptor limit is enforced"); test_unsuspendable_limit(); - diag("Suspendable - check that file descritptor limit is enforced"); + diag("Suspendable - check that file descriptor limit is enforced"); test_suspendable_limit(); diag("Suspendable - restoration test"); test_suspendable_restore(); - diag("Mixed - check that file descritptor limit is enforced"); + diag("Mixed - check that file descriptor limit is enforced"); test_mixed_limit(); diag("Suspendable - Unlinking test");