Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2020-01-16 15:30:40 +0300
committerChristopher Haster <chaster@utexas.edu>2020-01-21 04:27:24 +0300
commitfb65057a3c2c2b18841086c25ee172f5441bd9ca (patch)
treede40094111a78e436f0cdbc9c6b5eca22df48f24 /Makefile
parentecc2857c0e900d1ae1f49de507fb9851345e6ca7 (diff)
Restructured block devices again for better test exploitation
Also finished migrating tests with test_relocations and test_exhaustion. The issue I was running into when migrating these tests was a lack of flexibility with what you could do with the block devices. It was possible to hack in some hooks for things like bad blocks and power loss, but it wasn't clean or easily extendable. The solution here was to just put all of these test extensions into a third block device, testbd, that uses the other two example block devices internally. testbd has several useful features for testing. Note this makes it a pretty terrible block device _example_ since these hooks look more complicated than a block device needs to be. - testbd can simulate different erase values, supporting 1s, 0s, other byte patterns, or no erases at all (which can cause surprising bugs). This actually depends on the simulated erase values in ramdb and filebd. I did try to move this out of rambd/filebd, but it's not possible to simulate erases in testbd without buffering entire blocks and creating an excessive amount of extra write operations. - testbd also helps simulate power-loss by containing a "power cycles" counter that is decremented every write operation until it calls exit. This is notably faster than the previous gdb approach, which is valuable since the reentrant tests tend to take a while to resolve. - testbd also tracks wear, which can be manually set and read. This is very useful for testing things like bad block handling, wear leveling, or even changing the effective size of the block device at runtime.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 17d3ab3..67e1c9e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ CC ?= gcc
AR ?= ar
SIZE ?= size
-SRC += $(wildcard *.c rambd/*.c filebd/*.c)
+SRC += $(wildcard *.c rambd/*.c filebd/*.c testbd/*.c)
OBJ := $(SRC:.c=.o)
DEP := $(SRC:.c=.d)
ASM := $(SRC:.c=.s)