From 82aac9c761f02410fc0e743961cfea9d66b9ac05 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 23 Feb 2024 13:17:12 +0100 Subject: [PATCH] tests/pkg/flashdb_fal_cfg: abort test if no MTD device is configured --- tests/pkg/flashdb_fal_cfg/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/pkg/flashdb_fal_cfg/main.c b/tests/pkg/flashdb_fal_cfg/main.c index 1d7e2b3336..2f8eb2f46c 100644 --- a/tests/pkg/flashdb_fal_cfg/main.c +++ b/tests/pkg/flashdb_fal_cfg/main.c @@ -103,6 +103,11 @@ static fdb_time_t _get_time(void) int main(void) { + if (FDB_MTD == NULL) { + puts("No MTD device configured for test, abort."); + return -1; + } + int init_failed; fdb_mtd_init(FDB_MTD); size_t size = FDB_MTD->pages_per_sector * FDB_MTD->page_size;