From: Cyril H. <su...@li...> - 2013-05-24 07:23:39
|
The branch, master, has been updated via 7053c3bf279750da4e9e4bb14006fc0edafccd3e (commit) from 04a34ba7fc9bbb6145917f549ff7a6e284e26fcc (commit) - Log ----------------------------------------------------------------- commit 7053c3bf279750da4e9e4bb14006fc0edafccd3e Author: Shuang Qiu <shu...@or...> Date: Fri May 24 11:03:39 2013 +0800 dup07:Close the file before unlink it. When unlink() a file in nfs environment,it will rename the file to a .nfs<xxxxx> file if any process still has that file open.And this file could not be deleted until it is closed.So we always get the following warning which makes testcase "dup07" failed: 0 TWARN : tst_rmdir: rmobj(/mnt/nfsv3/ltp-ZtzSE27611/dupKuEr3H) failed: unlink(/mnt/nfsv3/ltp-ZtzSE27611/dupKuEr3H/.nfs000000000110cb3800000066) failed; errno=16: Device or resource busy Close the created/dup file before unlink() it to fix this issue. Signed-off-by: Shuang Qiu <shu...@or...> Reviewed-by: Jan Stancek <jst...@re...> Signed-off-by: Wanlong Gao <gao...@cn...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/dup/dup07.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/syscalls/dup/dup07.c b/testcases/kernel/syscalls/dup/dup07.c index 03b0ba4..025881f 100644 --- a/testcases/kernel/syscalls/dup/dup07.c +++ b/testcases/kernel/syscalls/dup/dup07.c @@ -77,7 +77,9 @@ int main(int ac, char **av) tst_resm(TPASS, "Passed in read mode."); } + close(duprdo); } + close(rdoret); } unlink(testfile); @@ -97,7 +99,10 @@ int main(int ac, char **av) tst_resm(TPASS, "Passed in write mode."); } + close(dupwro); } + close(wroret); + } unlink(testfile); @@ -117,7 +122,9 @@ int main(int ac, char **av) tst_resm(TPASS, "Passed in read/write mode."); } + close(duprdwr); } + close(rdwret); } unlink(testfile); hooks/post-receive -- ltp |