Skip to content

Commit 41f3f08

Browse files
author
Ajay Neeli
committed
tests: drivers: disk: Add UFS to disk_access tests
Extend disk_access test suite to support UFS disk driver. Signed-off-by: Ajay Neeli <[email protected]>
1 parent de62782 commit 41f3f08

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/drivers/disk/disk_access/src/main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#define DISK_NAME_PHYS "NAND"
2929
#elif defined(CONFIG_NVME)
3030
#define DISK_NAME_PHYS "nvme0n0"
31+
#elif defined(CONFIG_DISK_DRIVER_UFS)
32+
#define DISK_NAME_PHYS "UFS"
3133
#elif defined(CONFIG_DISK_DRIVER_RAM)
3234
/* Since ramdisk is enabled by default on e.g. qemu boards, it needs to be checked last to not
3335
* override other backends.
@@ -43,8 +45,8 @@
4345
#define DISK_NAME DISK_NAME_PHYS
4446
#endif
4547

46-
/* Assume the largest sector we will encounter is 512 bytes */
47-
#define SECTOR_SIZE 512
48+
/* Assume the largest sector we will encounter is 4096 bytes */
49+
#define SECTOR_SIZE 4096
4850

4951
/* Sector counts to read */
5052
#define SECTOR_COUNT1 8

tests/drivers/disk/disk_access/testcase.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ tests:
4545
platform_allow:
4646
- native_sim/native/64
4747
- native_sim
48+
drivers.disk.ufs:
49+
filter: dt_compat_enabled("zephyr,ufs-disk")

0 commit comments

Comments
 (0)