-
Notifications
You must be signed in to change notification settings - Fork 7.8k
feat(fs): Add filesystem validation test suite and related cof. #12095
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
base: master
Are you sure you want to change the base?
Conversation
👋 Hello JakubAndrysek, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 83 files 83 suites 16m 5s ⏱️ For more details on these errors, see this check. Results for commit a9a4e99. ♻️ This comment has been updated with latest results. |
|
Is this test only for wokwi or for HW tests too ? |
|
Oh, sorry. HW tests too. I will enable them |
Then you can delete the def test_fs(dut):
dut.expect_unity_test_output(timeout=120) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a comprehensive filesystem validation test suite for ESP32 that validates SPIFFS, FFat, and LittleFS implementations using the Unity testing framework. The suite covers basic operations, directory management, binary I/O, edge cases, and filesystem-specific behaviors.
Key changes:
- Added 16 comprehensive test cases covering filesystem operations including reads, writes, seeks, directory operations, and edge cases
- Created filesystem abstraction layer with
IFileSysteminterface andWrappedFStemplate class to provide unified testing across different filesystem implementations - Added partition table with dedicated regions for each filesystem type (SPIFFS, FFat, LittleFS)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/validation/fs/fs.ino | Main test implementation with 759 lines containing filesystem abstraction layer and 16 test functions that run across all three filesystem types |
| tests/validation/fs/test_fs.py | Pytest runner that executes Unity tests on device/simulator with 300-second timeout |
| tests/validation/fs/partitions.csv | Partition table defining memory regions for nvs, factory app, and three filesystem partitions (fat, spiffs, littlefs) |
| tests/validation/fs/ci.yml | CI configuration specifying QEMU is disabled for these tests |
| tests/validation/fs/README.md | Comprehensive documentation explaining test scope, categories, and filesystem-specific behaviors |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces a new filesystem validation test suite for ESP32, covering SPIFFS, FFat, and LittleFS implementations. It adds comprehensive documentation, configuration files, and a basic test runner to facilitate automated testing and highlight differences between the filesystems.
Test Suite and Documentation
README.mdexplaining the scope, test categories, and known filesystem-specific behaviours for SPIFFS, FFat, and LittleFS.Test and Configuration Files
partitions.csv) defining regions for each filesystem type to support the test suite.ci.yml) specifying that QEMU is not used for these tests.test_fs.py) that usespytest_embeddedandpytest_embedded_wokwito execute the Unity-based tests on the DUT (Device Under Test).Test scenarios
Tested in Wokwi:
esp32: SUCCESS
esp32c3: SUCCESS
esp32c6: SUCCESS
esp32h2: SUCCESS
esp32p4: SUCCESS
esp32s2: SUCCESS
esp32s3: SUCCESS
Also successfully tested on esp32 and esp32s3.