1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

unittests/tests-littlefs: fix dummy mtd

_init function were erasing whole memory leading to losing everything
when mounting or formating the memory
This commit is contained in:
Vincent Dupont 2018-02-21 11:06:54 +01:00
parent 8b43659230
commit 36e1d6b335

View File

@ -46,7 +46,6 @@ static int _init(mtd_dev_t *dev)
{
(void)dev;
memset(dummy_memory, 0xff, sizeof(dummy_memory));
return 0;
}
@ -407,6 +406,10 @@ static void tests_littlefs_statvfs(void)
Test *tests_littlefs_tests(void)
{
#ifndef MTD_0
memset(dummy_memory, 0xff, sizeof(dummy_memory));
#endif
EMB_UNIT_TESTFIXTURES(fixtures) {
new_TestFixture(tests_littlefs_format),
new_TestFixture(tests_littlefs_mount_umount),