From c7d81cdecbefd5768163a195e8d5257279216a34 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 21 Apr 2023 10:51:31 -0700 Subject: check: try to fix the test device if it gets corrupted If the test device gets corrupted all subsequent tests will fail. To prevent this from causing all subsequent tests to be useless, try repair the file system on TEST_DEV if possible. We don't need to do this with the scratch device since that file system gets recreated each time anyway. Signed-off-by: Theodore Ts'o Signed-off-by: Leah Rumancik Reviewed-by: Darrick J. Wong Signed-off-by: Zorro Lang --- check | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'check') diff --git a/check b/check index 1a58a2b2..befbf465 100755 --- a/check +++ b/check @@ -536,7 +536,12 @@ _check_filesystems() local ret=0 if [ -f ${RESULT_DIR}/require_test ]; then - _check_test_fs || ret=1 + if ! _check_test_fs ; then + ret=1 + echo "Trying to repair broken TEST_DEV file system" + _repair_test_fs + _test_mount + fi rm -f ${RESULT_DIR}/require_test* else _test_unmount 2> /dev/null -- cgit v1.2.3