tests/flash_disk: Expand scenarios to cover no erase device

The commit adds overlay for native_posix and modifies testcase.yaml
to allow testing CONFIG_DISK_DRIVER_FLASH with device that
do not have erase requirement.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
Dominik Ermel 2024-04-08 16:13:28 +02:00 committed by Henrik Brix Andersen
commit d7a4b634f2
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,32 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&flashcontroller0 {
reg = <0x00000000 DT_SIZE_K(1024)>;
};
&flash0 {
reg = <0x00000000 DT_SIZE_K(1024)>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
flashdisk_partition: partition@0 {
label = "flashdisk";
reg = <0x00000000 0x00100000>;
};
};
};
/ {
test_disk: storage_disk {
compatible = "zephyr,flash-disk";
partition = <&flashdisk_partition>;
disk-name = "NAND";
cache-size = <512>;
};
};

View file

@ -36,3 +36,11 @@ tests:
- native_sim
drivers.disk.stm32_sdhc:
filter: dt_compat_enabled("st,stm32-sdmmc")
drivers.disk.simulator.no_explicit_erase:
extra_args: DTC_OVERLAY_FILE=boards/native_posix_no_explicit_erase.overlay
extra_configs:
- CONFIG_DISK_DRIVER_FLASH=y
- CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE=n
platform_allow:
- native_posix/native/64
- native_posix