From: Xiao Yang Date: Tue, 11 Dec 2018 06:36:17 +0000 (+0800) Subject: generic/062, 520: Don't remove lost+found during cleanup X-Git-Tag: v2022.05.01~1312 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=2c97b8691d05aaded0139b1b06667d005123abad generic/062, 520: Don't remove lost+found during cleanup On older e2fsprogs, fsck command will check lost+found for extX, so that it will get error if lost+found has been removed during cleanup. For example: ---------------------------------------------------------- e2fsck 1.41.12 (17-May-2010) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity /lost+found not found. Create? no ... ---------------------------------------------------------- Signed-off-by: Xiao Yang Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/tests/generic/062 b/tests/generic/062 index b6e28e0f..3fef02e8 100755 --- a/tests/generic/062 +++ b/tests/generic/062 @@ -176,7 +176,7 @@ echo "*** backup everything" _backup $tmp.backup1 echo "*** clear out the scratch device" -rm -fr $SCRATCH_MNT/* +rm -rf $(find $SCRATCH_MNT/* | grep -v "lost+found") echo "AFTER REMOVE" >>$seqres.full getfattr -L -R -m '.' $SCRATCH_MNT >>$seqres.full diff --git a/tests/generic/520 b/tests/generic/520 index 4058262b..167d7077 100755 --- a/tests/generic/520 +++ b/tests/generic/520 @@ -57,7 +57,7 @@ after="" clean_dir() { _mount_flakey - rm -rf $SCRATCH_MNT/* + rm -rf $(find $SCRATCH_MNT/* | grep -v "lost+found") sync _unmount_flakey }