third_party_littlefs/tests
Christopher Haster 745d98cde0 Fixed lfs_file_truncate issue where internal state may not be flushed
This was caused by the new lfs_file_rawseek optimization that can skip
flushing when calculated file->pos is unchanged combined with an
implicit expectation in lfs_file_truncate that lfs_file_rawseek
unconditionally sets file->pos.

Because of this assumption, lfs_file_truncate could leave file->pos in
an outdated state while changing the internal file metadata. Humorously,
this was always gauranteed to trigger the skip in lfs_file_rawseek when
we try to restore the file->pos, leaving the file->cache used to do the
CTZ skip-list lookup in a potentially bad state.

The easiest fix is to just update file->pos correctly. Note we don't
want to explicitly flush since we can leverage the same noop
optimization if we truncate to the file position. Which I've added a
test for.
2021-01-11 00:14:34 -06:00
..
test_alloc.toml Added test case catching issues with errors during a lookahead scan 2020-03-29 14:12:58 -05:00
test_attrs.toml Cleaned up test script and directory naming 2020-01-27 10:16:29 -06:00
test_badblocks.toml Updated .travis.yml and added additional geometry constraints 2020-02-11 16:01:57 -06:00
test_dirs.toml Limited byte-level tests to native testing due to time 2020-02-18 18:05:08 -06:00
test_entries.toml Updated .travis.yml and added additional geometry constraints 2020-02-11 16:01:57 -06:00
test_evil.toml Added "evil" tests and detecion/recovery from bad pointers and infinite loops 2020-03-20 09:26:07 -05:00
test_exhaustion.toml Fixed minor things to get CI passing again 2020-02-18 18:05:03 -06:00
test_files.toml Cleaned up test script and directory naming 2020-01-27 10:16:29 -06:00
test_interspersed.toml Cleaned up test script and directory naming 2020-01-27 10:16:29 -06:00
test_move.toml Updated .travis.yml and added additional geometry constraints 2020-02-11 16:01:57 -06:00
test_orphans.toml Updated .travis.yml and added additional geometry constraints 2020-02-11 16:01:57 -06:00
test_paths.toml Fixed minor things to get CI passing again 2020-02-18 18:05:03 -06:00
test_relocations.toml Fixed more bugs, mostly related to ENOSPC on different geometries 2020-02-09 11:54:22 -06:00
test_seek.toml Cleaned up test script and directory naming 2020-01-27 10:16:29 -06:00
test_superblocks.toml Renamed test_format -> test_superblocks, tweaked superblock tests 2020-02-22 23:35:28 -06:00
test_truncate.toml Fixed lfs_file_truncate issue where internal state may not be flushed 2021-01-11 00:14:34 -06:00