diff options
| author | Xin LI <delphij@FreeBSD.org> | 2026-09-03 02:15:05 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2026-09-03 02:16:22 +0000 |
| commit | bbaf254293f7e19fa7b0f9ed1da21c7a43126d79 (patch) | |
| tree | 1b308d73705dd11db1bc08b54331f9ba08a7eab2 /sys/modules/linux_ntsync | |
| parent | 6cf0d6c3b5777e053074200ff99dc4b750e62b96 (diff) | |
Add an ATF test suite covering Phase 3 ("Checking for Lost Files")
error accounting. Test images are created using newfs_msdos(8),
and lost cluster chains are injected directly into FAT copies at
offsets derived from the BPB. The LOST.DIR directory required by
reconnect() is constructed similarly: a root directory entry with
ATTR_DIRECTORY set and its first cluster pointing to a zero-filled
cluster containing "." and ".." entries.
The lost_chain_cleared and corrupted_lost_chain_reconnected test
cases provide regression coverage for the preceding commit:
- lost_chain_cleared verifies that clearing a lost chain (the fallback
taken when LOST.DIR is absent) exits with status 0 rather than 8
(unrecovered error).
- corrupted_lost_chain_reconnected verifies that FAT modifications
from a chain truncated by checkchain() prior to reconnection are
written back to disk, requiring "Update FATs? yes" and ensuring a
clean second pass.
Additionally, lost_chain_left_alone, lost_chain_preen, and
corrupted_lost_chain_left_alone cover scenarios that must continue to
report unrecovered errors: read-only mode (-n), which performs no
repairs and leaves the image byte-for-byte unchanged, and preen mode
(-p), which attempts reconnection but does not clear lost chains.
MFC after: 1 week
Diffstat (limited to 'sys/modules/linux_ntsync')
0 files changed, 0 insertions, 0 deletions
