xfs/033: add golden output for CRC enaled filesystems
PATCH 1/1 xfs/033: add golden output for CRC enaled filesystems
From: Dave Chinner <[email protected]>
CRC enabled filesystems emit different errors on corruption. Specifically, inode corruption is picked up much earlier due to verifier failures (e.g. incorrect inode identifier) and so xfs_repair throws errors sufficiently different that filtering cannot hide the differences. Hence simply add a new golden output file and link it appropriately once we know what type of filesystem we are testing.
--- common/filter | 3 + tests/xfs/033 | 10 ++- tests/xfs/033.crc.out.linux | 197 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 207 insertions(+), 3 deletions(-) create mode 100644 tests/xfs/033.crc.out.linux
common/filter +3 -0
@@ -152,6 +152,9 @@ _filter_mkfs() if (/^\s+=\s+sectsz=(\d+)\s+attr=(\d+)/) { print STDERR "sectsz=$1\nattr=$2\n"; } + if (/^\s+=\s+crc=(\d)/) { + print STDERR "crc=$1\n"; + } if (/^data\s+=\s+bsize=(\d+)\s+blocks=(\d+), imaxpct=(\d+)/) { print STDERR "dbsize=$1\ndblocks=$2\nimaxpct=$3\n"; print STDOUT "data = bsize=XXX blocks=XXX, imaxpct=PCT\n";
tests/xfs/033 +7 -3
@@ -45,9 +45,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common/filter . ./common/repair -# link correct .out file -_link_out_file $seq.out $seqfull.out - # nuke the root, rt bitmap, and rt summary inodes # _check_root_inos()
@@ -86,6 +83,13 @@ _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs [ $isize -lt 512 ] && \ _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1 +# link correct .out file +if [ $crc -eq 1 ]; then + _link_out_file $seq.crc.out $seqfull.out +else + _link_out_file $seq.out $seqfull.out +fi + `xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \ sed -e 's/ //g' -e 's/^/export /'`
tests/xfs/033.crc.out.linux new file +197 -0
197 lines not on this page · raw message
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
common/filter _filter_mkfs() · line 157
Quoted 11 lines · Dave Chinner
common/filter +3
-0@@ -152,6 +152,9 @@ _filter_mkfs() if (/^\s+=\s+sectsz=(\d+)\s+attr=(\d+)/) { print STDERR "sectsz=$1\nattr=$2\n"; } + if (/^\s+=\s+crc=(\d)/) { + print STDERR "crc=$1\n"; + }
I think this variable is named way to genericly. And that probably applies to others as well.
I'd suggest at least xfs_feature_crc or similar.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 16 lines · Christoph Hellwig
common/filter _filter_mkfs() · line 157
Quoted 11 lines · Dave Chinner
common/filter +3
-0@@ -152,6 +152,9 @@ _filter_mkfs() if (/^\s+=\s+sectsz=(\d+)\s+attr=(\d+)/) { print STDERR "sectsz=$1\nattr=$2\n"; } + if (/^\s+=\s+crc=(\d)/) { + print STDERR "crc=$1\n"; + }I think this variable is named way to genericly. And that probably applies to others as well.
Quoted 1 line
I'd suggest at least
xfs_feature_crcor similar.
I can't say I like adding that prefix to the mkfs varaibles. I'll change this one to something less generic, but I'm going to ignore the others right now because changing them involves modifying 30+ tests....
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Christoph Hellwig
Reviewed-byQuoted 4 lines · Dave Chinner
I can't say I like adding that prefix to the mkfs varaibles. I'll change this one to something less generic, but I'm going to ignore the others right now because changing them involves modifying 30+ tests....
In that case let's keep the crc one without prefix for now. But I think introducing very generic variables into the environment implicitly is a bad idea and will bite us long term.
Reluctantly:
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · Dave Chinner
I can't say I like adding that prefix to the mkfs varaibles. I'll change this one to something less generic, but I'm going to ignore the others right now because changing them involves modifying 30+ tests....
Quoted 7 lines
In that case let's keep the crc one without prefix for now. But I think introducing very generic variables into the environment implicitly is a bad idea and will bite us long term.
Reluctantly:
Reviewed-by Christoph Hellwig <[email protected]>
I renamed it earlier this afternoon to "_fs_has_crc" so that code that checks it makes sense when you read it:
if [ $_fs_has_crc -eq 1 ]; then .....
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs