Lines Matching refs:test_cases
61 } test_cases[] = { variable
81 int TST_TOTAL = ARRAY_SIZE(test_cases);
98 if (test_cases[i].setup != NULL) in main()
99 test_cases[i].setup(i); in main()
101 TEST(getpeername(test_cases[i].sockfd, in main()
102 test_cases[i].sockaddr, in main()
103 test_cases[i].addrlen)); in main()
105 if (TEST_RETURN == test_cases[i].expretval && in main()
106 TEST_ERRNO == test_cases[i].experrno) { in main()
109 test_cases[i].name); in main()
114 "(expected %d)", test_cases[i].name, in main()
115 TEST_RETURN, test_cases[i].expretval, in main()
116 TEST_ERRNO, test_cases[i].experrno); in main()
119 if (test_cases[i].cleanup != NULL) in main()
120 test_cases[i].cleanup(i); in main()
146 test_cases[i].sockfd = SAFE_OPEN(cleanup, "/dev/null", O_WRONLY, 0666); in setup2()
151 test_cases[i].sockfd = socket(PF_INET, SOCK_STREAM, 0); in setup3()
152 if (test_cases[i].sockfd < 0) { in setup3()
156 SAFE_BIND(cleanup, test_cases[i].sockfd, in setup3()
166 test_cases[i].sockfd = sv[0]; in setup4()
171 SAFE_CLOSE(cleanup, test_cases[i].sockfd); in cleanup2()