MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / utest_tc_init

Function utest_tc_init

components/dfs/utest/tc_dfs_api.c:262–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262static rt_err_t utest_tc_init(void)
263{
264 /* Clean up any leftover test files from previous runs */
265 dfs_file_unlink(TEST_FILE);
266 dfs_file_unlink(TEST_RENAME_FILE);
267
268 /* Clear global fd structure */
269#ifdef RT_USING_DFS_V2
270 dfs_file_init(&fd);
271#else
272 rt_memset(&fd, 0, sizeof(fd));
273 fd.magic = DFS_FD_MAGIC;
274 fd.ref_count = 1;
275#endif
276
277 return RT_EOK;
278}
279
280static rt_err_t utest_tc_cleanup(void)
281{

Callers

nothing calls this directly

Calls 3

dfs_file_initFunction · 0.85
rt_memsetFunction · 0.85
dfs_file_unlinkFunction · 0.50

Tested by

no test coverage detected