ARMmbed / mbed-littlefs

[experimental] Mbed OS wrapper for LittleFS v2.0 (alpha)
https://github.com/ARMmbed/littlefs
76 stars 34 forks source link

Add filesystem recovery tests #9

Closed c1728p9 closed 6 years ago

c1728p9 commented 6 years ago

Add tests for filesystem resilience and wear leveling. These tests take shared filesystem code and simulate different scenarios while this code is running. Information on the new tests can be found below.

mbed-littlefs-tests-filesystem_recovery-resilience: Tests that after every block device operation the filesystem is in a well defined state.

mbed-littlefs-tests-filesystem_recovery-wear_leveling: Tests that the littlefs correctly handles when flash is exhausted by using a simulated block device until there are no free good blocks.

Note - This patch also adds several new block devices for testing. These will eventually be moved into mbed-os.

c1728p9 commented 6 years ago

The unexpected reset test won't work until htrun supports this new functionality: https://github.com/ARMmbed/htrun/pull/174

geky commented 6 years ago

Ran into a small conflict with armcc's internal mutexes. Seems like it may have been a regression in mbed OS (or I've only been testing in release mode with armcc). Pr over here: https://github.com/ARMmbed/mbed-os/pull/5526.

Tested on GCC_ARM/ARM/IAR and all of the tests are passing! (with https://github.com/ARMmbed/htrun/pull/174 and https://github.com/ARMmbed/mbed-os/pull/5526). Thanks for putting this together 👍