| 201 | } |
| 202 | |
| 203 | static int |
| 204 | test_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 | |
| 228 | static int |
| 229 | test_lookup_null(void) |
no test coverage detected