* [LTP] [PATCH] dup2/dup205: close all fds before tst_rmdir()
@ 2013-06-24 15:12 Eryu Guan
2013-06-24 15:34 ` Mike Frysinger
2013-06-24 15:49 ` [LTP] [PATCH v2] " Eryu Guan
0 siblings, 2 replies; 6+ messages in thread
From: Eryu Guan @ 2013-06-24 15:12 UTC (permalink / raw)
To: ltp-list
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 <eguan@redhat.com>
---
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH] dup2/dup205: close all fds before tst_rmdir()
2013-06-24 15:12 [LTP] [PATCH] dup2/dup205: close all fds before tst_rmdir() Eryu Guan
@ 2013-06-24 15:34 ` Mike Frysinger
2013-06-24 15:42 ` Eryu Guan
2013-06-24 15:49 ` [LTP] [PATCH v2] " Eryu Guan
1 sibling, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2013-06-24 15:34 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1.1: Type: Text/Plain, Size: 266 bytes --]
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
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 184 bytes --]
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH] dup2/dup205: close all fds before tst_rmdir()
2013-06-24 15:34 ` Mike Frysinger
@ 2013-06-24 15:42 ` Eryu Guan
0 siblings, 0 replies; 6+ messages in thread
From: Eryu Guan @ 2013-06-24 15:42 UTC (permalink / raw)
To: Mike Frysinger; +Cc: ltp-list
On Mon, Jun 24, 2013 at 11:34:31AM -0400, Mike Frysinger wrote:
> 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
>
> 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH v2] dup2/dup205: close all fds before tst_rmdir()
2013-06-24 15:12 [LTP] [PATCH] dup2/dup205: close all fds before tst_rmdir() Eryu Guan
2013-06-24 15:34 ` Mike Frysinger
@ 2013-06-24 15:49 ` Eryu Guan
2013-06-24 16:03 ` Caspar Zhang
2013-06-24 16:07 ` chrubis
1 sibling, 2 replies; 6+ messages in thread
From: Eryu Guan @ 2013-06-24 15:49 UTC (permalink / raw)
To: ltp-list
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 busy
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
v2: Correct commit message.
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH v2] dup2/dup205: close all fds before tst_rmdir()
2013-06-24 15:49 ` [LTP] [PATCH v2] " Eryu Guan
@ 2013-06-24 16:03 ` Caspar Zhang
2013-06-24 16:07 ` chrubis
1 sibling, 0 replies; 6+ messages in thread
From: Caspar Zhang @ 2013-06-24 16:03 UTC (permalink / raw)
To: Eryu Guan; +Cc: ltp-list
On 06/24/2013 11:49 PM, Eryu Guan wrote:
> 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 busy
>
> Signed-off-by: Eryu Guan <eguan@redhat.com>
Looks good to me.
Acked-by: Caspar Zhang <caspar@casparzhang.com>
> ---
> v2: Correct commit message.
>
> 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 {
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH v2] dup2/dup205: close all fds before tst_rmdir()
2013-06-24 15:49 ` [LTP] [PATCH v2] " Eryu Guan
2013-06-24 16:03 ` Caspar Zhang
@ 2013-06-24 16:07 ` chrubis
1 sibling, 0 replies; 6+ messages in thread
From: chrubis @ 2013-06-24 16:07 UTC (permalink / raw)
To: Eryu Guan; +Cc: ltp-list
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-06-24 16:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 15:12 [LTP] [PATCH] dup2/dup205: close all fds before tst_rmdir() Eryu Guan
2013-06-24 15:34 ` Mike Frysinger
2013-06-24 15:42 ` Eryu Guan
2013-06-24 15:49 ` [LTP] [PATCH v2] " Eryu Guan
2013-06-24 16:03 ` Caspar Zhang
2013-06-24 16:07 ` chrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.