Do not test EMLINK, if the filesystem has no subdir limit.

Signed-off-by: Sheng Yong <[email protected]>
---
 testcases/kernel/syscalls/rename/rename11.c     | 2 +-
 testcases/kernel/syscalls/renameat/renameat01.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/rename/rename11.c 
b/testcases/kernel/syscalls/rename/rename11.c
index d55c08e..0f39e0b 100644
--- a/testcases/kernel/syscalls/rename/rename11.c
+++ b/testcases/kernel/syscalls/rename/rename11.c
@@ -179,7 +179,7 @@ static void test_erofs(void)
 
 static void test_emlink(void)
 {
-       if (max_subdirs == 0) {
+       if (max_subdirs == 0 || max_subdirs == -1) {
                tst_resm(TCONF, "EMLINK test is not appropriate");
                return;
        }
diff --git a/testcases/kernel/syscalls/renameat/renameat01.c 
b/testcases/kernel/syscalls/renameat/renameat01.c
index bb5e6df..11b82f1 100644
--- a/testcases/kernel/syscalls/renameat/renameat01.c
+++ b/testcases/kernel/syscalls/renameat/renameat01.c
@@ -211,7 +211,8 @@ static void setup(void)
 
 static void renameat_verify(const struct test_case_t *tc)
 {
-       if (tc->exp_errno == EMLINK && max_subdirs == 0) {
+       if (tc->exp_errno == EMLINK &&
+           (max_subdirs == 0 || max_subdirs == -1)) {
                tst_resm(TCONF, "EMLINK test is not appropriate");
                return;
        }
-- 
1.8.3.4


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to