zephyr/tests/subsys/fs/fat_fs_api
Quy Tran d74020160f tests: subsys: fs: Support tests/subsys/fs on RA8 boards
Add overlay property node and configs to support tests/subsys/fs/ext2,
tests/fs/fat_fs_api and tests/subsys/sd on RA8 boards

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
..
boards tests: subsys: fs: Support tests/subsys/fs on RA8 boards 2024-12-25 06:33:12 +01:00
src drivers: disk: mmc_subsys: remove CONFIG_MMC_VOLUME_NAME 2024-11-05 15:25:10 -06:00
CMakeLists.txt
prj.conf tests: fs: fat_fs_api: add timestamp integration 2024-10-11 13:20:08 -04:00
prj_lfn.conf tests: fs: fat_fs_api: add timestamp integration 2024-10-11 13:20:08 -04:00
prj_mmc.conf drivers: disk: mmc_subsys: remove CONFIG_MMC_VOLUME_NAME 2024-11-05 15:25:10 -06:00
prj_native_ram.conf tests: fs: fat_fs_api: disable flash disk in RAM test 2024-07-27 15:19:14 +03:00
prj_sdmmc.conf tests: fs: fat_fs_api: add support for testing SDMMC devices 2024-08-20 10:30:41 +02:00
ramdisk.overlay
README.txt
testcase.yaml tests: fs: fat_fs_api: add support for testing SDMMC devices 2024-08-20 10:30:41 +02:00

Title: Zephyr File System Demo

Description:

Demonstrates basic file and dir operations using the Zephyr file system.
--------------------------------------------------------------------------------

Building and Running Project:

The demo will run on native_sim using the flash simulator.

       mkdir build; cd build
       cmake -DBOARD=native_sim ..
       make run

To test fatfs on MMC, add this cmake option to your build command:
	-DCONF_FILE=prj_mmc.conf
--------------------------------------------------------------------------------

Sample Output:

***** BOOTING ZEPHYR OS v1.6.99 - BUILD: Feb  8 2017 07:33:07 *****
Running test suite fat_fs_basic_test
tc_start() - test_fat_file

Open tests:
Creating new file testfile.txt
Opened file testfile.txt

Write tests:
Data written:"hello world!"

Data successfully written!

Sync tests:

Read tests:
Data read:"hello world!"

Data read matches data written

Truncate tests:

Testing shrink to 0 size
Testing write after truncating

Write tests:
Data written:"hello world!"

Data successfully written!
Original size of file = 12

Testing shrinking
File size after shrinking by 5 bytes = 7

Testing expanding
File size after expanding by 10 bytes = 17
Testing for zeroes in expanded region

Close tests:
Closed file testfile.txt

Delete tests:
File (testfile.txt) deleted successfully!
===================================================================
PASS - test_fat_file.
tc_start() - test_fat_dir

mkdir tests:
Creating new dir testdir

Write tests:
Data written:"hello world!"

Data successfully written!
Created dir testdir!

lsdir tests:

Listing dir /:
[DIR ] FATFILE
[FILE] TEST.C (size = 10)
[DIR ] TESTDIR
[DIR ] 1

lsdir tests:

Listing dir testdir:
[FILE] TESTFILE.TXT (size = 12)

rmdir tests:

Removing testdir/TESTFILE.TXT
Removed dir testdir!

lsdir tests:

Listing dir /:
[DIR ] FATFILE
[FILE] TEST.C (size = 10)
[DIR ] 1

===================================================================
PASS - test_fat_dir.
tc_start() - test_fat_fs

Optimal transfer block size   = 512
Allocation unit size          = 1024
Volume size in f_frsize units = 2028
Free space in f_frsize units  = 2025
===================================================================
PASS - test_fat_fs.
===================================================================
PROJECT EXECUTION SUCCESSFUL