Lines Matching refs:test
173 static int test_str(void *buf, size_t len, const struct test_cfg *test,
183 if (test->type == UDP)
187 if (test->conn == UNKNOWN_CONN)
191 if (test->hops == ONE_HOP)
195 if (test->result == FORWARD)
199 if (test->flags == SYN)
201 else if (test->flags == ACK)
244 static size_t build_input(const struct test_cfg *test, void *const buf,
261 encap_init(&encap, test->hops == ONE_HOP ? 1 : 0, proto);
264 if (test->hops == ONE_HOP) {
270 if (test->type == UDP)
299 if (test->conn == UNKNOWN_CONN)
302 switch (test->type) {
308 if (test->flags == SYN)
310 if (test->flags == ACK)
368 struct test_cfg *test = &tests[i];
371 struct tuple *tuple = &tuples[test->type][j];
375 test_str(tmp, sizeof(tmp), test, tuple->family);
383 tattr.data_size_in = build_input(test, input, tuple);
397 switch (test->result) {
407 PRINT_FAIL("unknown result %d\n", test->result);