Lines Matching +full:include +full:- +full:dirs
4 * SPDX-License-Identifier: Apache-2.0
7 #include <zephyr/ztest.h>
8 #include <zephyr/fs/fs.h>
9 #include <zephyr/fs/ext2.h>
10 #include "utils.h"
18 mp->flags |= FS_MOUNT_FLAG_NO_FORMAT; in ZTEST()
23 /* Test FS_MOUNT_FLAG_READ_ONLY on non-formatted volume*/ in ZTEST()
24 mp->flags = FS_MOUNT_FLAG_READ_ONLY; in ZTEST()
29 /* Format volume and add some files/dirs to check read-only flag */ in ZTEST()
30 mp->flags = 0; in ZTEST()
40 mp->flags = FS_MOUNT_FLAG_READ_ONLY; in ZTEST()
41 TC_PRINT("Mount as read-only\n"); in ZTEST()
54 size_t partition_size = MIN(0x800000, get_partition_size((uintptr_t)mp->storage_dev)); in ZTEST()
56 mp->flags = 0; in ZTEST()
60 ret = fs_statvfs(mp->mnt_point, &sbuf); in ZTEST()
92 fs_mkfs_dev_id = (uintptr_t) mp->storage_dev; in ZTEST()
102 size_t partition_size = MIN(cfg->fs_size, get_partition_size((uintptr_t)mp->storage_dev)); in mkfs_custom_config()
104 ret = fs_mkfs(FS_EXT2, (uintptr_t)mp->storage_dev, cfg, 0); in mkfs_custom_config()
107 mp->flags = FS_MOUNT_FLAG_NO_FORMAT; in mkfs_custom_config()
111 ret = fs_statvfs(mp->mnt_point, &sbuf); in mkfs_custom_config()
117 zassert_equal(sbuf.f_bsize, cfg->block_size, in mkfs_custom_config()
118 "Wrong block size %lu (expected %lu)", sbuf.f_bsize, cfg->block_size); in mkfs_custom_config()
119 zassert_equal(sbuf.f_frsize, cfg->block_size, in mkfs_custom_config()
120 "Wrong frag size %lu (expected %lu)", sbuf.f_frsize, cfg->block_size); in mkfs_custom_config()
121 zassert_equal(sbuf.f_blocks, partition_size / cfg->block_size, in mkfs_custom_config()
123 sbuf.f_blocks, partition_size / cfg->block_size); in mkfs_custom_config()