On Sunday, September 3, 2017 3:32:11 PM IST Amir Goldstein wrote: > On Sun, Sep 3, 2017 at 11:40 AM, Chandan Rajendra > <chandan@xxxxxxxxxxxxxxxxxx> wrote: > > This commit adds a test to verify constant d_ino feature. The following > > scenarios are checked, > > - Parent's (i.e. "..") d_ino must always be calculated because a pure > > dir can be residing inside a merged dir. > > - d_ino for "." must always be calculated because the present directory > > can have a copy-up origin. > > - Verify d_ino of '.' and '..' before and after dir becomes > > impure. While at it also verify if trusted.overlay.impure xattr is > > set/reset appropriately and invalidation of readdir cache. > > - Verify copied up file's (inside a impure dir) d_ino. > > - Verify d_ino values corresponding to "." and ".." entries of a pure > > lower dir. > > - Verify d_ino of ".." entry of a merged dir. > > - Verify pure lower residing in dir which has another lower layer > > > > Signed-off-by: Chandan Rajendra <chandan@xxxxxxxxxxxxxxxxxx> > > --- > > Changelog: > > v3->v4: > > 1. Fix error handling as suggested by Amir. > > 2. Use sane variable names for "Verify pure lower residing in dir which has > > another lower layer" test. > > > ... > > +# Verify invalidation of readdir cache > > +$here/src/t_dir_type $impure_dir $test_file_st_ino > > +[[ $? != 0 ]] || echo "Directory's readdir cache has stale entries" > > + > > +$GETFATTR_PROG --absolute-names -n 'trusted.overlay.impure' \ > > + $upperdir/test_dir/impure_dir >>$seqres.full 2>&1 > > +[[ $? == 0 ]] && echo "Pure directory has impure xattr" > > + > > Sorry, I overlooked a few things in v3: > 1. Why did I say use && echo here I'm not sure. looking again feels > much better to conform to all other tests Right. I will fix it up. > 2. I wanted to write and forgot that you need _require_attrs and > include common/attr I will add these lines. > 3. This test is using double brackets [[ == comparison all around, > which apparently > saves the need to surround left side in quotes "". This seems to > be recommended > so I have no objection. Just pointing out to Eryu in case he has > reservations. -- chandan -- 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