All of lore.kernel.org
 help / color / mirror / Atom feed
From: Caspar Zhang <caspar@casparzhang.com>
To: Eryu Guan <eguan@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v2] dup2/dup205: close all fds before tst_rmdir()
Date: Tue, 25 Jun 2013 00:03:09 +0800	[thread overview]
Message-ID: <51C86DBD.7060205@casparzhang.com> (raw)
In-Reply-To: <1372088983-29843-1-git-send-email-eguan@redhat.com>

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

  reply	other threads:[~2013-06-24 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-06-24 16:07   ` chrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C86DBD.7060205@casparzhang.com \
    --to=caspar@casparzhang.com \
    --cc=eguan@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.