]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/186: fix test for crc=0, ftype=1
authorEric Sandeen <sandeen@redhat.com>
Fri, 17 Jun 2016 17:54:43 +0000 (12:54 -0500)
committerEryu Guan <eguan@redhat.com>
Tue, 21 Jun 2016 05:59:11 +0000 (13:59 +0800)
Test 186 won't run when crcs are enabled, because
attrv1 is not allowed with crc=1.

However, ftype is still allowed with crc=0, so
this creates v3 directories, and xfs_db prints
them as such (along with the filetype), which
breaks the test output.

We can filter & replace to fix up the test in
this case.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/xfs/186

index 8e18975d9d39932c7e24c96989712a132c1a7e4a..9b64d6c957d13e60e5f3ac6cbe74b34338977219 100755 (executable)
@@ -76,12 +76,17 @@ _rmv_eas()
        done
 }
 
+# If filetype is available (-n ftype=1) will get v3 dirs;
+# just filter/replace to make this look the same as if we
+# had v2 dirs, as we are not interested in this info.
 _filter_inode()
 {
        tee -a $seqres.full | \
                sed -e "s/core.forkoff/forkoff/g" | \
-               egrep '^u.sfdir2|^a.sfattr|forkoff' | \
-               egrep -v 'inumber|parent'
+               egrep '^u.sfdir2|^u.sfdir3|^a.sfattr|forkoff' | \
+               egrep -v 'inumber|parent' | \
+               sed -e s/sfdir3/sfdir2/g | \
+               grep -v filetype
 }
 
 _filter_version()