Lines Matching refs:test
38 /* Expected test result */
480 static int run_test_case(int cgfd, const struct sock_test *test)
486 printf("Test case: %s .. ", test->descr);
487 progfd = load_sock_prog(test->insns, test->expected_attach_type);
489 if (test->result == LOAD_REJECT)
495 if (attach_sock_prog(cgfd, progfd, test->attach_type) < 0) {
496 if (test->result == ATTACH_REJECT)
502 res = bind_sock(test->domain, test->type, test->ip, test->port,
503 test->port_retry);
504 if (res > 0 && test->result == res)
512 bpf_prog_detach(cgfd, test->attach_type);