All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: fstests@vger.kernel.org
Cc: Xiao Yang <yangx.jy@cn.fujitsu.com>
Subject: [PATCH] generic/062, 520: Don't remove lost+found during cleanup
Date: Tue, 11 Dec 2018 14:36:17 +0800	[thread overview]
Message-ID: <1544510177-30609-1-git-send-email-yangx.jy@cn.fujitsu.com> (raw)

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 <yangx.jy@cn.fujitsu.com>
---
 tests/generic/062 |    2 +-
 tests/generic/520 |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/generic/062 b/tests/generic/062
index b6e28e0..3fef02e 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 4058262..167d707 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
 }
-- 
1.7.1

                 reply	other threads:[~2018-12-11  6:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1544510177-30609-1-git-send-email-yangx.jy@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.