third_party_littlefs/tests
Christopher Haster 6db5202bdc Modified valid bit to provide an early check on all tags
The valid bit present in tags is a requirement to properly detect the
end of commits in metadata logs. The way it works is that the CRC entry is
allowed to specify what is needed from the next tag's valid bit. If it's
incorrect, we've reached the end of the commit. We then set the valid bit to
indicate when we tried to program a new commit. If we lose power, this
commit will still be thrown out by a bad checksum.

However, the valid bit is unused outside of the CRC entry. Here we turn on the
valid bit for all tags, which means we have a decent chance of exiting early
if we hit a half-written commit. We still need to guarantee detection of
the valid bit on commits following the CRC entry, so we allow the CRC
entry to flip the expected valid bit.

The only tricky part is what valid bit we expect by default, since this
is used on the first commit on a metadata log. Here we default to a 1,
which gives us the fastest exit on blocks that erase to 0. This is
because blocks that erase to 1s will implicitly flip the valid bit of
the next tag, allowing us to exit on the next tag.

If we defaulted to 0, we could exit faster on disks that erase to 1, but
would need to scan the entire block on disks that erase to 0 before we
realize a CRC commit is never coming.
2018-10-18 10:00:49 -05:00
..
corrupt.py Modified valid bit to provide an early check on all tags 2018-10-18 10:00:49 -05:00
debug.py Modified valid bit to provide an early check on all tags 2018-10-18 10:00:49 -05:00
stats.py Added allocation randomization for dynamic wear-leveling 2018-10-18 09:55:47 -05:00
template.fmt Added building blocks for dynamic wear-leveling 2018-10-18 09:30:45 -05:00
test_alloc.sh Fixed inline files when inline_max == cache_size 2018-10-18 10:00:48 -05:00
test_attrs.sh Dropped lfs_fs_getattr for the more implicit lfs_getattr("/") 2018-10-18 10:00:48 -05:00
test_corrupt.sh Added allocation randomization for dynamic wear-leveling 2018-10-18 09:55:47 -05:00
test_dirs.sh Fixed issues with finding wrong ids after bad commits 2018-10-13 19:46:38 -05:00
test_entries.sh Fixed testing issues introduced by expanding superblocks 2018-10-16 20:18:24 -05:00
test_files.sh Fixed shadowed variable warnings 2018-07-02 10:29:19 -05:00
test_format.sh Changed unwritable superblock to ENOSPC for consistency 2018-10-18 10:00:48 -05:00
test_interspersed.sh Renamed test_parallel tests to test_interespersed 2018-04-08 17:31:09 -05:00
test_move.sh Added allocation randomization for dynamic wear-leveling 2018-10-18 09:55:47 -05:00
test_orphan.sh Added allocation randomization for dynamic wear-leveling 2018-10-18 09:55:47 -05:00
test_paths.sh Pulled in fixes for additional path corner cases 2018-10-16 06:36:00 -05:00
test_seek.sh Fixed shadowed variable warnings 2018-07-02 10:29:19 -05:00
test_truncate.sh Fixed error check when truncating files to larger size 2018-02-04 14:09:55 -06:00
test.py Added tests for resizable entries and custom attributes 2018-10-09 23:02:57 -05:00