]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs/{35[45],455}: fix bogus corruption errors
authorDarrick J. Wong <djwong@kernel.org>
Fri, 30 Dec 2022 22:19:41 +0000 (14:19 -0800)
committerZorro Lang <zlang@kernel.org>
Sat, 25 Feb 2023 13:11:47 +0000 (21:11 +0800)
commitf32c97fc82274291492b3b36298244a9ffc7010d
tree5685cce8e6beb5791f2a394311ed1278a90f67f3
parentf23ca0f1fa1a1eabe211026e9a2761adadbab379
xfs/{35[45],455}: fix bogus corruption errors

The AGFL fuzz tests first fuzz the entire block header, and second
extract flfirst from the AGF header to start a second round of targeted
fuzzing of live bno pointers in the AGFL.  However, flfirst (and the
AGFL field detection at the start of the second round of fuzzing) are
detected after we've already been fuzz testing, which means that the
AGFL might be garbage because repair failed or was not called.  If this
is the case, test will fail because the _scratch_xfs_db -c 'agf 0' -c
'p flfirst' call emits things like this:

Fuzz AGFL flfirst
Metadata corruption detected at 0x55f4f789fbc0, xfs_agfl block 0x3/0x200
Metadata corruption detected at 0x55b7356e0bc0, xfs_agfl block 0x3/0x200
Done fuzzing AGFL flfirst

Fix this by restoring the scratch fs before probing flfirst and starting
the second round of fuzzing.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/354
tests/xfs/355
tests/xfs/455