mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-16 01:05:15 +08:00
[UTEST][SDIO] Add block device read and write test (#11758)
* [UTEST][SDIO] Add block device read and write test * [UTEST][SDIO] Fix change log author * [utest][sdio] Format block read and write test Align macros and continuation indentation using the current mainline configuration and clang-format 22.1.8. Validation: the mainline formatting check and git diff --check pass. Verified that all changes are whitespace-only.
This commit is contained in:
4 files changed
+438
No files matched your search
@@ -0,0 +1,50 @@
|
||||
menu "SDIO Test"
|
||||
|
||||
config RT_UTEST_SDIO
|
||||
bool "SDIO Block Read and Write Test"
|
||||
default n
|
||||
depends on RT_USING_SDIO
|
||||
help
|
||||
Verify SDIO block-device read and write paths with a real SD card.
|
||||
The test writes directly to the configured sectors and does not use
|
||||
DFS or format the card.
|
||||
|
||||
if RT_UTEST_SDIO
|
||||
|
||||
config RT_SDIO_UTEST_DEVICE_NAME
|
||||
string "SDIO block device name"
|
||||
default "sd0"
|
||||
help
|
||||
Block device used by the test, for example sd0 or sd0p0.
|
||||
|
||||
config RT_SDIO_UTEST_START_SECTOR
|
||||
hex "SDIO test start sector"
|
||||
default 0x0
|
||||
help
|
||||
First sector used by the test. Existing data in the selected sectors
|
||||
will be overwritten.
|
||||
|
||||
config RT_SDIO_UTEST_SECTOR_COUNT
|
||||
int "SDIO test sector count"
|
||||
range 1 128
|
||||
default 8
|
||||
help
|
||||
Number of contiguous sectors used by each transfer.
|
||||
|
||||
config RT_SDIO_UTEST_LOOP_COUNT
|
||||
int "SDIO test loop count"
|
||||
range 1 100
|
||||
default 3
|
||||
help
|
||||
Number of write/read verification loops at each test location.
|
||||
|
||||
config RT_SDIO_UTEST_DEVICE_WAIT_MS
|
||||
int "SDIO device wait time"
|
||||
range 0 60000
|
||||
default 3000
|
||||
help
|
||||
Time to wait for the SDIO block device to appear before failing.
|
||||
|
||||
endif
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,15 @@
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = []
|
||||
CPPPATH = [cwd, cwd + '/../../include']
|
||||
|
||||
if GetDepend('RT_UTEST_SDIO'):
|
||||
src += Glob('*.c')
|
||||
|
||||
group = DefineGroup('utestcases', src,
|
||||
depend = ['RT_USING_UTESTCASES', 'RT_USING_SDIO'],
|
||||
CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
File diff suppressed because it is too large.
Load diff
@@ -20,6 +20,7 @@ menu "RT-Thread Utestcases"
|
||||
rsource "../../../components/drivers/pin/utest/Kconfig"
|
||||
rsource "../../../components/drivers/rtc/utest/Kconfig"
|
||||
rsource "../../../components/drivers/serial/utest/Kconfig"
|
||||
rsource "../../../components/drivers/sdio/utest/Kconfig"
|
||||
rsource "../../../components/drivers/smp_call/utest/Kconfig"
|
||||
rsource "../../../components/drivers/spi/utest/Kconfig"
|
||||
rsource "../../../components/drivers/watchdog/utest/Kconfig"
|
||||
|
||||
Reference in new issue
Block a user