| 226 | } |
| 227 | |
| 228 | static int |
| 229 | test_lookup_null(void) |
| 230 | { |
| 231 | struct rte_stack *s = rte_stack_lookup("stack_not_found"); |
| 232 | |
| 233 | if (s != NULL) { |
| 234 | printf("[%s():%u] rte_stack found a non-existent stack\n", |
| 235 | __func__, __LINE__); |
| 236 | return -1; |
| 237 | } |
| 238 | |
| 239 | if (rte_errno != ENOENT) { |
| 240 | printf("[%s():%u] rte_stack failed to set correct errno on failed lookup\n", |
| 241 | __func__, __LINE__); |
| 242 | return -1; |
| 243 | } |
| 244 | |
| 245 | s = rte_stack_lookup(NULL); |
| 246 | |
| 247 | if (s != NULL) { |
| 248 | printf("[%s():%u] rte_stack found a non-existent stack\n", |
| 249 | __func__, __LINE__); |
| 250 | return -1; |
| 251 | } |
| 252 | |
| 253 | if (rte_errno != EINVAL) { |
| 254 | printf("[%s():%u] rte_stack failed to set correct errno on failed lookup\n", |
| 255 | __func__, __LINE__); |
| 256 | return -1; |
| 257 | } |
| 258 | |
| 259 | return 0; |
| 260 | } |
| 261 | |
| 262 | static int |
| 263 | test_free_null(void) |
no test coverage detected