diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-26 20:41:00 -0800 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2024-03-11 12:50:09 +0800 |
commit | ed696778485420b64d001d2d78d03e5ad08bac1f (patch) | |
tree | 098525c4556ecb405575be488bb9511b8df4a7f9 | |
parent | d46a46c7d5d0c573faa7775c0c727e85e9ab7e4f (diff) | |
download | xfstests-dev-ed696778485420b64d001d2d78d03e5ad08bac1f.tar.gz |
xfs/155: fail the test if xfs_repair hangs for too long
There are a few hard to reproduce bugs in xfs_repair where it can
deadlock trying to lock a buffer that it already owns. These stalls
cause fstests never to finish, which is annoying! To fix this, set up
the xfs_repair run to abort after 10 minutes, which will affect the
golden output and capture a core file.
This doesn't fix xfs_repair, obviously.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-x | tests/xfs/155 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/xfs/155 b/tests/xfs/155 index 302607b510..8bf1aba1ff 100755 --- a/tests/xfs/155 +++ b/tests/xfs/155 @@ -26,6 +26,11 @@ _require_scratch_nocheck _require_scratch_xfs_crc # needsrepair only exists for v5 _require_populate_commands _require_libxfs_debug_flag LIBXFS_DEBUG_WRITE_CRASH +_require_command "$TIMEOUT_PROG" timeout + +# Inject a 10 minute abortive timeout on the repair program so that deadlocks +# in the program do not cause fstests to hang indefinitely. +XFS_REPAIR_PROG="$TIMEOUT_PROG -s ABRT 10m $XFS_REPAIR_PROG" # Populate the filesystem _scratch_populate_cached nofill >> $seqres.full 2>&1 |