diff options
author | Theodore Ts'o <tytso@mit.edu> | 2023-04-21 10:51:31 -0700 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-04-24 02:48:02 +0800 |
commit | c7d81cdecbefd5768163a195e8d5257279216a34 (patch) | |
tree | aad92e203c7c6f8d9be5db7f350c22ebee5c6851 /check | |
parent | c63ce4a5eac8a4e1f0785e7eae45b16a3ad16b87 (diff) |
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 <tytso@mit.edu>
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'check')
-rwxr-xr-x | check | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |