tests: Add region-test for rdev API

This patch adds a basic test for the common region and region_device
APIs, sanity checking the basic functions and things like
overflow-handling. There is certainly more that could be added here, but
it's a start.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I4932402f54768557e5b22b16e66220bd90ddebfd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41046
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Jan Dabros
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Julius Werner
2020-05-04 17:46:31 -07:00
parent 21744811bb
commit 2540037406
3 changed files with 412 additions and 2 deletions

View File

@@ -24,8 +24,7 @@ TEST_CFLAGS += -I$(src)/include -I$(src)/commonlib/include \
# Path for Kconfig autoheader
TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER))
TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections \
-fno-builtin
TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections -fno-builtin
# Link against Cmocka
TEST_LDFLAGS = -lcmocka -Wl,--gc-sections