From: Theodore Ts'o Date: Sun, 5 Feb 2017 06:53:36 +0000 (-0500) Subject: generic/052,4: filter out lost+found when running "ls $SCRATCH_MNT" X-Git-Tag: v2022.05.01~2181 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c7320b4cacf6c2446f8bba84b88cb4d3b9097c58;p=users%2Fhch%2Fxfstests-dev.git generic/052,4: filter out lost+found when running "ls $SCRATCH_MNT" 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 Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/filter b/common/filter index e39ac0e29..43281599d 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 74cf5b62b..f7cdd09c1 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 238741c18..8375e574d 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