From: "Theodore Ts'o" <tytso@mit.edu>
To: fstests@vger.kernel.org
Cc: Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH 3/3] generic: filter out lost+found when running "ls $SCRATCH_MNT"
Date: Sun, 5 Feb 2017 01:53:36 -0500 [thread overview]
Message-ID: <20170205065336.14994-3-tytso@mit.edu> (raw)
In-Reply-To: <20170205065336.14994-1-tytso@mit.edu>
The generic/052 and generic/054 tests run ls on the root directory,
and on ext4 we have a lost+found directory which is not in the golden
output.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
common/filter | 5 +++++
tests/generic/052 | 2 +-
tests/generic/054 | 4 ++--
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/common/filter b/common/filter
index e39ac0e2..43281599 100644
--- a/common/filter
+++ b/common/filter
@@ -401,5 +401,10 @@ _filter_mknod()
sed -e "s/mknod: [\`']\(.*\)': File exists/mknod: \1: File exists/"
}
+_filter_lostfound()
+{
+ sed -e '/^lost+found$/d'
+}
+
# make sure this script returns success
/bin/true
diff --git a/tests/generic/052 b/tests/generic/052
index 74cf5b62..f7cdd09c 100755
--- a/tests/generic/052
+++ b/tests/generic/052
@@ -82,7 +82,7 @@ _scratch_mount $mnt >>$seqres.full 2>&1 \
|| _fail "mount failed: $mnt $MOUNT_OPTIONS"
echo "ls SCRATCH_MNT"
-ls $SCRATCH_MNT
+ls $SCRATCH_MNT | _filter_lostfound
echo "unmount"
_scratch_unmount
diff --git a/tests/generic/054 b/tests/generic/054
index 238741c1..8375e574 100755
--- a/tests/generic/054
+++ b/tests/generic/054
@@ -102,7 +102,7 @@ for s in sync nosync ; do
# check before on what FS should look like
_echofull "ls SCRATCH_MNT"
- ls $SCRATCH_MNT
+ ls $SCRATCH_MNT | _filter_lostfound
_echofull "godown"
src/godown -v -f $SCRATCH_MNT >> $seqres.full
@@ -120,7 +120,7 @@ for s in sync nosync ; do
# check on what FS looks like after log recovery
_echofull "ls SCRATCH_MNT"
- ls $SCRATCH_MNT
+ ls $SCRATCH_MNT | _filter_lostfound
_echofull "unmount"
_scratch_unmount
--
2.11.0.rc0.7.gbe5a750
next prev parent reply other threads:[~2017-02-05 6:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-05 6:53 [PATCH 1/3] generic: honor the FSSTRESS_AVOID environment variable Theodore Ts'o
2017-02-05 6:53 ` [PATCH 2/3] common/log: add ext4 support for log state probing Theodore Ts'o
2017-02-05 6:53 ` Theodore Ts'o [this message]
2017-02-05 8:02 ` [PATCH 1/3] generic: honor the FSSTRESS_AVOID environment variable Amir Goldstein
2017-02-05 20:09 ` Theodore Ts'o
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=20170205065336.14994-3-tytso@mit.edu \
--to=tytso@mit.edu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox