e2fsprogs/tests/f_dir_bad_csum
Andreas Dilger 63f44aafb1 e2fsck: fix ".." more gracefully if possible
If the "." entry is corrupted, it will be reset in check_dot().
It is possible that the ".." entry can be recovered from the
directory block instead of also resetting it immediately.  If
it appears that there is a valid ".." entry in the block, allow
that to be used, and let check_dotdot() verify the dirent itself.

When resetting the "." and ".." entries, use EXT2_FT_DIR as the
file type instead of EXT2_FT_UNKNOWN for the very common case of
filesystems with the "filetype" feature, to avoid later problems
that can be easily avoided.  This can't always be done, even if
filesystems without "filetype" are totally obsolete, because many
old test images do not have this feature enabled.

Fixup affected tests using the new "repair-test" script that
updates the expect.[12] files from $test.[12].log for the given
tests and re-runs the test to ensure it now passes.

Signed-off-by: Andreas dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Lustre-bug-Id: https://jira.whamcloud.com/browse/LU-14710
Change-Id: Ia5e579bcf31a9d9ee260d5640de6dbdb60514823
Reviewed-on: https://review.whamcloud.com/43858
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2021-07-06 15:43:21 -04:00
..
expect.1 e2fsck: fix ".." more gracefully if possible 2021-07-06 15:43:21 -04:00
expect.2 tests: add tests for directory entry blocks with checksum errors 2014-08-02 23:48:58 -04:00
image.gz tests: add tests for directory entry blocks with checksum errors 2014-08-02 23:48:58 -04:00
name tests: shorten test descriptions to fit in 80 columns 2017-10-15 16:23:24 -04:00