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

Function test_dfs_close

components/dfs/utest/tc_dfs_api.c:146–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static void test_dfs_close(void)
147{
148 /* Flush the file before closing (DFSV1 only, DFSV2 does it in close) */
149#ifndef RT_USING_DFS_V2
150 dfs_file_flush(&fd);
151#endif
152
153 rt_err_t rst = dfs_file_close(&fd);
154 if (rst != 0)
155 {
156 rt_kprintf("test_dfs_close: close failed with result = %d\n", rst);
157 }
158 uassert_true(rst == 0);
159
160 /* Deinitialize the file structure after closing (DFSV2 only) */
161#ifdef RT_USING_DFS_V2
162 dfs_file_deinit(&fd);
163#endif
164}
165
166static void test_dfs_stat(void)
167{

Callers

nothing calls this directly

Calls 4

rt_kprintfFunction · 0.85
dfs_file_deinitFunction · 0.85
dfs_file_flushFunction · 0.50
dfs_file_closeFunction · 0.50

Tested by

no test coverage detected