From 8dc1fcec03da35d078e3bbd7d06ff5794589bd18 Mon Sep 17 00:00:00 2001 From: Dominik Ermel Date: Sat, 9 Mar 2024 22:44:28 +0000 Subject: [PATCH] tests: Bluetooth: Mesh: Use flash_area_flatten for erase The flash_area_erase is replaced with flash_area_flatten that is also able to erase/scramble devices that do not require explicit call to erase procedure before write. Signed-off-by: Dominik Ermel --- tests/bluetooth/mesh/blob_io_flash/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bluetooth/mesh/blob_io_flash/src/main.c b/tests/bluetooth/mesh/blob_io_flash/src/main.c index 18111e1565f..62fe590e6d9 100644 --- a/tests/bluetooth/mesh/blob_io_flash/src/main.c +++ b/tests/bluetooth/mesh/blob_io_flash/src/main.c @@ -68,7 +68,7 @@ ZTEST(blob_io_flash, test_chunk_read) err = flash_area_open(SLOT1_PARTITION_ID, &fa); zassert_equal(err, 0, "Preparing test data failed with err=%d", err); - err = flash_area_erase(fa, 0, ARRAY_SIZE(ctrl_data)); + err = flash_area_flatten(fa, 0, ARRAY_SIZE(ctrl_data)); zassert_equal(err, 0, "Preparing test data failed with err=%d", err); err = flash_area_write(fa, 0, test_data, ARRAY_SIZE(ctrl_data));