Fixed minor things to get CI passing again

- Added caching to Travis install dirs, because otherwise
  pip3 install fails randomly
- Increased size of littlefs-fuse disk because test script has
  a larger footprint now
- Skip a couple of reentrant tests under byte-level writes because
  the tests just take too long and cause Travis to bail due to no
  output for 10m
- Fixed various Valgrind errors
  - Suppressed uninit checks for tests where LFS_BLOCK_ERASE_VALUE == -1.
    In this case rambd goes uninitialized, which is fine for rambd's
    purposes. Note I couldn't figure out how to limit this suppression
    to only the malloc in rambd, this doesn't seem possible with Valgrind.
  - Fixed memory leaks in exhaustion tests
  - Fixed off-by-1 string null-terminator issue in paths tests
- Fixed lfs_file_sync issue caused by revealed by fixing memory leaks
  in exhaustion tests. Getting ENOSPC during a file write puts the file
  in a bad state where littlefs doesn't know how to write it out safely.
  In this case, lfs_file_sync and lfs_file_close return 0 without
  writing out state so that device-side resources can still be cleaned
  up. To recover from ENOSPC, the file needs to be reopened and the
  writes recreated. Not sure if there is a better way to handle this.
- Added some quality-of-life improvements to Valgrind testing
  - Fit Valgrind messages into truncated output when not in verbose mode
  - Turned on origin tracking
This commit is contained in:
Christopher Haster
2020-02-17 12:00:47 -06:00
parent c7987a3162
commit d04b077506
6 changed files with 50 additions and 22 deletions

View File

@@ -157,6 +157,7 @@ code = '''
[[case]] # reentrant many directory creation/rename/removal
define.N = [5, 11]
reentrant = true
if = 'LFS_CACHE_SIZE >= 4' # these just take too long with byte-level writes
code = '''
err = lfs_mount(&lfs, &cfg);
if (err) {
@@ -383,6 +384,7 @@ code = '''
[[case]] # reentrant file creation/rename/removal
define.N = [5, 25]
reentrant = true
if = 'LFS_CACHE_SIZE >= 4' # these just take too long with byte-level writes
code = '''
err = lfs_mount(&lfs, &cfg);
if (err) {