Skip to content

Commit b67360f

Browse files
committed
feat(fs): Add filesystem validation test suite and related configurations
1 parent cd44ed4 commit b67360f

File tree

5 files changed

+818
-0
lines changed

5 files changed

+818
-0
lines changed

tests/validation/fs/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Filesystem Validation Test Suite
2+
3+
This test suite validates the functionality of different filesystem implementations available for ESP32: SPIFFS, FFat, and LittleFS.
4+
5+
## Overview
6+
7+
The test suite uses Unity testing framework to run a comprehensive set of filesystem operations across all three filesystem implementations. Each test is executed for each filesystem to ensure consistent behavior and identify filesystem-specific differences.
8+
9+
## Tested Filesystems
10+
11+
- **SPIFFS** (`/spiffs`) - SPI Flash File System
12+
- **FFat** (`/ffat`) - FAT filesystem implementation
13+
- **LittleFS** (`/littlefs`) - Little File System
14+
15+
## Test Cases
16+
17+
The suite includes the following test categories:
18+
19+
- **Basic Operations**: File write, read, append
20+
- **Directory Operations**: Create directories, list files, nested directories
21+
- **File Management**: Rename, remove, exists checks
22+
- **Binary Operations**: Binary data write/read, seek operations
23+
- **Edge Cases**: Empty files, seek edge cases, file truncation
24+
- **Multiple Handles**: Concurrent file operations
25+
- **Space Tracking**: Free space monitoring
26+
- **Error Handling**: Non-existent file operations
27+
- **Large Files**: Operations with larger file sizes
28+
- **Write/Read Patterns**: Sequential and random access patterns
29+
- **Open Files Limit**: Maximum concurrent open files testing
30+
31+
## Known Filesystem-Specific Behaviors
32+
33+
### SPIFFS
34+
35+
- **Directory Support**: SPIFFS does not have true directory support. Opening a directory always returns `true`, and closing it also always returns `true`, regardless of whether the directory actually exists or not. This is a limitation of the SPIFFS implementation.
36+
- **Error Handling**: Some error case tests are skipped for SPIFFS due to different error handling behavior compared to other filesystems.
37+
38+
### LittleFS
39+
40+
- **Open Files Limit**: LittleFS does not enforce a maximum open files limit at the same time. The `test_max_open_files_limit()` test is skipped for LittleFS as it doesn't have this constraint.
41+
42+
### FFat
43+
44+
- FFat follows standard FAT filesystem behavior and supports all tested operations including proper directory handling and open files limits.

tests/validation/fs/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
platforms:
2+
qemu: false

0 commit comments

Comments
 (0)