Lines Matching refs:test

50 ok(const char *test)  in ok()  argument
53 fprintf(stderr, "%s: OK\n", test); in ok()
57 fail(const char *test, const char *note) in fail() argument
60 fprintf(stderr, "%s - %s: FAIL (%s)\n", test, note, strerror(errno)); in fail()
65 failx(const char *test, const char *note) in failx() argument
68 fprintf(stderr, "%s - %s: FAIL\n", test, note); in failx()
73 ipdivert_create(const char *test) in ipdivert_create() argument
79 fail(test, "socket"); in ipdivert_create()
84 ipdivert_close(const char *test, int s) in ipdivert_close() argument
88 fail(test, "close"); in ipdivert_close()
92 ipdivert_bind(const char *test, int s, u_short port, int expect) in ipdivert_bind() argument
105 fail(test, "bind"); in ipdivert_bind()
107 fail(test, "bind"); in ipdivert_bind()
110 failx(test, "bind"); in ipdivert_bind()
117 const char *test; in main() local
123 test = "create_close"; in main()
124 s1 = ipdivert_create(test); in main()
125 ipdivert_close(test, s1); in main()
126 ok(test); in main()
131 test = "create_bind_close"; in main()
132 s1 = ipdivert_create(test); in main()
133 ipdivert_bind(test, s1, 1000, 0); in main()
134 ipdivert_close(test, s1); in main()
135 ok(test); in main()
141 test = "create2_bind2_close2"; in main()
142 s1 = ipdivert_create(test); in main()
143 s2 = ipdivert_create(test); in main()
144 ipdivert_bind(test, s1, 1000, 0); in main()
145 ipdivert_bind(test, s2, 1001, 0); in main()
146 ipdivert_close(test, s1); in main()
147 ipdivert_close(test, s2); in main()
148 ok(test); in main()
154 test = "create2_bind2_conflict_close2"; in main()
155 s1 = ipdivert_create(test); in main()
156 s2 = ipdivert_create(test); in main()
157 ipdivert_bind(test, s1, 1000, 0); in main()
158 ipdivert_bind(test, s2, 1000, EADDRINUSE); in main()
159 ipdivert_close(test, s1); in main()
160 ipdivert_close(test, s2); in main()
161 ok(test); in main()