* [LTP] [PATCH] readdir01: Add closedir before test return
@ 2022-03-19 7:44 Zhao Gongyi via ltp
2022-03-21 15:21 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Zhao Gongyi via ltp @ 2022-03-19 7:44 UTC (permalink / raw)
To: ltp
If we run the test with option -i 10000, and the ulimit of
open files little than 10000, the test will fail and report:
readdir01.c:48: TBROK: opendir(.) failed: EMFILE (24).
Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
testcases/kernel/syscalls/readdir/readdir01.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testcases/kernel/syscalls/readdir/readdir01.c b/testcases/kernel/syscalls/readdir/readdir01.c
index e90f50c80..d200145ea 100644
--- a/testcases/kernel/syscalls/readdir/readdir01.c
+++ b/testcases/kernel/syscalls/readdir/readdir01.c
@@ -59,6 +59,8 @@ static void verify_readdir(void)
tst_res(TFAIL, "found %s files than were created, created: %d, found: %d",
cnt > nfiles ? "more" : "less", nfiles, cnt);
}
+
+ SAFE_CLOSEDIR(test_dir);
}
static struct tst_test test = {
--
2.17.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] readdir01: Add closedir before test return
2022-03-19 7:44 [LTP] [PATCH] readdir01: Add closedir before test return Zhao Gongyi via ltp
@ 2022-03-21 15:21 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2022-03-21 15:21 UTC (permalink / raw)
To: Zhao Gongyi; +Cc: ltp
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-21 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-19 7:44 [LTP] [PATCH] readdir01: Add closedir before test return Zhao Gongyi via ltp
2022-03-21 15:21 ` Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.