On 2017/12/28 20:11, Amir Goldstein Wrote: > On Thu, Dec 28, 2017 at 1:49 PM, zhangyi (F) <yi.zhang@xxxxxxxxxx> wrote: >> Add fsck.overlay test case to test it how to deal with orphan/valid >> whiteouts in underlying directories of overlayfs. >> >> Signed-off-by: zhangyi (F) <yi.zhang@xxxxxxxxxx> > > Very nice! > Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> > > minor suggestions below > Thanks a lot for your suggestions! [..] >> +# Create test directories >> +lowerdir=$OVL_BASE_SCRATCH_MNT/lower >> +lowerdir2=$OVL_BASE_SCRATCH_MNT/lower2 >> +upperdir=$OVL_BASE_SCRATCH_MNT/upper >> +workdir=$OVL_BASE_SCRATCH_MNT/workdir >> + >> +mkdir -p $lowerdir $lowerdir2 $upperdir $workdir $workdir > > Would be nice to pack these mkdir after rm -rf as make_dirs helper > to run before every test case, instead of mkdir once and rm -rf after each test. > It looks better, will change it for all 3 test cases. [..] >> +# Test orphan whiteout whose parent path is not an merged directory, >> +# should remove >> +echo "+ Orphan whiteout(3)" >> +mkdir $lowerdir2/testdir1 $lowerdir2/testdir2 $lowerdir2/testdir3 >> +touch $lowerdir2/testdir1/foo $lowerdir2/testdir2/foo $lowerdir2/testdir3/foo >> +mkdir $upperdir/testdir1 $upperdir/testdir2 $upperdir/testdir3 > > How about mkdir $upperdir/testdir4 (case of parent is a pure upper dir) > Yes, it's perfect, will add. Thanks, Yi. -- 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