V4:
- update magic number of ext2, ext3, ext4
- return 0 if subdir limit not supported by filesystem
- drop modification of testcase rename11, renameat01

V3:
http://sourceforge.net/p/ltp/mailman/message/33271752/
- introduce more filesystem magic number
- use internal lib functions to detect fs type and fs name, thanks for
  Cyril Hrubis's suggestion
- handle return value of tst_fs_fill_subdirs() in testcase rename11
- use TCONF flag instead of TPASS in testcase renameat01
- update modification which forgot to add to the commit last time :-(

V2:
http://sourceforge.net/p/ltp/mailman/message/33234898/
- check more filesystems which have subdir limit
- save these fs in an array instead of swith..case

V1:
http://sourceforge.net/p/ltp/mailman/message/33234484/
Function tst_fs_fill_subdirs() and related testcase try to reach the subdir
limitation by making subdirectories in one directory. But the number of the
limitation depends on the type of filesystems.  For current kernel, subdir
limit is not availiable for all filesystems (availiable for ext2, ext3,
minix, sysv etc). If the testcase runs on some other filesystems, like ramfs,
tmpfs, it will always fail.

Although tst_fs_fill_subdirs() will give an information indicates that the
limit is not reached, but form the view of point of testcase, we cannot
tell whether the failure comes from the syscall. Especially, when test runs
in /tmp, if /tmp is mounted as ext2/ext3, test passes; if /tmp is mounted
as tmpfs, test fails.

So before filling-subdirs, we check the type of the current filesystem. If
it is not ext2 or ext3, give an information tells that the filesystem has
not subdir limit. And the related testcase will pass because it is useless
to test subdir limit.

thanks,
Sheng Yong

Sheng Yong (2):
  lib: tst_fs_type: add new filesystem types
  lib/tst_fs_link_count.c: check fs type and do not fill subdir if no
    limit

 doc/test-writing-guidelines.txt |  5 ++++-
 include/tst_fs_type.h           | 16 ++++++++++++++++
 lib/tst_fs_link_count.c         | 34 ++++++++++++++++++++++++++++++++--
 lib/tst_fs_type.c               | 24 ++++++++++++++++++++++++
 4 files changed, 76 insertions(+), 3 deletions(-)

-- 
1.8.3.4


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to