On Thursday 04 April 2013 21:36:37 Wanlong Gao wrote:
> --- 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");

this test isn't really useful after your change.  you've basically validated 
that the a valid fd and a large enough buffer was passed to the kernel and 
that's it.

you should have it walk the results to try and find an "." and ".." entry.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
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