From b8a2d2724aae63d4ef0bf5ef8a8f04390dbb92c1 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Sat, 2 Jul 2022 21:20:59 +1000 Subject: [PATCH] tests: storage: flash_map: close flash area Close the flash_area at the end of individual tests to demonstrate correct usage of the API. Signed-off-by: Jordan Yates --- tests/subsys/storage/flash_map/src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/subsys/storage/flash_map/src/main.c b/tests/subsys/storage/flash_map/src/main.c index 85f372469ac..f02d3ad054d 100644 --- a/tests/subsys/storage/flash_map/src/main.c +++ b/tests/subsys/storage/flash_map/src/main.c @@ -93,6 +93,7 @@ void test_flash_area_get_sectors(void) zassert_true(rc == 0, "area not erased"); } + flash_area_close(fa); } void test_flash_area_check_int_sha256(void) @@ -170,6 +171,8 @@ void test_flash_area_erased_val(void) zassert_equal(param->erase_value, val, "value different than the flash erase value"); + + flash_area_close(fa); } void test_main(void)