Actually, the first entry not always ".", it depends on the
filesystems. For example "dir_index" flag in ext4.

Reported-by: DAN LI <[email protected]>
Signed-off-by: Wanlong Gao <[email protected]>
---
 testcases/kernel/syscalls/getdents/getdents01.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/testcases/kernel/syscalls/getdents/getdents01.c 
b/testcases/kernel/syscalls/getdents/getdents01.c
index fdfb1a0..ff11e1a 100644
--- a/testcases/kernel/syscalls/getdents/getdents01.c
+++ b/testcases/kernel/syscalls/getdents/getdents01.c
@@ -75,8 +75,6 @@ int main(int ac, char **av)
        setup();
 
        for (lc = 0; TEST_LOOPING(lc); lc++) {
-               const char *d_name;
-
                tst_count = 0;
 
                if ((fd = open(".", O_RDONLY)) == -1)
@@ -102,15 +100,7 @@ int main(int ac, char **av)
                        continue;
                }
 
-               if (longsyscall)
-                       d_name = dirp64->d_name;
-               else
-                       d_name = dirp->d_name;
-
-               if (strcmp(d_name, "."))
-                       tst_resm(TFAIL, "First entry is not '.'");
-               else
-                       tst_resm(TPASS, "call succeeded");
+               tst_resm(TPASS, "call succeeded");
 
                if (close(fd) == -1)
                        tst_brkm(TBROK, cleanup, "file close failed");
-- 
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

Reply via email to