If dir_index feature is enabled on ext3/4, the first entry may not be ".". So fix to compare "." or ".." to the first entry.
Reported-by: DAN LI <[email protected]> Signed-off-by: Wanlong Gao <[email protected]> --- testcases/kernel/syscalls/getdents/getdents01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/getdents/getdents01.c b/testcases/kernel/syscalls/getdents/getdents01.c index fdfb1a0..10cdd55 100644 --- a/testcases/kernel/syscalls/getdents/getdents01.c +++ b/testcases/kernel/syscalls/getdents/getdents01.c @@ -107,8 +107,8 @@ int main(int ac, char **av) else d_name = dirp->d_name; - if (strcmp(d_name, ".")) - tst_resm(TFAIL, "First entry is not '.'"); + if (strcmp(d_name, ".") && strcmp(d_name, "..")) + tst_resm(TINFO, "First entry is not '.' or '..'"); else tst_resm(TPASS, "call succeeded"); -- 1.8.2.242.g8617715 ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
