mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	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:
		
							
								
								
									
										32
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -4,10 +4,16 @@ env: | ||||
|     - CFLAGS=-Werror | ||||
|     - MAKEFLAGS=-j | ||||
|  | ||||
| # cache installation dirs | ||||
| cache: | ||||
|   pip: true | ||||
|   directories: | ||||
|     - $HOME/.cache/apt | ||||
|  | ||||
| # common installation | ||||
| _: &install-common | ||||
|   # need toml, also pip3 isn't installed by default? | ||||
|   - sudo apt-get install python3-pip | ||||
|   - sudo apt-get install python3 python3-pip | ||||
|   - sudo pip3 install toml | ||||
|   # setup a ram-backed disk to speed up reentrant tests | ||||
|   - mkdir disks | ||||
| @@ -189,22 +195,12 @@ jobs: | ||||
|     stage: test | ||||
|     env: | ||||
|       - NAME=littlefs-valgrind | ||||
|       - TFLAGS="$TFLAGS --valgrind" | ||||
|     install: | ||||
|       - *install-common | ||||
|       - sudo apt-get install valgrind | ||||
|       - valgrind --version | ||||
|     script: *test-example | ||||
|   - {<<: *valgrind, script: *test-default} | ||||
|   - {<<: *valgrind, script: *test-nor} | ||||
|   - {<<: *valgrind, script: *test-emmc} | ||||
|   - {<<: *valgrind, script: *test-nand} | ||||
|   - {<<: *valgrind, script: *test-no-intrinsics} | ||||
|   - {<<: *valgrind, script: *test-no-inline} | ||||
|   - {<<: *valgrind, script: *test-byte-writes} | ||||
|   - {<<: *valgrind, script: *test-block-cycles} | ||||
|   - {<<: *valgrind, script: *test-odd-block-count} | ||||
|   - {<<: *valgrind, script: *test-odd-block-size} | ||||
|     script: | ||||
|       - make test TFLAGS+="-k --valgrind" | ||||
|  | ||||
|   # self-host with littlefs-fuse for fuzz test | ||||
|   - stage: test | ||||
| @@ -224,7 +220,7 @@ jobs: | ||||
|  | ||||
|       - mkdir mount | ||||
|       - sudo chmod a+rw /dev/loop0 | ||||
|       - dd if=/dev/zero bs=512 count=4096 of=disk | ||||
|       - dd if=/dev/zero bs=512 count=128K of=disk | ||||
|       - losetup /dev/loop0 disk | ||||
|     script: | ||||
|       # self-host test | ||||
| @@ -239,7 +235,7 @@ jobs: | ||||
|       - cd mount/littlefs | ||||
|       - stat . | ||||
|       - ls -flh | ||||
|       - make -B test_dirs test_files QUIET=1 | ||||
|       - make -B test | ||||
|  | ||||
|   # test migration using littlefs-fuse | ||||
|   - stage: test | ||||
| @@ -260,7 +256,7 @@ jobs: | ||||
|  | ||||
|       - mkdir mount | ||||
|       - sudo chmod a+rw /dev/loop0 | ||||
|       - dd if=/dev/zero bs=512 count=4096 of=disk | ||||
|       - dd if=/dev/zero bs=512 count=128K of=disk | ||||
|       - losetup /dev/loop0 disk | ||||
|     script: | ||||
|       # compile v1 and v2 | ||||
| @@ -277,7 +273,7 @@ jobs: | ||||
|       - cd mount/littlefs | ||||
|       - stat . | ||||
|       - ls -flh | ||||
|       - make -B test_dirs test_files QUIET=1 | ||||
|       - make -B test | ||||
|  | ||||
|       # attempt to migrate | ||||
|       - cd ../.. | ||||
| @@ -291,7 +287,7 @@ jobs: | ||||
|       - cd mount/littlefs | ||||
|       - stat . | ||||
|       - ls -flh | ||||
|       - make -B test_dirs test_files QUIET=1 | ||||
|       - make -B test | ||||
|  | ||||
|   # automatically create releases | ||||
|   - stage: deploy | ||||
|   | ||||
		Reference in New Issue
	
	Block a user