dup2/dup205: close all fds before tst_rmdir()
PATCH 1/1 dup2/dup205: close all fds before tst_rmdir()
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
--- testcases/kernel/syscalls/dup2/dup205.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/dup2/dup205.c +2 -2
@@ -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 {
Signature · 13 lines
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
Quoted 2 lines · On Monday 24 June 2013 11:12:07 Eryu Guan wrote:
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.
"NFS silly rename" duplicated by accident ?
code looks fine to me
-mike
------------------------------------------------------------------------------
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
Quoted 5 lines · Mike Frysinger
Quoted 2 lines · On Monday 24 June 2013 11:12:07 Eryu Guan wrote:
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."NFS silly rename" duplicated by accident ?
Oh, forgot to remove one "NFS silly rename" when editing commit message.. Will send v2. Thanks for the review!
Eryu Guan
Quoted 3 lines
code looks fine to me
-mike
------------------------------------------------------------------------------
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
PATCH v2 1/1 dup2/dup205: close all fds before tst_rmdir()
In reply to Eryu GuanClose all open fds before calling tst_rmdir() to avoid TWARN caused by NFS silly rename when removing temp dir.
dup205 0 TWARN : tst_rmdir: rmobj(/mnt/nfs/dupbA5J5i) failed: unlink(/mnt/nfs/dupbA5J5i/.nfs0000000000f4805b00000005) failed; errno=16: Device or resource busy
---
v2: Correct commit message.
testcases/kernel/syscalls/dup2/dup205.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/dup2/dup205.c +2 -2
@@ -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 {
Signature · 13 lines
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
Quoted 6 lines · Eryu Guan
Close all open fds before calling
tst_rmdir()to avoid TWARN caused by NFS silly rename when removing temp dir.dup205 0 TWARN :
tst_rmdir: rmobj(/mnt/nfs/dupbA5J5i) failed: unlink(/mnt/nfs/dupbA5J5i/.nfs0000000000f4805b00000005) failed; errno=16: Device or resource busySigned-off-by Eryu Guan <[email protected]>
Looks good to me.
Quoted 12 lines
---
v2: Correct commit message.testcases/kernel/syscalls/dup2/dup205.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)testcases/kernel/syscalls/dup2/dup205.c +0
-0
testcases/kernel/syscalls/dup2/dup205.c int main(int ac, char *av[]) · line 119
Quoted 10 lines
testcases/kernel/syscalls/dup2/dup205.c +2
-2@@ -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 {
------------------------------------------------------------------------------
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
Hi!
Pushed, thanks.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ 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