VSF Documented
Macros | Functions
vsf_test_port_file.h File Reference

Go to the source code of this file.

Macros

#define VSF_TEST_DATA_FILE_PATH   "/root/test_data.bin"
 默认测试数据文件路径
 

Functions

void vsf_test_file_data_init (vsf_test_data_t *data)
 Initialize the file for data synchronization.
 
void vsf_test_file_data_sync (vsf_test_data_t *data, vsf_test_data_cmd_t cmd)
 Synchronize data via standard file interface (fopen, fread, fwrite, fclose).
 
bool vsf_test_file_read_case_result (uint32_t idx, uint32_t *result, char *name, size_t name_size)
 Read test case result and name from file.
 

Macro Definition Documentation

◆ VSF_TEST_DATA_FILE_PATH

#define VSF_TEST_DATA_FILE_PATH   "/root/test_data.bin"

默认测试数据文件路径

Function Documentation

◆ vsf_test_file_data_init()

void vsf_test_file_data_init ( vsf_test_data_t data)
extern

Initialize the file for data synchronization.

Parameters
[in]dataa pointer to structure vsf_test_data_t
Note
Its default implementation is an empty weak function, which the user can re-implement as needed. After initialization, we need to make sure that file operations can be used properly.

◆ vsf_test_file_data_sync()

void vsf_test_file_data_sync ( vsf_test_data_t data,
vsf_test_data_cmd_t  cmd 
)
extern

Synchronize data via standard file interface (fopen, fread, fwrite, fclose).

Parameters
[in]dataa pointer to structure vsf_test_data_t
[in]cmdstructure vsf_test_data_cmd_t
Note
This is a synchronized blocking API using file I/O.

◆ vsf_test_file_read_case_result()

bool vsf_test_file_read_case_result ( uint32_t  idx,
uint32_t result,
char *  name,
size_t  name_size 
)
extern

Read test case result and name from file.

Parameters
[in]idxtest case index
[out]resulttest result
[out]nametest case name buffer (can be NULL)
[in]name_sizesize of name buffer
Returns
true if found, false otherwise

Read test case result and name from file.

Generated from commit: vsfteam/vsf@b2e9e8a