public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] fcntl/fcntl16: close fd before unlink
@ 2013-10-31  8:41 Stanislav Kholmanskikh
  2013-10-31  8:57 ` Wanlong Gao
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Kholmanskikh @ 2013-10-31  8:41 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

This testcase fails on NFS but doesn't remove its
working directory on exit (NFS silly rename):

TWARN  :  tst_rmdir: rmobj(/mnt/fcn1GHJ8g) failed: unlink(/mnt/fcn1GHJ8g/.nfs0000000000000c4200000001) failed; errno=16: Device or resource busy

Fixed.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
 testcases/kernel/syscalls/fcntl/fcntl16.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/testcases/kernel/syscalls/fcntl/fcntl16.c b/testcases/kernel/syscalls/fcntl/fcntl16.c
index 8bdb6b5..12696a8 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl16.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl16.c
@@ -476,6 +476,7 @@ int run_test(int file_flag, int file_mode, int start, int end)
 			tst_resm(TFAIL, "First parent lock failed");
 			tst_resm(TFAIL, "Test case %d, errno = %d", test + 1,
 				 errno);
+			close(fd);
 			unlink(tmpname);
 			return 1;
 		}
@@ -489,6 +490,7 @@ int run_test(int file_flag, int file_mode, int start, int end)
 				tst_resm(TFAIL, "Second parent lock failed");
 				tst_resm(TFAIL, "Test case %d, errno = %d",
 					 test + 1, errno);
+				close(fd);
 				unlink(tmpname);
 				return 1;
 			}
@@ -559,6 +561,7 @@ int run_test(int file_flag, int file_mode, int start, int end)
 			tst_resm(TFAIL, "Third parent lock failed");
 			tst_resm(TFAIL, "Test case %d, errno = %d",
 				 test + 1, errno);
+			close(fd);
 			unlink(tmpname);
 			return 1;
 		}
@@ -572,6 +575,7 @@ int run_test(int file_flag, int file_mode, int start, int end)
 				tst_resm(TINFO, "Fourth parent lock failed");
 				tst_resm(TINFO, "Test case %d, errno = %d",
 					 test + 1, errno);
+				close(fd);
 				unlink(tmpname);
 				return 1;
 			}
-- 
1.7.1


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] fcntl/fcntl16: close fd before unlink
  2013-10-31  8:41 [LTP] [PATCH] fcntl/fcntl16: close fd before unlink Stanislav Kholmanskikh
@ 2013-10-31  8:57 ` Wanlong Gao
  0 siblings, 0 replies; 2+ messages in thread
From: Wanlong Gao @ 2013-10-31  8:57 UTC (permalink / raw)
  To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, ltp-list

On 10/31/2013 04:41 PM, Stanislav Kholmanskikh wrote:
> This testcase fails on NFS but doesn't remove its
> working directory on exit (NFS silly rename):
> 
> TWARN  :  tst_rmdir: rmobj(/mnt/fcn1GHJ8g) failed: unlink(/mnt/fcn1GHJ8g/.nfs0000000000000c4200000001) failed; errno=16: Device or resource busy
> 
> Fixed.
> 
> Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
> ---
>  testcases/kernel/syscalls/fcntl/fcntl16.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)


Applied, thank you.

Wanlong Gao


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-31  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-31  8:41 [LTP] [PATCH] fcntl/fcntl16: close fd before unlink Stanislav Kholmanskikh
2013-10-31  8:57 ` Wanlong Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox