MCPcopy Create free account
hub / github.com/F-Stack/f-stack / autotest_setup

Function autotest_setup

dpdk/app/test/test_fbarray.c:32–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#define FBARRAY_TEST_ELT_SZ (sizeof(int))
31
32static int autotest_setup(void)
33{
34 int ret;
35
36 ret = rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,
37 FBARRAY_TEST_LEN, FBARRAY_TEST_ELT_SZ);
38 if (ret) {
39 printf("Failed to initialize test array\n");
40 return -1;
41 }
42 ret = rte_fbarray_init(&unaligned.arr, FBARRAY_UNALIGNED_TEST_ARR_NAME,
43 FBARRAY_UNALIGNED_TEST_LEN, FBARRAY_TEST_ELT_SZ);
44 if (ret) {
45 printf("Failed to initialize unaligned test array\n");
46 rte_fbarray_destroy(&param.arr);
47 return -1;
48 }
49 return 0;
50}
51
52static void autotest_teardown(void)
53{

Callers

nothing calls this directly

Calls 3

rte_fbarray_initFunction · 0.85
rte_fbarray_destroyFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected