aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSheng Yong <shengyong1@huawei.com>2015-02-02 08:47:13 +0000
committerCyril Hrubis <chrubis@suse.cz>2015-02-03 17:27:47 +0100
commit4584f91dfdeef0685e189b046d736617e2af260b (patch)
tree639f0faea984fcb7050f5fe587b5f62e88120b4d /doc
parent465a3d88fb283541f59c731b5b22c6549089c79b (diff)
lib/tst_fs_link_count.c: check fs type and do not fill subdir if no limit
This number of max sub-directories depends on the filesystem. For current kernel, subdir limit is not availiable for all filesystems (availiable for ext2, ext3, minix, sysv etc). So we check the fs type in tst_fs_fill_subdirs(), and only try to reach the limit on filesystems which have subdir limit. Otherwise, give an information tells that subdir limit is not avaliable, and returns 0 directly. Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/test-writing-guidelines.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
index 4d70a1b15..b220e4352 100644
--- a/doc/test-writing-guidelines.txt
+++ b/doc/test-writing-guidelines.txt
@@ -950,7 +950,10 @@ int tst_fs_fill_subdirs(void (*cleanup)(void), const char *dir);
Try to get maximum number of subdirectories in directory.
-NOTE: This number depends on the filesystem 'dir' is on.
+NOTE: This number depends on the filesystem 'dir' is on. For current kernel,
+subdir limit is not availiable for all filesystems (availiable for ext2, ext3,
+minix, sysv and more). If the test runs on some other filesystems, like ramfs,
+tmpfs, it will not even try to reach the limit and return 0.
This function uses 'mkdir(2)' to create directories in 'dir' until it gets
'EMLINK' or creates 65535 directories. If the limit is hit, the maximum number