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

Function test_stack_name_length

dpdk/app/test/test_stack.c:203–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203static int
204test_stack_name_length(uint32_t flags)
205{
206 char name[RTE_STACK_NAMESIZE + 1];
207 struct rte_stack *s;
208
209 memset(name, 's', sizeof(name));
210 name[RTE_STACK_NAMESIZE] = '\0';
211
212 s = rte_stack_create(name, STACK_SIZE, rte_socket_id(), flags);
213 if (s != NULL) {
214 printf("[%s():%u] Failed to prevent long name\n",
215 __func__, __LINE__);
216 return -1;
217 }
218
219 if (rte_errno != ENAMETOOLONG) {
220 printf("[%s():%u] rte_stack failed to set correct errno on failed lookup\n",
221 __func__, __LINE__);
222 return -1;
223 }
224
225 return 0;
226}
227
228static int
229test_lookup_null(void)

Callers 1

__test_stackFunction · 0.85

Calls 4

memsetFunction · 0.85
rte_stack_createFunction · 0.85
rte_socket_idFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected