Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to new version of VFS API #205

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

haberturdeur
Copy link

@haberturdeur haberturdeur commented Nov 15, 2024

Hi,

In release v5.4 IDF will be switching to new version of VFS API, which will become the recommended one for users to use.
(Further documentation of the API and switch to new API for IDF-provided file-systems are in-progress)

This PR modifies esp_littlefs to use the new version of the API in all releases from v5.4 onwards.

Thank you!

@BrianPugh
Copy link
Member

Thank you! later today I'll double check that all the unit tests work, merge, and release!

@BrianPugh
Copy link
Member

@haberturdeur what version of v5.4 are you using? I checked out v5.4-beta1 and am hitting many errors pertaining to the new definitions like:

/Users/brianpugh/esp-idf/tools/unit-test-app/components/littlefs/src/esp_littlefs.c:372:8: error: unknown type name 'esp_vfs_dir_ops_t'; did you mean 'esp_vfs_id_t'?
  372 | static esp_vfs_dir_ops_t s_vfs_littlefs_dir = {
      |        ^~~~~~~~~~~~~~~~~
      |        esp_vfs_id_t

@tlubke-fireboard
Copy link

Looks like espressif/esp-idf:v5.4-beta might be tagged incorrectly? @haberturdeur 's commits are on espressif/esp-idf:master though.

I was able to checkout harberturdeur:master and run unit tests.

Test Setup

  • ESP32S3 (WROOM-1-N16-R8) as target
  • "flash_test" partition encrypted
  • power supplied via esp-prog
  • no changes to default VFS configuration in sdkconfig

Test Results

  • Multiple test failures (test-20 through test-25, test-31 through test-35)
  • System panic (test-26).
logs
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2ae0,len:0x1ea4
load:0x403c8700,len:0x4
load:0x403c8704,len:0xb44
load:0x403cb700,len:0x4048
entry 0x403c88ac
W (31) boot.esp32s3: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (35) efuse: [Virtual] Loading virtual efuse blocks from real efuses
I (148) cpu_start: Multicore app
I (157) cpu_start: Pro cpu start user code
I (157) cpu_start: cpu freq: 240000000 Hz
I (157) app_init: Application information:
I (157) app_init: Project name:     unit-test-app
I (161) app_init: App version:      v5.4-dev-4291-g7a305c0284-dirty
I (167) app_init: Compile time:     Nov 18 2024 15:14:02
I (172) app_init: ELF file SHA256:  2ae9dd7c3...
I (177) app_init: ESP-IDF:          v5.4-dev-4291-g7a305c0284-dirty
I (183) efuse_init: Min chip rev:     v0.0
I (186) efuse_init: Max chip rev:     v0.99 
I (190) efuse_init: Chip rev:         v0.2
I (194) heap_init: Initializing. RAM available for dynamic allocation:
I (201) heap_init: At 3FC96FE8 len 00052728 (329 KiB): RAM
I (206) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (211) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (216) heap_init: At 600FE11C len 00001ECC (7 KiB): RTCRAM
I (222) spi_flash: detected chip: gd
I (225) spi_flash: flash io: dio
W (228) spi_flash: Detected size(16384k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
W (240) efuse_init: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (272) efuse: [Virtual] Loading virtual efuse blocks from real efuses
W (272) flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)
I (276) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (282) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (289) main_task: Started on CPU0
I (292) main_task: Calling app_main()
I (295) main_task: Returned from app_main()


Press ENTER to see the list of tests.
1
Running Format...
I (10765) [littlefs_benchmark]: Filling SPIFFS partition with dummy data
I (13741) [littlefs_benchmark]: Filling FAT partition with dummy data
I (16460) [littlefs_benchmark]: Filling LittleFS partition with dummy data
W (19633) SPIFFS: mount failed, -10025. formatting...
SPIFFS Formatted in 8245623 us
W (27975) vfs_fat_spiflash: f_mount failed (13)
I (27976) vfs_fat_spiflash: Formatting FATFS partition, allocation unit size=4096
I (28130) vfs_fat_spiflash: Mounting again
FAT Formatted in 315486 us
LittleFS Formatted in 66756 us
MALLOC_CAP_8BIT usage: Free memory delta: -500 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 500 Warn threshold: -255 
MALLOC_CAP_8BIT potential leak: Before 376384 bytes free, After 375884 bytes free (delta 500)
MALLOC_CAP_32BIT usage: Free memory delta: -500 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 500 Warn threshold: -255 
MALLOC_CAP_32BIT potential leak: Before 376384 bytes free, After 375884 bytes free (delta 500)
/IDF/tools/unit-test-app/components/littlefs/test/test_benchmark.c:221:Format:PASS
Test ran in 17560ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
2
Running Write 5 files, read 5 files, then delete 5 files...
I (35859) [littlefs_benchmark]: Initializing SPIFFS
Test setup complete.
FAT:
88000 bytes written in 1069792 us
88000 bytes written in 1127559 us
88000 bytes written in 1078525 us
88000 bytes written in 1130306 us
88000 bytes written in 1138474 us
------------
88000 bytes read in 615061 us
88000 bytes read in 615364 us
88000 bytes read in 615389 us
88000 bytes read in 615317 us
88000 bytes read in 615371 us
------------
deleted file 0 in 109564 us
deleted file 1 in 108062 us
deleted file 2 in 108017 us
deleted file 3 in 108030 us
deleted file 4 in 168116 us
------------
Total (440000) Write: 5544656 us
Total (440000) Read: 3076502 us
Total (440000) Delete: 601789 us


SPIFFS:
88000 bytes written in 1019870 us
88000 bytes written in 1019407 us
88000 bytes written in 2978486 us
88000 bytes written in 9955021 us
25344 bytes written in 55013510 us
------------
88000 bytes read in 643253 us
88000 bytes read in 640528 us
88000 bytes read in 635865 us
88000 bytes read in 640473 us
25344 bytes read in 182252 us
------------
deleted file 0 in 141684 us
deleted file 1 in 151373 us
deleted file 2 in 151932 us
deleted file 3 in 150686 us
deleted file 4 in 40225 us
------------
Total (377344) Write: 69986294 us
Total (377344) Read: 2742371 us
Total (377344) Delete: 635900 us


LittleFS:
88000 bytes written in 1039795 us
88000 bytes written in 1032439 us
88000 bytes written in 1017908 us
88000 bytes written in 1037714 us
88000 bytes written in 1021728 us
------------
88000 bytes read in 641211 us
88000 bytes read in 639748 us
88000 bytes read in 638328 us
88000 bytes read in 636967 us
88000 bytes read in 635622 us
------------
deleted file 0 in 6557 us
deleted file 1 in 5845 us
deleted file 2 in 5358 us
deleted file 3 in 4876 us
deleted file 4 in 4934 us
------------
Total (440000) Write: 5149584 us
Total (440000) Read: 3191876 us
Total (440000) Delete: 27570 us


Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_benchmark.c:244:Write 5 files, read 5 files, then delete 5 files:PASS
Test ran in 5783ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
3
Running truncate...
Test setup complete.
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_dir.c:9:truncate:PASS
Test ran in 129ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
4
Running ftruncate...
Test setup complete.
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_dir.c:34:ftruncate:PASS
Test ran in 131ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
5 
Running mkdir, rmdir...
Test setup complete.
Writing to "/littlefs/2/1.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_dir.c:125:mkdir, rmdir:PASS
Test ran in 223ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
6
Running opendir, readdir, rewinddir, seekdir work as expected...
Test setup complete.
Writing to "/littlefs/dir/1.txt"
Writing to "/littlefs/dir/2.txt"
Writing to "/littlefs/dir/boo.bin"
Writing to "/littlefs/dir/inner/3.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_dir.c:171:opendir, readdir, rewinddir, seekdir work as expected:PASS
Test ran in 258ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
7
Running readdir with large number of files...
Test setup complete.
filling directory 0
Writing to "/littlefs/dir2/0/0.txt"
Writing to "/littlefs/dir2/0/1.txt"
Writing to "/littlefs/dir2/0/2.txt"
Writing to "/littlefs/dir2/0/3.txt"
Writing to "/littlefs/dir2/0/4.txt"
Writing to "/littlefs/dir2/0/5.txt"
Writing to "/littlefs/dir2/0/6.txt"
Writing to "/littlefs/dir2/0/7.txt"
Writing to "/littlefs/dir2/0/8.txt"
Writing to "/littlefs/dir2/0/9.txt"
Writing to "/littlefs/dir2/0/10.txt"
Writing to "/littlefs/dir2/0/11.txt"
Writing to "/littlefs/dir2/0/12.txt"
Writing to "/littlefs/dir2/0/13.txt"
Writing to "/littlefs/dir2/0/14.txt"
Writing to "/littlefs/dir2/0/15.txt"
Writing to "/littlefs/dir2/0/16.txt"
Writing to "/littlefs/dir2/0/17.txt"
Writing to "/littlefs/dir2/0/18.txt"
Writing to "/littlefs/dir2/0/19.txt"
Writing to "/littlefs/dir2/0/20.txt"
Writing to "/littlefs/dir2/0/21.txt"
Writing to "/littlefs/dir2/0/22.txt"
Writing to "/littlefs/dir2/0/23.txt"
Writing to "/littlefs/dir2/0/24.txt"
Writing to "/littlefs/dir2/0/25.txt"
Writing to "/littlefs/dir2/0/26.txt"
Writing to "/littlefs/dir2/0/27.txt"
Writing to "/littlefs/dir2/0/28.txt"
Writing to "/littlefs/dir2/0/29.txt"
Writing to "/littlefs/dir2/0/30.txt"
Writing to "/littlefs/dir2/0/31.txt"
Writing to "/littlefs/dir2/0/32.txt"
Writing to "/littlefs/dir2/0/33.txt"
Writing to "/littlefs/dir2/0/34.txt"
Writing to "/littlefs/dir2/0/35.txt"
Writing to "/littlefs/dir2/0/36.txt"
Writing to "/littlefs/dir2/0/37.txt"
Writing to "/littlefs/dir2/0/38.txt"
Writing to "/littlefs/dir2/0/39.txt"
filling directory 1
Writing to "/littlefs/dir2/1/0.txt"
Writing to "/littlefs/dir2/1/1.txt"
Writing to "/littlefs/dir2/1/2.txt"
Writing to "/littlefs/dir2/1/3.txt"
Writing to "/littlefs/dir2/1/4.txt"
Writing to "/littlefs/dir2/1/5.txt"
Writing to "/littlefs/dir2/1/6.txt"
Writing to "/littlefs/dir2/1/7.txt"
Writing to "/littlefs/dir2/1/8.txt"
Writing to "/littlefs/dir2/1/9.txt"
Writing to "/littlefs/dir2/1/10.txt"
Writing to "/littlefs/dir2/1/11.txt"
Writing to "/littlefs/dir2/1/12.txt"
Writing to "/littlefs/dir2/1/13.txt"
Writing to "/littlefs/dir2/1/14.txt"
Writing to "/littlefs/dir2/1/15.txt"
Writing to "/littlefs/dir2/1/16.txt"
Writing to "/littlefs/dir2/1/17.txt"
Writing to "/littlefs/dir2/1/18.txt"
Writing to "/littlefs/dir2/1/19.txt"
Writing to "/littlefs/dir2/1/20.txt"
Writing to "/littlefs/dir2/1/21.txt"
Writing to "/littlefs/dir2/1/22.txt"
Writing to "/littlefs/dir2/1/23.txt"
Writing to "/littlefs/dir2/1/24.txt"
Writing to "/littlefs/dir2/1/25.txt"
Writing to "/littlefs/dir2/1/26.txt"
Writing to "/littlefs/dir2/1/27.txt"
Writing to "/littlefs/dir2/1/28.txt"
Writing to "/littlefs/dir2/1/29.txt"
Writing to "/littlefs/dir2/1/30.txt"
Writing to "/littlefs/dir2/1/31.txt"
Writing to "/littlefs/dir2/1/32.txt"
Writing to "/littlefs/dir2/1/33.txt"
Writing to "/littlefs/dir2/1/34.txt"
Writing to "/littlefs/dir2/1/35.txt"
Writing to "/littlefs/dir2/1/36.txt"
Writing to "/littlefs/dir2/1/37.txt"
Writing to "/littlefs/dir2/1/38.txt"
Writing to "/littlefs/dir2/1/39.txt"
filling directory 2
Writing to "/littlefs/dir2/2/0.txt"
Writing to "/littlefs/dir2/2/1.txt"
Writing to "/littlefs/dir2/2/2.txt"
Writing to "/littlefs/dir2/2/3.txt"
Writing to "/littlefs/dir2/2/4.txt"
Writing to "/littlefs/dir2/2/5.txt"
Writing to "/littlefs/dir2/2/6.txt"
Writing to "/littlefs/dir2/2/7.txt"
Writing to "/littlefs/dir2/2/8.txt"
Writing to "/littlefs/dir2/2/9.txt"
Writing to "/littlefs/dir2/2/10.txt"
Writing to "/littlefs/dir2/2/11.txt"
Writing to "/littlefs/dir2/2/12.txt"
Writing to "/littlefs/dir2/2/13.txt"
Writing to "/littlefs/dir2/2/14.txt"
Writing to "/littlefs/dir2/2/15.txt"
Writing to "/littlefs/dir2/2/16.txt"
Writing to "/littlefs/dir2/2/17.txt"
Writing to "/littlefs/dir2/2/18.txt"
Writing to "/littlefs/dir2/2/19.txt"
Writing to "/littlefs/dir2/2/20.txt"
Writing to "/littlefs/dir2/2/21.txt"
Writing to "/littlefs/dir2/2/22.txt"
Writing to "/littlefs/dir2/2/23.txt"
Writing to "/littlefs/dir2/2/24.txt"
Writing to "/littlefs/dir2/2/25.txt"
Writing to "/littlefs/dir2/2/26.txt"
Writing to "/littlefs/dir2/2/27.txt"
Writing to "/littlefs/dir2/2/28.txt"
Writing to "/littlefs/dir2/2/29.txt"
Writing to "/littlefs/dir2/2/30.txt"
Writing to "/littlefs/dir2/2/31.txt"
Writing to "/littlefs/dir2/2/32.txt"
Writing to "/littlefs/dir2/2/33.txt"
Writing to "/littlefs/dir2/2/34.txt"
Writing to "/littlefs/dir2/2/35.txt"
Writing to "/littlefs/dir2/2/36.txt"
Writing to "/littlefs/dir2/2/37.txt"
Writing to "/littlefs/dir2/2/38.txt"
Writing to "/littlefs/dir2/2/39.txt"
filling directory 3
Writing to "/littlefs/dir2/3/0.txt"
Writing to "/littlefs/dir2/3/1.txt"
Writing to "/littlefs/dir2/3/2.txt"
Writing to "/littlefs/dir2/3/3.txt"
Writing to "/littlefs/dir2/3/4.txt"
Writing to "/littlefs/dir2/3/5.txt"
Writing to "/littlefs/dir2/3/6.txt"
Writing to "/littlefs/dir2/3/7.txt"
Writing to "/littlefs/dir2/3/8.txt"
Writing to "/littlefs/dir2/3/9.txt"
Writing to "/littlefs/dir2/3/10.txt"
Writing to "/littlefs/dir2/3/11.txt"
Writing to "/littlefs/dir2/3/12.txt"
Writing to "/littlefs/dir2/3/13.txt"
Writing to "/littlefs/dir2/3/14.txt"
Writing to "/littlefs/dir2/3/15.txt"
Writing to "/littlefs/dir2/3/16.txt"
Writing to "/littlefs/dir2/3/17.txt"
Writing to "/littlefs/dir2/3/18.txt"
Writing to "/littlefs/dir2/3/19.txt"
Writing to "/littlefs/dir2/3/20.txt"
Writing to "/littlefs/dir2/3/21.txt"
Writing to "/littlefs/dir2/3/22.txt"
Writing to "/littlefs/dir2/3/23.txt"
Writing to "/littlefs/dir2/3/24.txt"
Writing to "/littlefs/dir2/3/25.txt"
Writing to "/littlefs/dir2/3/26.txt"
Writing to "/littlefs/dir2/3/27.txt"
Writing to "/littlefs/dir2/3/28.txt"
Writing to "/littlefs/dir2/3/29.txt"
Writing to "/littlefs/dir2/3/30.txt"
Writing to "/littlefs/dir2/3/31.txt"
Writing to "/littlefs/dir2/3/32.txt"
Writing to "/littlefs/dir2/3/33.txt"
Writing to "/littlefs/dir2/3/34.txt"
Writing to "/littlefs/dir2/3/35.txt"
Writing to "/littlefs/dir2/3/36.txt"
Writing to "/littlefs/dir2/3/37.txt"
Writing to "/littlefs/dir2/3/38.txt"
Writing to "/littlefs/dir2/3/39.txt"
listing files in directory 0
listing files in directory 1
listing files in directory 2
listing files in directory 3
checking that all files have been found in directory 0
checking that all files have been found in directory 1
checking that all files have been found in directory 2
checking that all files have been found in directory 3
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: -364 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 364 Warn threshold: -255 
MALLOC_CAP_8BIT potential leak: Before 375884 bytes free, After 375520 bytes free (delta 364)
MALLOC_CAP_32BIT usage: Free memory delta: -364 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 364 Warn threshold: -255 
MALLOC_CAP_32BIT potential leak: Before 375884 bytes free, After 375520 bytes free (delta 364)
/IDF/tools/unit-test-app/components/littlefs/test/test_dir.c:259:readdir with large number of files:PASS
Test ran in 11053ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
8
Running can opendir root directory of FS...
Test setup complete.
Writing to "/littlefs/test_opd.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_dir.c:266:can opendir root directory of FS:PASS
Test ran in 133ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
9
Running unlink removes a file...
Test setup complete.
Writing to "/littlefs/unlink.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_dir.c:297:unlink removes a file:PASS
Test ran in 130ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
10
Running rename moves a file...
Test setup complete.
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_dir.c:310:rename moves a file:PASS
Test ran in 187ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
11
Running can initialize LittleFS in erased partition...
Test setup complete.
total: 524288, used: 8192
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:12:can initialize LittleFS in erased partition:PASS
Test ran in 1571ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
12
Running can format mounted partition...
Test setup complete.
Writing to "/littlefs/hello.txt"
Deleting "/littlefs/hello.txt" via formatting fs.
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:26:can format mounted partition:PASS
Test ran in 172ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
13
Running can format unmounted partition...
Test setup complete.
Writing to "/littlefs/hello.txt"
Test teardown complete.
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:41:can format unmounted partition:PASS
Test ran in 180ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
14
Running can create and write file...
Test setup complete.
Writing to "/littlefs/hello.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:67:can create and write file:PASS
Test ran in 112ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
15
Running can read file...
Test setup complete.
Writing to "/littlefs/hello.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:74:can read file:PASS
Test ran in 115ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
16
Running can write to file with offset (pwrite)...
Test setup complete.
Writing to "/littlefs/hello.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:82:can write to file with offset (pwrite):PASS
Test ran in 122ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
17
Running can read from file with offset (pread)...
Test setup complete.
Writing to "/littlefs/hello.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:89:can read from file with offset (pread):PASS
Test ran in 117ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
18
Running r+ mode read and write file...
Test setup complete.
Writing to "/littlefs/hello.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:96:r+ mode read and write file:PASS
Test ran in 125ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
19
Running w+ mode read and write file...
Test setup complete.
Writing to "/littlefs/hello.txt"
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:133:w+ mode read and write file:PASS
Test ran in 120ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
20
Running can open maximum number of files...
Test setup complete.
Opening "/littlefs/f_0.txt"
Opening "/littlefs/f_1.txt"
Opening "/littlefs/f_2.txt"
Opening "/littlefs/f_3.txt"
Opening "/littlefs/f_4.txt"
Opening "/littlefs/f_5.txt"
Opening "/littlefs/f_6.txt"
Opening "/littlefs/f_7.txt"
Opening "/littlefs/f_8.txt"
Opening "/littlefs/f_9.txt"
Opening "/littlefs/f_10.txt"
Opening "/littlefs/f_11.txt"
Opening "/littlefs/f_12.txt"
Opening "/littlefs/f_13.txt"
Opening "/littlefs/f_14.txt"
Opening "/littlefs/f_15.txt"
Opening "/littlefs/f_16.txt"
Opening "/littlefs/f_17.txt"
Opening "/littlefs/f_18.txt"
Opening "/littlefs/f_19.txt"
Opening "/littlefs/f_20.txt"
Opening "/littlefs/f_21.txt"
Opening "/littlefs/f_22.txt"
Opening "/littlefs/f_23.txt"
Opening "/littlefs/f_24.txt"
Opening "/littlefs/f_25.txt"
Opening "/littlefs/f_26.txt"
Opening "/littlefs/f_27.txt"
Opening "/littlefs/f_28.txt"
Opening "/littlefs/f_29.txt"
Opening "/littlefs/f_30.txt"
Opening "/littlefs/f_31.txt"
Opening "/littlefs/f_32.txt"
Opening "/littlefs/f_33.txt"
Opening "/littlefs/f_34.txt"
Opening "/littlefs/f_35.txt"
Opening "/littlefs/f_36.txt"
Opening "/littlefs/f_37.txt"
Opening "/littlefs/f_38.txt"
Opening "/littlefs/f_39.txt"
Opening "/littlefs/f_40.txt"
Opening "/littlefs/f_41.txt"
Opening "/littlefs/f_42.txt"
Opening "/littlefs/f_43.txt"
Opening "/littlefs/f_44.txt"
Opening "/littlefs/f_45.txt"
Opening "/littlefs/f_46.txt"
Opening "/littlefs/f_47.txt"
Opening "/littlefs/f_48.txt"
Opening "/littlefs/f_49.txt"
Opening "/littlefs/f_50.txt"
Opening "/littlefs/f_51.txt"
Opening "/littlefs/f_52.txt"
Opening "/littlefs/f_53.txt"
Opening "/littlefs/f_54.txt"
Opening "/littlefs/f_55.txt"
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:491:can open maximum number of files:FAIL:Function [littlefs].  Expected Non-NULLMALLOC_CAP_8BIT usage: Free memory delta: -49980 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 49980 Warn threshold: -255 
MALLOC_CAP_8BIT critical leak: Before 375520 bytes free, After 325540 bytes free (delta 49980)

Test ran in 3652ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
21
Running overwrite and append file...
E (434509) esp_littlefs: Partition already used
E (434510) esp_littlefs: Failed to initialize LittleFS
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:55:overwrite and append file:FAIL: Expected 0x00000000 Was 0x00000103. Function [littlefs]MALLOC_CAP_8BIT usage: Free memory delta: 8692 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 8692 Leak threshold: -1200 

Test ran in 108ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
22
Running use append with other flags...
Test setup complete.
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:180:use append with other flags:FAIL: Expected 6 Was -1. Function [littlefs]MALLOC_CAP_8BIT usage: Free memory delta: -1688 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 1688 Warn threshold: -255 
MALLOC_CAP_8BIT critical leak: Before 334232 bytes free, After 332544 bytes free (delta 1688)

Test ran in 115ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
23
Running can lseek...
E (445049) esp_littlefs: Partition already used
E (445049) esp_littlefs: Failed to initialize LittleFS
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:55:can lseek:FAIL: Expected 0x00000000 Was 0x00000103. Function [littlefs]MALLOC_CAP_8BIT usage: Free memory delta: 1628 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 1628 Leak threshold: -1200 

Test ran in 104ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
24
Running stat/fstat returns correct values...
Test setup complete.
Writing to "/littlefs/stat.txt"
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:12:stat/fstat returns correct values:FAIL:Function [littlefs].  Expected Non-NULLMALLOC_CAP_8BIT usage: Free memory delta: -1688 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 1688 Warn threshold: -255 
MALLOC_CAP_8BIT critical leak: Before 334172 bytes free, After 332484 bytes free (delta 1688)

Test ran in 119ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
25
Running multiple tasks can use same volume...
E (453514) esp_littlefs: Partition already used
E (453514) esp_littlefs: Failed to initialize LittleFS
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:55:multiple tasks can use same volume:FAIL: Expected 0x00000000 Was 0x00000103. Function [littlefs]MALLOC_CAP_8BIT usage: Free memory delta: 1628 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 1628 Leak threshold: -1200 

Test ran in 109ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
26
Running esp_littlefs_info...
Test setup complete.
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4037af4a  PS      : 0x00060730  A0      : 0x82018ff6  A1      : 0x3fc9ce80  
--- 0x4037af4a: xQueueTakeMutexRecursive at /Users/fireboard/Sources/esp-idf-beta/components/freertos/FreeRTOS-Kernel/queue.c:828

A2      : 0xf7ff0ff0  A3      : 0xffffffff  A4      : 0x000000ff  A5      : 0x0000ff00  
A6      : 0x00ff0000  A7      : 0xf7ff0ff0  A8      : 0x006e6962  A9      : 0x00000009  
A10     : 0x00000001  A11     : 0x00000000  A12     : 0x3fc9d027  A13     : 0x00000001  
A14     : 0x3fc96624  A15     : 0x3fc97760  SAR     : 0x00000008  EXCCAUSE: 0x0000001c  
EXCVADDR: 0xf7ff0ff8  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffff6  
--- 0x400556d5: strlen in ROM
0x400556e5: strlen in ROM



Backtrace: 0x4037af47:0x3fc9ce80 0x42018ff3:0x3fc9cea0 0x4200ca17:0x3fc9cfd0 0x4202500e:0x3fc9cff0 0x420043cd:0x3fc9d010 0x4200dbe6:0x3fc9d070 0x4200de35:0x3fc9d0a0 0x4200dee3:0x3fc9d0c0 0x4200df0f:0x3fc9d0e0 0x4200e0e2:0x3fc9d100 0x4201f5d3:0x3fc9d230 0x4037b029:0x3fc9d250
--- 0x4037af47: xQueueTakeMutexRecursive at /Users/fireboard/Sources/esp-idf-beta/components/freertos/FreeRTOS-Kernel/queue.c:821 (discriminator 1)
0x42018ff3: sem_take at /Users/fireboard/Sources/esp-idf-beta/tools/unit-test-app/components/littlefs/src/esp_littlefs.c:1196
 (inlined by) vfs_littlefs_unlink at /Users/fireboard/Sources/esp-idf-beta/tools/unit-test-app/components/littlefs/src/esp_littlefs.c:1934
0x4200ca17: esp_vfs_unlink at /Users/fireboard/Sources/esp-idf-beta/components/vfs/vfs.c:1097 (discriminator 5)
0x4202500e: unlink at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/syscalls/sysunlink.c:9 (discriminator 1)
0x420043cd: test_func_268 at /Users/fireboard/Sources/esp-idf-beta/tools/unit-test-app/components/littlefs/test/test_littlefs.c:273
0x4200dbe6: unity_default_test_run at /Users/fireboard/Sources/esp-idf-beta/components/unity/unity_runner.c:70
0x4200de35: unity_run_single_test at /Users/fireboard/Sources/esp-idf-beta/components/unity/unity_runner.c:124
0x4200dee3: unity_run_test_by_index at /Users/fireboard/Sources/esp-idf-beta/components/unity/unity_runner.c:152
0x4200df0f: unity_run_single_test_by_index_parse at /Users/fireboard/Sources/esp-idf-beta/components/unity/unity_runner.c:161
0x4200e0e2: unity_run_menu at /Users/fireboard/Sources/esp-idf-beta/components/unity/unity_runner.c:310
0x4201f5d3: unity_task at /Users/fireboard/Sources/esp-idf-beta/tools/unit-test-app/components/test_utils/test_runner.c:27
0x4037b029: vPortTaskWrapper at /Users/fireboard/Sources/esp-idf-beta/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:139





ELF file SHA256: 2ae9dd7c3

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
Saved PC:0x40376fd4
--- 0x40376fd4: esp_restart_noos at /Users/fireboard/Sources/esp-idf-beta/components/esp_system/port/soc/esp32s3/system_internal.c:160

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2ae0,len:0x1ea4
load:0x403c8700,len:0x4
load:0x403c8704,len:0xb44
load:0x403cb700,len:0x4048
entry 0x403c88ac
W (33) boot.esp32s3: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (37) efuse: [Virtual] Loading virtual efuse blocks from real efuses
I (150) cpu_start: Multicore app
I (158) cpu_start: Pro cpu start user code
I (158) cpu_start: cpu freq: 240000000 Hz
I (159) app_init: Application information:
I (159) app_init: Project name:     unit-test-app
I (163) app_init: App version:      v5.4-dev-4291-g7a305c0284-dirty
I (169) app_init: Compile time:     Nov 18 2024 15:14:02
I (174) app_init: ELF file SHA256:  2ae9dd7c3...
I (178) app_init: ESP-IDF:          v5.4-dev-4291-g7a305c0284-dirty
I (184) efuse_init: Min chip rev:     v0.0
I (188) efuse_init: Max chip rev:     v0.99 
I (192) efuse_init: Chip rev:         v0.2
I (196) heap_init: Initializing. RAM available for dynamic allocation:
I (203) heap_init: At 3FC96FE8 len 00052728 (329 KiB): RAM
I (207) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (213) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (218) heap_init: At 600FE11C len 00001ECC (7 KiB): RTCRAM
I (224) spi_flash: detected chip: gd
I (226) spi_flash: flash io: dio
W (229) spi_flash: Detected size(16384k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
W (242) efuse_init: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (273) efuse: [Virtual] Loading virtual efuse blocks from real efuses
W (274) flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)
I (278) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (283) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (291) main_task: Started on CPU0
I (294) main_task: Calling app_main()
I (297) main_task: Returned from app_main()


Press ENTER to see the list of tests.
27
Running mtime support...
Test setup complete.
Writing to "/littlefs/time"
mtime=463
mtime=465
mtime=465
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: -400 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 400 Warn threshold: -255 
MALLOC_CAP_8BIT potential leak: Before 376384 bytes free, After 375984 bytes free (delta 400)
MALLOC_CAP_32BIT usage: Free memory delta: -400 Leak threshold: -1200 
The test leaked more memory than warn threshold: Leaked: 400 Warn threshold: -255 
MALLOC_CAP_32BIT potential leak: Before 376384 bytes free, After 375984 bytes free (delta 400)
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:310:mtime support:PASS
Test ran in 4158ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
28
Running Rewriting file frees space immediately (#7426)...
Test setup complete.
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:714:Rewriting file frees space immediately (#7426):PASS
Test ran in 10532ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
29
Running esp_littlefs_info returns used_bytes > total_bytes...
Test setup complete.
E (50949) esp_littlefs: /IDF/tools/unit-test-app/components/littlefs/src/littlefs/lfs.c:689:error: No more free space 0x51

Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:743:esp_littlefs_info returns used_bytes > total_bytes:PASS
Test ran in 4984ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
30
Running fcntl get flags...
Test setup complete.
Test teardown complete.
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs.c:854:fcntl get flags:PASS
Test ran in 123ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK
Enter next test, or 'enter' to see menu
31
Running can read partition...
E (107725) esp_littlefs: /IDF/tools/unit-test-app/components/littlefs/src/littlefs/lfs.c:1369:error: Corrupted dir pair at {0x1, 0x0}

E (107726) esp_littlefs: mount failed,  (-84)
E (107730) esp_littlefs: Failed to initialize LittleFS
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs_static_partition.c:26:can read partition:FAIL: Expected 0x00000000 Was 0xFFFFFFFF. Function [littlefs_static]MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 

Test ran in 62ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
32
Running can read file...
E (109242) esp_littlefs: /IDF/tools/unit-test-app/components/littlefs/src/littlefs/lfs.c:1369:error: Corrupted dir pair at {0x1, 0x0}

E (109243) esp_littlefs: mount failed,  (-84)
E (109247) esp_littlefs: Failed to initialize LittleFS
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs_static_partition.c:26:can read file:FAIL: Expected 0x00000000 Was 0xFFFFFFFF. Function [littlefs_static]MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 

Test ran in 62ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
33
Running can't create file...
E (110465) esp_littlefs: /IDF/tools/unit-test-app/components/littlefs/src/littlefs/lfs.c:1369:error: Corrupted dir pair at {0x1, 0x0}

E (110466) esp_littlefs: mount failed,  (-84)
E (110470) esp_littlefs: Failed to initialize LittleFS
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs_static_partition.c:26:can't create file:FAIL: Expected 0x00000000 Was 0xFFFFFFFF. Function [littlefs_static]MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 

Test ran in 63ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
34
Running can't delete file...
E (112326) esp_littlefs: /IDF/tools/unit-test-app/components/littlefs/src/littlefs/lfs.c:1369:error: Corrupted dir pair at {0x1, 0x0}

E (112327) esp_littlefs: mount failed,  (-84)
E (112331) esp_littlefs: Failed to initialize LittleFS
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs_static_partition.c:26:can't delete file:FAIL: Expected 0x00000000 Was 0xFFFFFFFF. Function [littlefs_static]MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 

Test ran in 63ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
35
Running can't write to file...
E (114457) esp_littlefs: /IDF/tools/unit-test-app/components/littlefs/src/littlefs/lfs.c:1369:error: Corrupted dir pair at {0x1, 0x0}

E (114458) esp_littlefs: mount failed,  (-84)
E (114462) esp_littlefs: Failed to initialize LittleFS
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs_static_partition.c:26:can't write to file:FAIL: Expected 0x00000000 Was 0xFFFFFFFF. Function [littlefs_static]MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 

Test ran in 63ms

-----------------------
1 Tests 1 Failures 0 Ignored 
FAIL
Enter next test, or 'enter' to see menu
36
Running grow filesystem...
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1200 
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1200 
/IDF/tools/unit-test-app/components/littlefs/test/test_littlefs_static_partition.c:126:grow filesystem:PASS
Test ran in 107ms

-----------------------
1 Tests 0 Failures 0 Ignored 
OK

I rebuilt and re-ran the tests on IDF v5.3.1 and joltwallet:master and got the same results, so maybe the problem is something I'm doing wrong. I haven't analyzed the test results at all yet.

Always trying to minimize RAM usage in our application though -- happy to run some dev builds with v5.4-beta when unit tests get sorted out.

@haberturdeur
Copy link
Author

It is not tagged incorrectly. I assume, it just didn't make it to that round of testing and therefore that tag. It is in the release/v5.4 branch, so it should be included in the v5.4 release.

I will take a look at those failing tests.

@haberturdeur
Copy link
Author

haberturdeur commented Nov 21, 2024

Hi @tlubke-fireboard,

when running the unit tests I encountered two issues:

  • Failing build because of incompatible pointers - fixed here
  • The same issue as you with open_max_files test, which is caused by incorrect assumption in the tests here
    • For each of the stdin, stdout and stderr file descriptors at least one (usually two) other file descriptors needs to be open (see esp_vfs_console component)
    • For correct offset, you could probably parse output of esp_vfs_dump_fds (docs), but that seems a bit hacky

Note: the rest of the failures in your run seem to be caused by the failed open_max_files, which leaves the FS or VFS in somewhat incorrect state, restart fixes it for me.

@BrianPugh
Copy link
Member

The code looks good, and I have confirmed that tests are passing. I'll merge and release this as soon as esp-idf v5.4 is released (just in case something changes). I'll keep an eye out on it, but don't hesitate to ping me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants