All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Miklos Szeredi <mszeredi@suse.cz>, xfs@oss.sgi.com
Subject: Re: [PATCH 2/4] renameat2 syscall: check plain rename
Date: Mon, 14 Apr 2014 12:30:20 +1000	[thread overview]
Message-ID: <20140414023020.GJ27694@dastard> (raw)
In-Reply-To: <1397231517-4641-2-git-send-email-miklos@szeredi.hu>

On Fri, Apr 11, 2014 at 05:51:55PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
> 
> Check with zero flags.  This is what rename(2) and renameat(2) now call, so
> this actually tests the behavior of these syscalls as well.
> 
> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>

Miklos, this test fails on XFS with the following diff:

$ diff -u tests/generic/023.out /home/dave/src/xfstests-dev/results//generic/023.out.bad
--- tests/generic/023.out       2014-04-14 10:44:22.000000000 +1000
+++ /home/dave/src/xfstests-dev/results//generic/023.out.bad    2014-04-14 12:00:23.000000000 +1000
@@ -18,12 +18,12 @@
 samedir  dire/regu -> Not a directory
 samedir  dire/symb -> Not a directory
 samedir  dire/dire -> none/dire.
-samedir  dire/tree -> Directory not empty
+samedir  dire/tree -> File exists
 samedir  tree/none -> none/tree.
 samedir  tree/regu -> Not a directory
 samedir  tree/symb -> Not a directory
 samedir  tree/dire -> none/tree.
-samedir  tree/tree -> Directory not empty
+samedir  tree/tree -> File exists
 crossdir none/none -> No such file or directory
 crossdir none/regu -> No such file or directory
 crossdir none/symb -> No such file or directory
@@ -43,9 +43,9 @@
 crossdir dire/regu -> Not a directory
 crossdir dire/symb -> Not a directory
 crossdir dire/dire -> none/dire.
-crossdir dire/tree -> Directory not empty
+crossdir dire/tree -> File exists
 crossdir tree/none -> none/tree.
 crossdir tree/regu -> Not a directory
 crossdir tree/symb -> Not a directory
 crossdir tree/dire -> none/tree.
-crossdir tree/tree -> Directory not empty
+crossdir tree/tree -> File exists

IOWs, XFS is returning EEXIST rather than ENOTEMPTY for several of
these rename tests. The rename man page says this about the errors:

       ENOTEMPTY or EEXIST
              newpath is a nonempty directory, that is, contains
	      entries other than "." and "..".

Which implies that both errors are valid and so the test should pass
in either case. Can you send a patch to handle these
different-but-valid error returns?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2014-04-14  2:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11 15:51 [PATCH 1/4] renameat2 syscall: add infrastructure Miklos Szeredi
2014-04-11 15:51 ` [PATCH 2/4] renameat2 syscall: check plain rename Miklos Szeredi
2014-04-14  2:30   ` Dave Chinner [this message]
2014-04-16 14:18     ` Christoph Hellwig
2014-04-16 23:03       ` Dave Chinner
2014-04-11 15:51 ` [PATCH 3/4] renameat2 syscall: check noreplace rename Miklos Szeredi
2014-04-11 15:51 ` [PATCH 4/4] renameat2 syscall: check cross rename Miklos Szeredi
2014-04-11 23:23 ` [PATCH 1/4] renameat2 syscall: add infrastructure Dave Chinner

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=20140414023020.GJ27694@dastard \
    --to=david@fromorbit.com \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@suse.cz \
    --cc=xfs@oss.sgi.com \
    /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.