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

Function test_stack_name_reuse

dpdk/app/test/test_stack.c:179–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179static int
180test_stack_name_reuse(uint32_t flags)
181{
182 struct rte_stack *s[2];
183
184 s[0] = rte_stack_create("test", STACK_SIZE, rte_socket_id(), flags);
185 if (s[0] == NULL) {
186 printf("[%s():%u] Failed to create a stack\n",
187 __func__, __LINE__);
188 return -1;
189 }
190
191 s[1] = rte_stack_create("test", STACK_SIZE, rte_socket_id(), flags);
192 if (s[1] != NULL) {
193 printf("[%s():%u] Failed to detect re-used name\n",
194 __func__, __LINE__);
195 return -1;
196 }
197
198 rte_stack_free(s[0]);
199
200 return 0;
201}
202
203static int
204test_stack_name_length(uint32_t flags)

Callers 1

__test_stackFunction · 0.85

Calls 4

rte_stack_createFunction · 0.85
rte_socket_idFunction · 0.85
rte_stack_freeFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected