On Fri, Apr 28, 2017 at 8:50 AM, Eryu Guan <eguan@xxxxxxxxxx> wrote: > On Fri, Apr 28, 2017 at 08:45:22AM +0300, Amir Goldstein wrote: >> On Fri, Apr 28, 2017 at 8:36 AM, Eryu Guan <eguan@xxxxxxxxxx> wrote: >> > On Thu, Apr 27, 2017 at 06:09:31PM +0300, Amir Goldstein wrote: >> >> Change test to output golden silence on success. >> > >> > Some words on why this change is needed would be good. >> > >> >> >> >> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> >> >> --- >> >> tests/overlay/017 | 4 +++- >> >> tests/overlay/017.out | 7 +------ >> >> 2 files changed, 4 insertions(+), 7 deletions(-) >> >> >> >> diff --git a/tests/overlay/017 b/tests/overlay/017 >> >> index 5ca3040..d6ba2ae 100755 >> >> --- a/tests/overlay/017 >> >> +++ b/tests/overlay/017 >> >> @@ -89,11 +89,13 @@ done >> >> >> >> # find by inode number - expect to find file by inode number >> >> cat $tmp.before | while read ino f; do >> >> - find $f -inum $ino -maxdepth 0 | _filter_scratch >> >> + find $SCRATCH_MNT/ -inum $ino -maxdepth 1 | grep -q $f || \ >> >> + echo "$f not found by ino $ino" >> > >> > Hmm, if I run this find command manually, I got warning about -maxdepth >> > position. >> > >> > # find `pwd` -inum 3932421 -maxdepth 1 >> > find: warning: you have specified the -maxdepth option after a non-option argument -inum, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. >> > >> > /root/xfstests/check >> > >> > Move -maxdepth option just after find path works fine >> > >> > # find `pwd` -maxdepth 1 -inum 3932421 >> > /root/xfstests/check >> > >> > But I'm not sure why I didn't see this warning by running overlay/017.. >> >> man find... >> >> "The default behavior corresponds to -warn if standard input is a tty, >> and to -nowarn otherwise." > > That explains, thanks! > In your setup does strace find `pwd` -maxdepth 1 -inum 3932421 show newfstatat for each inode? It should be doing stat only for dirs according to the code and Enabled features of find --version. Not sure why it does newfstatat for every inode on my kvm machine... Amir. -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html