generic/052,4: filter out lost+found when running "ls $SCRATCH_MNT"
authorTheodore Ts'o <tytso@mit.edu>
Sun, 5 Feb 2017 06:53:36 +0000 (01:53 -0500)
committerEryu Guan <eguan@redhat.com>
Mon, 6 Feb 2017 06:15:19 +0000 (14:15 +0800)
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>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/filter
tests/generic/052
tests/generic/054

index e39ac0e298006612c54eb8e8c92e07ebef84645b..43281599d72956abcca442c4362d8f712fdc65a9 100644 (file)
@@ -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
index 74cf5b62bec9c06423f1db72576b940207d07ae8..f7cdd09c16e2b5941539010d955286630460d2f8 100755 (executable)
@@ -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
index 238741c189c02d28b955261db0e47127f2dc0fa5..8375e574db24ca0c97b2124538c52f0e8c262c18 100755 (executable)
@@ -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