Yes, you are correct. Merged after testing.

Regards--
Subrata

On Tue, 2008-10-21 at 16:20 +0530, suzuki wrote: 
> Hi,
> 
> The current fork09 test case breaks if there is an FD (with a higher 
> number) opened for the testcase.
> 
> For example:
> sh # exec 9>/dev/null
> sh # ls -l /proc/self/fd
> total 0
> lrwx------ 1 root root 64 2008-10-21 21:53 0 -> /dev/pts/0
> lrwx------ 1 root root 64 2008-10-21 21:53 1 -> /dev/pts/0
> lrwx------ 1 root root 64 2008-10-21 21:53 2 -> /dev/pts/0
> lr-x------ 1 root root 64 2008-10-21 21:53 3 -> /proc/32080/fd
> l-wx------ 1 root root 64 2008-10-21 21:53 9 -> /dev/null
> sh # ./fork09
> fork09      0  INFO  :  OPEN_MAX is 1024
> fork09      0  INFO  :  first file descriptor is 3
> fork09      1  BROK  :  Parent: cannot open file 1023 file1023.32081 
> errno = 24
> fork09      0  WARN  :  tst_rmdir(): rmobj(/tmp/forw5Dek4) failed: 
> rmdir(/tmp/forw5Dek4) failed; errno=39: Directory not empty
> 
> 
> This would fail as the test is not able to detect the fact that it has 
> already opened 1024 files ! This situation is quite possible in an 
> automated environment where people could run the LTP tests from.
> 
> sh # ls -l /proc/self/fd
> total 0
> lrwx------ 1 root root 64 2008-10-21 21:54 0 -> /dev/pts/0
> lrwx------ 1 root root 64 2008-10-21 21:54 1 -> /dev/pts/0
> lrwx------ 1 root root 64 2008-10-21 21:54 2 -> /dev/pts/0
> lr-x------ 1 root root 64 2008-10-21 21:54 3 -> /proc/32138/fd
> l-wx------ 1 root root 64 2008-10-21 21:54 9 -> /dev/null
> 
> sh # ./fork09
> fork09      0  INFO  :  OPEN_MAX is 1024
> fork09      0  INFO  :  first file descriptor is 3
> fork09      0  INFO  :  Parent reporting 1022 files open
> fork09      0  INFO  :  Child opened new file #1022
> fork09      1  PASS  :  test 1 PASSED
> 
> 
> The patch attached fixes the issue. Please apply ! This will make the 
> test more robust and free from assumptions ! ;)
> 
> Signed-off-by: Suzuki K P <[EMAIL PROTECTED]>
> 
> 
> 
> Thanks
> 
> Suzuki
> 
> 
> Thanks
> 
> Suzuki
> 
> 
> 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to