Skip to content

Conversation

@JakubAndrysek
Copy link
Collaborator

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

  • Added a detailed README.md explaining the scope, test categories, and known filesystem-specific behaviours for SPIFFS, FFat, and LittleFS.

Test and Configuration Files

  • Added a partition table (partitions.csv) defining regions for each filesystem type to support the test suite.
  • Added a CI configuration file (ci.yml) specifying that QEMU is not used for these tests.
  • Added a test runner script (test_fs.py) that uses pytest_embedded and pytest_embedded_wokwi to 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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 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 ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against a9a4e99

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Test Results

 83 files   83 suites   16m 5s ⏱️
 39 tests  38 ✅ 0 💤 0 ❌ 1 🔥
248 runs  241 ✅ 0 💤 0 ❌ 7 🔥

For more details on these errors, see this check.

Results for commit a9a4e99.

♻️ This comment has been updated with latest results.

@lucasssvaz lucasssvaz added Type: CI & Testing Related to continuous integration, automated testing, or test infrastructure. CI Failure Expected For PRs where CI failure is expected labels Dec 2, 2025
@lucasssvaz
Copy link
Member

Is this test only for wokwi or for HW tests too ?

@JakubAndrysek
Copy link
Collaborator Author

Oh, sorry. HW tests too. I will enable them
Can I also enable the QEMU?

@lucasssvaz
Copy link
Member

Oh, sorry. HW tests too. I will enable them Can I also enable the QEMU?

Then you can delete the ci.yml file and do the test something like this:

def test_fs(dut):
    dut.expect_unity_test_output(timeout=120)

Copilot finished reviewing on behalf of lucasssvaz December 2, 2025 15:23
Copy link
Contributor

Copilot AI left a 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 IFileSystem interface and WrappedFS template 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.

@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Failure Expected For PRs where CI failure is expected Status: Pending Merge Pull Request is ready to be merged Type: CI & Testing Related to continuous integration, automated testing, or test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants