]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs/155: discard stderr when checking for NEEDSREPAIR
authorDarrick J. Wong <djwong@kernel.org>
Tue, 6 Jun 2023 22:29:14 +0000 (15:29 -0700)
committerZorro Lang <zlang@kernel.org>
Sat, 10 Jun 2023 07:35:59 +0000 (15:35 +0800)
commit27d202f5c8de0622a11a762a64731c6f45531993
tree32d54d632e1c1f461938aa2407708d770ccfe923
parent156a8a1078509f5cc4bf528bf7246208641ee67e
xfs/155: discard stderr when checking for NEEDSREPAIR

This test deliberate crashes xfs_repair midway through writing metadata
to check that NEEDSREPAIR is always triggered by filesystem writes.
However, the subsequent scan for the NEEDSREPAIR feature bit prints
verifier errors to stderr.

On a filesystem with metadata directories, this leads to the test
failing with this recorded in the golden output:

+Metadata CRC error detected at 0x55c0a2dd0d38, xfs_dir3_block block 0xc0/0x1000
+dir block owner 0x82 doesnt match block 0xbb8cd37e44eb3623

This isn't specific to metadata directories -- any repair crash could
leave a metadata structure in a weird state such that starting xfs_db
will spray verifier errors.  For _check_scratch_xfs_features here, we
don't care if the filesystem is corrupt; we /only/ care that the
superblock feature bit is set.  Route all that noise to devnull.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/155