Lines Matching full:file
18 * File system should be mounted before tests are started.
25 struct fs_file_t file; in create_write_hello() local
27 fs_file_t_init(&file); in create_write_hello()
28 TC_PRINT("creating and writing file\n"); in create_write_hello()
30 zassert_equal(fs_open(&file, in create_write_hello()
45 "stat new hello not file"); in create_write_hello()
50 zassert_equal(testfs_write_incrementing(&file, 0, TESTFS_BUFFER_SIZE), in create_write_hello()
59 "stat written hello not file"); in create_write_hello()
64 /* VARIATION POINT: littlefs does not update the file size of in create_write_hello()
65 * an open file. See upstream issue #250. in create_write_hello()
71 zassert_equal(fs_close(&file), 0, in create_write_hello()
79 "stat closed hello not file"); in create_write_hello()
90 struct fs_file_t file; in verify_hello() local
92 fs_file_t_init(&file); in verify_hello()
93 TC_PRINT("opening and verifying file\n"); in verify_hello()
95 zassert_equal(fs_open(&file, in verify_hello()
103 zassert_equal(fs_tell(&file), 0U, in verify_hello()
106 zassert_equal(testfs_verify_incrementing(&file, 0, TESTFS_BUFFER_SIZE), in verify_hello()
110 zassert_equal(fs_tell(&file), TESTFS_BUFFER_SIZE, in verify_hello()
113 zassert_equal(fs_close(&file), 0, in verify_hello()
122 struct fs_file_t file; in seek_within_hello() local
124 fs_file_t_init(&file); in seek_within_hello()
125 TC_PRINT("seek and tell in file\n"); in seek_within_hello()
127 zassert_equal(fs_open(&file, in seek_within_hello()
135 zassert_equal(fs_tell(&file), 0U, in seek_within_hello()
148 zassert_equal(fs_seek(&file, pos, FS_SEEK_SET), in seek_within_hello()
152 zassert_equal(fs_tell(&file), pos, in seek_within_hello()
155 zassert_equal(testfs_verify_incrementing(&file, pos, TESTFS_BUFFER_SIZE), in seek_within_hello()
159 zassert_equal(fs_tell(&file), stat.size, in seek_within_hello()
162 zassert_equal(fs_seek(&file, -stat.size, FS_SEEK_CUR), in seek_within_hello()
166 zassert_equal(fs_tell(&file), 0U, in seek_within_hello()
169 zassert_equal(fs_seek(&file, -pos, FS_SEEK_END), in seek_within_hello()
173 zassert_equal(fs_tell(&file), stat.size - pos, in seek_within_hello()
176 zassert_equal(testfs_verify_incrementing(&file, stat.size - pos, in seek_within_hello()
181 zassert_equal(fs_close(&file), 0, in seek_within_hello()
190 struct fs_file_t file; in truncate_hello() local
192 fs_file_t_init(&file); in truncate_hello()
193 TC_PRINT("truncate in file\n"); in truncate_hello()
195 zassert_equal(fs_open(&file, in truncate_hello()
213 zassert_equal(fs_tell(&file), 0U, in truncate_hello()
216 zassert_equal(fs_truncate(&file, pos), in truncate_hello()
220 zassert_equal(fs_tell(&file), 0U, in truncate_hello()
229 /* VARIATION POINT: littlefs does not update the file size of in truncate_hello()
230 * an open file. See upstream issue #250. in truncate_hello()
236 zassert_equal(testfs_verify_incrementing(&file, 0, 64), in truncate_hello()
240 zassert_equal(fs_close(&file), 0, in truncate_hello()
281 struct fs_file_t file; in sync_goodbye() local
283 fs_file_t_init(&file); in sync_goodbye()
286 zassert_equal(fs_open(&file, in sync_goodbye()
302 zassert_equal(testfs_write_incrementing(&file, 0, TESTFS_BUFFER_SIZE), in sync_goodbye()
306 zassert_equal(fs_tell(&file), TESTFS_BUFFER_SIZE, in sync_goodbye()
315 zassert_equal(fs_sync(&file), 0, in sync_goodbye()
318 zassert_equal(fs_tell(&file), TESTFS_BUFFER_SIZE, in sync_goodbye()
329 zassert_equal(fs_close(&file), 0, in sync_goodbye()
345 struct fs_file_t file; in verify_goodbye() local
347 fs_file_t_init(&file); in verify_goodbye()
350 zassert_equal(fs_open(&file, in verify_goodbye()
358 zassert_equal(testfs_verify_incrementing(&file, 0, TESTFS_BUFFER_SIZE), in verify_goodbye()
362 zassert_equal(fs_close(&file), 0, in verify_goodbye()