Re: [PATCH 2/4] renameat2 syscall: check plain rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 11, 2014 at 05:51:55PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@xxxxxxx>
> 
> 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@xxxxxxx>

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@xxxxxxxxxxxxx

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




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux