Close all open fds before calling tst_rmdir() to avoid TWARN caused by NFS silly rename when removing temp dir caused by NFS silly rename.
dup205 0 TWARN : tst_rmdir: rmobj(/mnt/nfs/dupbA5J5i) failed: unlink(/mnt/nfs/dupbA5J5i/.nfs0000000000f4805b00000005) failed; errno=16: Device or resource busy Signed-off-by: Eryu Guan <[email protected]> --- testcases/kernel/syscalls/dup2/dup205.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/dup2/dup205.c b/testcases/kernel/syscalls/dup2/dup205.c index c728fcc..0528beb 100644 --- a/testcases/kernel/syscalls/dup2/dup205.c +++ b/testcases/kernel/syscalls/dup2/dup205.c @@ -112,8 +112,8 @@ int main(int ac, char *av[]) } } unlink(pfilname); - if (ifile > 0) - close(fildes[ifile - 1]); + for (ifile = fildes[0]; ifile < min + 10; ifile++) + close(fildes[ifile]); if (local_flag == PASSED) { tst_resm(TPASS, "Test passed."); } else { -- 1.8.3.1 ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
