Skip to content

Commit

Permalink
tests: fs: zms: add testsuite for ZMS storage
Browse files Browse the repository at this point in the history
List of added tests :
- zms.test_delete
- zms.test_zms_cache_collission
- zms.test_zms_cache_gc
- zms.test_zms_cache_hash_quality
- zms.test_zms_cache_init
- zms.test_zms_corrupted_sector_close_operation
- zms.test_zms_corrupted_write
- zms.test_zms_full_sector
- zms.test_zms_gc
- zms.test_zms_gc_3sectors
- zms.test_zms_gc_corrupt_ate
- zms.test_zms_gc_corrupt_close_ate
- zms.test_zms_mount
- zms.test_zms_write

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
  • Loading branch information
rghaddab committed Sep 9, 2024
1 parent 5c95d0a commit 013a303
Show file tree
Hide file tree
Showing 6 changed files with 947 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/subsys/fs/zms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(fs_zms)

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/fs/zms)
9 changes: 9 additions & 0 deletions tests/subsys/fs/zms/boards/native_sim.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

&flash0 {
erase-block-size = <0x400>;
};
9 changes: 9 additions & 0 deletions tests/subsys/fs/zms/boards/qemu_x86_ev_0x00.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

&sim_flash {
erase-value = < 0x00 >;
};
10 changes: 10 additions & 0 deletions tests/subsys/fs/zms/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_STACK_SIZE=4096
CONFIG_STDOUT_CONSOLE=y

CONFIG_FLASH=y
CONFIG_FLASH_MAP=y

CONFIG_ZMS=y
CONFIG_LOG=y
CONFIG_ZMS_LOG_LEVEL_DBG=y
Loading

0 comments on commit 013a303

Please sign in to comment.