]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/030: filter out repeated lines from .out files
authorEryu Guan <eguan@redhat.com>
Tue, 5 Apr 2016 01:48:16 +0000 (11:48 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 5 Apr 2016 01:48:16 +0000 (11:48 +1000)
Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
more lines to .out file to match the output from XFS with reflink
support, but it broke test on older XFS.

Dave explained the reason and pointed out the correct way to fix it, so
I just quote Dave's mail here:

"The problem here is that reflink triggers a change in the initial
population of the AGFL - from 4 blocks to 6 blocks, and so repair warns
6 times instead of 4. After filtering, that gives 6 indentical output
lines instead of 4.

Doing something as simple as collapsing repeated identical lines (e.g
filtering through uniq) will work for all filesystem formats and any
future changes that modify the initial AGFL population."

Suggested-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/xfs/030
tests/xfs/030.out.irix
tests/xfs/030.out.linux

index 33c906c919d413f248ca2530f3b018966ae3a333..5c99d9edadb24784b44dde12d570e8680d7cf37f 100755 (executable)
@@ -55,7 +55,7 @@ _check_ag()
        for structure in 'sb 0' 'agf 0' 'agi 0' 'agfl 0'
        do
                echo "Corrupting $structure - setting bits to $1"
-               _check_repair $1 "$structure" |
+               _check_repair $1 "$structure" | uniq |
                        sed -e '/^error following ag 0 unlinked list$/d' \
                            -e '/^bad agbno AGBNO for finobt/d' \
                            -e '/^bad agbno AGBNO for rmapbt/d' \
index 6378c73f397d0583448549204690098d57d89da3..56adfd052b03ee8fd906aba687e177850c20a227 100644 (file)
@@ -262,9 +262,6 @@ Wrote X.XXKb (value 0xffffffff)
 Phase 1 - find and verify superblock...
 Phase 2 - zero log...
         - scan filesystem freespace and inode maps...
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
 bad agbno AGBNO in agfl, agno 0
         - found root inode chunk
 Phase 3 - for each AG...
index 14b9b3552c3ef8c6418095b5b06eb9e83e206161..722cabf43c5d6ae8160ee5ce7db8643fc79b6d71 100644 (file)
@@ -227,11 +227,6 @@ Phase 1 - find and verify superblock...
 Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
 bad agbno AGBNO in agfl, agno 0
         - found root inode chunk
 Phase 3 - for each AG...