1 /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to
5 * deal in the Software without restriction, including without limitation the
6 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 * sell copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 TEST_DECLARE (platform_output)
23 TEST_DECLARE (callback_order)
24 TEST_DECLARE (run_once)
25 TEST_DECLARE (run_nowait)
26 TEST_DECLARE (loop_stop)
27 TEST_DECLARE (barrier_1)
28 TEST_DECLARE (barrier_2)
29 TEST_DECLARE (barrier_3)
30 TEST_DECLARE (condvar_1)
31 TEST_DECLARE (condvar_2)
32 TEST_DECLARE (condvar_3)
33 TEST_DECLARE (condvar_4)
34 TEST_DECLARE (condvar_5)
35 TEST_DECLARE (semaphore_1)
36 TEST_DECLARE (semaphore_2)
37 TEST_DECLARE (semaphore_3)
39 TEST_DECLARE (stdio_over_pipes)
40 TEST_DECLARE (ipc_listen_before_write)
41 TEST_DECLARE (ipc_listen_after_write)
43 TEST_DECLARE (ipc_send_recv_pipe)
45 TEST_DECLARE (ipc_send_recv_tcp)
46 TEST_DECLARE (ipc_tcp_connection)
47 TEST_DECLARE (tcp_ping_pong)
48 TEST_DECLARE (tcp_ping_pong_v6)
49 TEST_DECLARE (pipe_ping_pong)
50 TEST_DECLARE (delayed_accept)
51 TEST_DECLARE (multiple_listen)
52 TEST_DECLARE (tcp_writealot)
53 TEST_DECLARE (tcp_open)
54 TEST_DECLARE (tcp_connect_error_after_write)
55 TEST_DECLARE (tcp_shutdown_after_write)
56 TEST_DECLARE (tcp_bind_error_addrinuse)
57 TEST_DECLARE (tcp_bind_error_addrnotavail_1)
58 TEST_DECLARE (tcp_bind_error_addrnotavail_2)
59 TEST_DECLARE (tcp_bind_error_fault)
60 TEST_DECLARE (tcp_bind_error_inval)
61 TEST_DECLARE (tcp_bind_localhost_ok)
62 TEST_DECLARE (tcp_listen_without_bind)
63 TEST_DECLARE (tcp_connect_error_fault)
64 TEST_DECLARE (tcp_connect_timeout)
65 TEST_DECLARE (tcp_close_while_connecting)
66 TEST_DECLARE (tcp_close)
67 TEST_DECLARE (tcp_close_accept)
68 TEST_DECLARE (tcp_flags)
69 TEST_DECLARE (tcp_write_to_half_open_connection)
70 TEST_DECLARE (tcp_unexpected_read)
71 TEST_DECLARE (tcp_read_stop)
72 TEST_DECLARE (tcp_bind6_error_addrinuse)
73 TEST_DECLARE (tcp_bind6_error_addrnotavail)
74 TEST_DECLARE (tcp_bind6_error_fault)
75 TEST_DECLARE (tcp_bind6_error_inval)
76 TEST_DECLARE (tcp_bind6_localhost_ok)
77 TEST_DECLARE (udp_send_and_recv)
78 TEST_DECLARE (udp_multicast_join)
79 TEST_DECLARE (udp_multicast_ttl)
80 TEST_DECLARE (udp_dgram_too_big)
81 TEST_DECLARE (udp_dual_stack)
82 TEST_DECLARE (udp_ipv6_only)
83 TEST_DECLARE (udp_options)
84 TEST_DECLARE (udp_open)
85 TEST_DECLARE (pipe_bind_error_addrinuse)
86 TEST_DECLARE (pipe_bind_error_addrnotavail)
87 TEST_DECLARE (pipe_bind_error_inval)
88 TEST_DECLARE (pipe_listen_without_bind)
89 TEST_DECLARE (pipe_connect_bad_name)
90 TEST_DECLARE (pipe_connect_to_file)
91 TEST_DECLARE (connection_fail)
92 TEST_DECLARE (connection_fail_doesnt_auto_close)
93 TEST_DECLARE (shutdown_close_tcp)
94 TEST_DECLARE (shutdown_close_pipe)
95 TEST_DECLARE (shutdown_eof)
96 TEST_DECLARE (callback_stack)
97 TEST_DECLARE (error_message)
99 TEST_DECLARE (timer_init)
100 TEST_DECLARE (timer_again)
101 TEST_DECLARE (timer_start_twice)
102 TEST_DECLARE (timer_order)
103 TEST_DECLARE (timer_huge_timeout)
104 TEST_DECLARE (timer_huge_repeat)
105 TEST_DECLARE (timer_from_check)
106 TEST_DECLARE (idle_starvation)
107 TEST_DECLARE (loop_handles)
108 TEST_DECLARE (get_loadavg)
109 TEST_DECLARE (walk_handles)
110 TEST_DECLARE (watcher_cross_stop)
112 TEST_DECLARE (idle_ref)
113 TEST_DECLARE (async_ref)
114 TEST_DECLARE (prepare_ref)
115 TEST_DECLARE (check_ref)
116 TEST_DECLARE (unref_in_prepare_cb)
117 TEST_DECLARE (timer_ref)
118 TEST_DECLARE (timer_ref2)
119 TEST_DECLARE (fs_event_ref)
120 TEST_DECLARE (fs_poll_ref)
121 TEST_DECLARE (tcp_ref)
122 TEST_DECLARE (tcp_ref2)
123 TEST_DECLARE (tcp_ref2b)
124 TEST_DECLARE (tcp_ref3)
125 TEST_DECLARE (tcp_ref4)
126 TEST_DECLARE (udp_ref)
127 TEST_DECLARE (udp_ref2)
128 TEST_DECLARE (udp_ref3)
129 TEST_DECLARE (pipe_ref)
130 TEST_DECLARE (pipe_ref2)
131 TEST_DECLARE (pipe_ref3)
132 TEST_DECLARE (pipe_ref4)
133 TEST_DECLARE (process_ref)
134 TEST_DECLARE (active)
137 TEST_DECLARE (get_currentexe)
138 TEST_DECLARE (process_title)
139 TEST_DECLARE (cwd_and_chdir)
140 TEST_DECLARE (get_memory)
141 TEST_DECLARE (hrtime)
142 TEST_DECLARE (getaddrinfo_basic)
143 TEST_DECLARE (getaddrinfo_concurrent)
144 TEST_DECLARE (getsockname_tcp)
145 TEST_DECLARE (getsockname_udp)
146 TEST_DECLARE (fail_always)
147 TEST_DECLARE (pass_always)
148 TEST_DECLARE (spawn_fails)
149 TEST_DECLARE (spawn_exit_code)
150 TEST_DECLARE (spawn_stdout)
151 TEST_DECLARE (spawn_stdin)
152 TEST_DECLARE (spawn_stdio_greater_than_3)
153 TEST_DECLARE (spawn_ignored_stdio)
154 TEST_DECLARE (spawn_and_kill)
155 TEST_DECLARE (spawn_detached)
156 TEST_DECLARE (spawn_and_kill_with_std)
157 TEST_DECLARE (spawn_and_ping)
158 TEST_DECLARE (spawn_preserve_env)
159 TEST_DECLARE (spawn_setuid_fails)
160 TEST_DECLARE (spawn_setgid_fails)
161 TEST_DECLARE (spawn_stdout_to_file)
162 TEST_DECLARE (spawn_auto_unref)
163 TEST_DECLARE (fs_poll)
165 TEST_DECLARE (fs_file_noent)
166 TEST_DECLARE (fs_file_nametoolong)
167 TEST_DECLARE (fs_file_loop)
168 TEST_DECLARE (fs_file_async)
169 TEST_DECLARE (fs_file_sync)
170 TEST_DECLARE (fs_async_dir)
171 TEST_DECLARE (fs_async_sendfile)
172 TEST_DECLARE (fs_fstat)
173 TEST_DECLARE (fs_chmod)
174 TEST_DECLARE (fs_chown)
175 TEST_DECLARE (fs_link)
176 TEST_DECLARE (fs_readlink)
177 TEST_DECLARE (fs_symlink)
178 TEST_DECLARE (fs_symlink_dir)
179 TEST_DECLARE (fs_utime)
180 TEST_DECLARE (fs_futime)
181 TEST_DECLARE (fs_file_open_append)
182 TEST_DECLARE (fs_stat_missing_path)
183 TEST_DECLARE (fs_read_file_eof)
184 TEST_DECLARE (fs_event_watch_dir)
185 TEST_DECLARE (fs_event_watch_file)
186 TEST_DECLARE (fs_event_watch_file_twice)
187 TEST_DECLARE (fs_event_watch_file_current_dir)
188 TEST_DECLARE (fs_event_no_callback_after_close)
189 TEST_DECLARE (fs_event_no_callback_on_close)
190 TEST_DECLARE (fs_event_immediate_close)
191 TEST_DECLARE (fs_event_close_with_pending_event)
192 TEST_DECLARE (fs_event_close_in_callback)
193 TEST_DECLARE (fs_readdir_empty_dir)
194 TEST_DECLARE (fs_readdir_file)
195 TEST_DECLARE (fs_open_dir)
196 TEST_DECLARE (fs_rename_to_existing_file)
197 TEST_DECLARE (threadpool_queue_work_simple)
198 TEST_DECLARE (threadpool_queue_work_einval)
199 TEST_DECLARE (threadpool_multiple_event_loops)
200 TEST_DECLARE (threadpool_cancel_getaddrinfo)
201 TEST_DECLARE (threadpool_cancel_work)
202 TEST_DECLARE (threadpool_cancel_fs)
203 TEST_DECLARE (threadpool_cancel_single)
204 TEST_DECLARE (thread_mutex)
205 TEST_DECLARE (thread_rwlock)
206 TEST_DECLARE (thread_create)
207 TEST_DECLARE (strlcpy)
208 TEST_DECLARE (strlcat)
209 TEST_DECLARE (dlerror)
210 TEST_DECLARE (poll_duplex)
211 TEST_DECLARE (poll_unidirectional)
212 TEST_DECLARE (poll_close)
214 TEST_DECLARE (spawn_detect_pipe_name_collisions_on_windows)
215 TEST_DECLARE (argument_escaping)
216 TEST_DECLARE (environment_creation)
217 TEST_DECLARE (listen_with_simultaneous_accepts)
218 TEST_DECLARE (listen_no_simultaneous_accepts)
219 TEST_DECLARE (fs_stat_root)
221 TEST_DECLARE (spawn_setuid_setgid)
222 TEST_DECLARE (we_get_signal)
223 TEST_DECLARE (we_get_signals)
224 TEST_DECLARE (signal_multiple_loops)
227 TEST_DECLARE (osx_select)
229 HELPER_DECLARE (tcp4_echo_server)
230 HELPER_DECLARE (tcp6_echo_server)
231 HELPER_DECLARE (udp4_echo_server)
232 HELPER_DECLARE (pipe_echo_server)
236 TEST_OUTPUT_ENTRY (platform_output)
239 TEST_ENTRY (callback_order)
241 TEST_ENTRY (run_once)
242 TEST_ENTRY (run_nowait)
243 TEST_ENTRY (loop_stop)
244 TEST_ENTRY (barrier_1)
245 TEST_ENTRY (barrier_2)
246 TEST_ENTRY (barrier_3)
247 TEST_ENTRY (condvar_1)
248 TEST_ENTRY (condvar_2)
249 TEST_ENTRY (condvar_3)
250 TEST_ENTRY (condvar_4)
251 TEST_ENTRY (condvar_5)
252 TEST_ENTRY (semaphore_1)
253 TEST_ENTRY (semaphore_2)
254 TEST_ENTRY (semaphore_3)
256 TEST_ENTRY (pipe_connect_bad_name)
257 TEST_ENTRY (pipe_connect_to_file)
260 TEST_ENTRY (stdio_over_pipes)
261 TEST_ENTRY (ipc_listen_before_write)
262 TEST_ENTRY (ipc_listen_after_write)
264 TEST_ENTRY (ipc_send_recv_pipe)
266 TEST_ENTRY (ipc_send_recv_tcp)
267 TEST_ENTRY (ipc_tcp_connection)
269 TEST_ENTRY (tcp_ping_pong)
270 TEST_HELPER (tcp_ping_pong, tcp4_echo_server)
272 TEST_ENTRY (tcp_ping_pong_v6)
273 TEST_HELPER (tcp_ping_pong_v6, tcp6_echo_server)
275 TEST_ENTRY (pipe_ping_pong)
276 TEST_HELPER (pipe_ping_pong, pipe_echo_server)
278 TEST_ENTRY (delayed_accept)
279 TEST_ENTRY (multiple_listen)
281 TEST_ENTRY (tcp_writealot)
282 TEST_HELPER (tcp_writealot, tcp4_echo_server)
284 TEST_ENTRY (tcp_open)
285 TEST_HELPER (tcp_open, tcp4_echo_server)
287 TEST_ENTRY (tcp_shutdown_after_write)
288 TEST_HELPER (tcp_shutdown_after_write, tcp4_echo_server)
290 TEST_ENTRY (tcp_connect_error_after_write)
291 TEST_ENTRY (tcp_bind_error_addrinuse)
292 TEST_ENTRY (tcp_bind_error_addrnotavail_1)
293 TEST_ENTRY (tcp_bind_error_addrnotavail_2)
294 TEST_ENTRY (tcp_bind_error_fault)
295 TEST_ENTRY (tcp_bind_error_inval)
296 TEST_ENTRY (tcp_bind_localhost_ok)
297 TEST_ENTRY (tcp_listen_without_bind)
298 TEST_ENTRY (tcp_connect_error_fault)
299 TEST_ENTRY (tcp_connect_timeout)
300 TEST_ENTRY (tcp_close_while_connecting)
301 TEST_ENTRY (tcp_close)
302 TEST_ENTRY (tcp_close_accept)
303 TEST_ENTRY (tcp_flags)
304 TEST_ENTRY (tcp_write_to_half_open_connection)
305 TEST_ENTRY (tcp_unexpected_read)
307 TEST_ENTRY (tcp_read_stop)
308 TEST_HELPER (tcp_read_stop, tcp4_echo_server)
310 TEST_ENTRY (tcp_bind6_error_addrinuse)
311 TEST_ENTRY (tcp_bind6_error_addrnotavail)
312 TEST_ENTRY (tcp_bind6_error_fault)
313 TEST_ENTRY (tcp_bind6_error_inval)
314 TEST_ENTRY (tcp_bind6_localhost_ok)
316 TEST_ENTRY (udp_send_and_recv)
317 TEST_ENTRY (udp_dgram_too_big)
318 TEST_ENTRY (udp_dual_stack)
319 TEST_ENTRY (udp_ipv6_only)
320 TEST_ENTRY (udp_options)
321 TEST_ENTRY (udp_multicast_join)
322 TEST_ENTRY (udp_multicast_ttl)
324 TEST_ENTRY (udp_open)
325 TEST_HELPER (udp_open, udp4_echo_server)
327 TEST_ENTRY (pipe_bind_error_addrinuse)
328 TEST_ENTRY (pipe_bind_error_addrnotavail)
329 TEST_ENTRY (pipe_bind_error_inval)
330 TEST_ENTRY (pipe_listen_without_bind)
332 TEST_ENTRY (connection_fail)
333 TEST_ENTRY (connection_fail_doesnt_auto_close)
335 TEST_ENTRY (shutdown_close_tcp)
336 TEST_HELPER (shutdown_close_tcp, tcp4_echo_server)
337 TEST_ENTRY (shutdown_close_pipe)
338 TEST_HELPER (shutdown_close_pipe, pipe_echo_server)
340 TEST_ENTRY (shutdown_eof)
341 TEST_HELPER (shutdown_eof, tcp4_echo_server)
343 TEST_ENTRY (callback_stack)
344 TEST_HELPER (callback_stack, tcp4_echo_server)
346 TEST_ENTRY (error_message)
349 TEST_ENTRY (timer_init)
350 TEST_ENTRY (timer_again)
351 TEST_ENTRY (timer_start_twice)
352 TEST_ENTRY (timer_order)
353 TEST_ENTRY (timer_huge_timeout)
354 TEST_ENTRY (timer_huge_repeat)
355 TEST_ENTRY (timer_from_check)
357 TEST_ENTRY (idle_starvation)
360 TEST_ENTRY (idle_ref)
361 TEST_ENTRY (fs_poll_ref)
362 TEST_ENTRY (async_ref)
363 TEST_ENTRY (prepare_ref)
364 TEST_ENTRY (check_ref)
365 TEST_ENTRY (unref_in_prepare_cb)
366 TEST_ENTRY (timer_ref)
367 TEST_ENTRY (timer_ref2)
368 TEST_ENTRY (fs_event_ref)
370 TEST_ENTRY (tcp_ref2)
371 TEST_ENTRY (tcp_ref2b)
372 TEST_ENTRY (tcp_ref3)
373 TEST_HELPER (tcp_ref3, tcp4_echo_server)
374 TEST_ENTRY (tcp_ref4)
375 TEST_HELPER (tcp_ref4, tcp4_echo_server)
377 TEST_ENTRY (udp_ref2)
378 TEST_ENTRY (udp_ref3)
379 TEST_HELPER (udp_ref3, udp4_echo_server)
380 TEST_ENTRY (pipe_ref)
381 TEST_ENTRY (pipe_ref2)
382 TEST_ENTRY (pipe_ref3)
383 TEST_HELPER (pipe_ref3, pipe_echo_server)
384 TEST_ENTRY (pipe_ref4)
385 TEST_HELPER (pipe_ref4, pipe_echo_server)
386 TEST_ENTRY (process_ref)
388 TEST_ENTRY (loop_handles)
389 TEST_ENTRY (walk_handles)
391 TEST_ENTRY (watcher_cross_stop)
399 TEST_ENTRY (get_currentexe)
401 TEST_ENTRY (process_title)
403 TEST_ENTRY (cwd_and_chdir)
405 TEST_ENTRY (get_memory)
407 TEST_ENTRY (get_loadavg)
411 TEST_ENTRY (getaddrinfo_basic)
412 TEST_ENTRY (getaddrinfo_concurrent)
414 TEST_ENTRY (getsockname_tcp)
415 TEST_ENTRY (getsockname_udp)
417 TEST_ENTRY (poll_duplex)
418 TEST_ENTRY (poll_unidirectional)
419 TEST_ENTRY (poll_close)
421 TEST_ENTRY (spawn_fails)
422 TEST_ENTRY (spawn_exit_code)
423 TEST_ENTRY (spawn_stdout)
424 TEST_ENTRY (spawn_stdin)
425 TEST_ENTRY (spawn_stdio_greater_than_3)
426 TEST_ENTRY (spawn_ignored_stdio)
427 TEST_ENTRY (spawn_and_kill)
428 TEST_ENTRY (spawn_detached)
429 TEST_ENTRY (spawn_and_kill_with_std)
430 TEST_ENTRY (spawn_and_ping)
431 TEST_ENTRY (spawn_preserve_env)
432 TEST_ENTRY (spawn_setuid_fails)
433 TEST_ENTRY (spawn_setgid_fails)
434 TEST_ENTRY (spawn_stdout_to_file)
435 TEST_ENTRY (spawn_auto_unref)
440 TEST_ENTRY (spawn_detect_pipe_name_collisions_on_windows)
441 TEST_ENTRY (argument_escaping)
442 TEST_ENTRY (environment_creation)
443 TEST_ENTRY (listen_with_simultaneous_accepts)
444 TEST_ENTRY (listen_no_simultaneous_accepts)
445 TEST_ENTRY (fs_stat_root)
447 TEST_ENTRY (spawn_setuid_setgid)
448 TEST_ENTRY (we_get_signal)
449 TEST_ENTRY (we_get_signals)
450 TEST_ENTRY (signal_multiple_loops)
454 TEST_ENTRY (osx_select)
457 TEST_ENTRY (fs_file_noent)
458 TEST_ENTRY (fs_file_nametoolong)
459 TEST_ENTRY (fs_file_loop)
460 TEST_ENTRY (fs_file_async)
461 TEST_ENTRY (fs_file_sync)
462 TEST_ENTRY (fs_async_dir)
463 TEST_ENTRY (fs_async_sendfile)
464 TEST_ENTRY (fs_fstat)
465 TEST_ENTRY (fs_chmod)
466 TEST_ENTRY (fs_chown)
467 TEST_ENTRY (fs_utime)
468 TEST_ENTRY (fs_futime)
469 TEST_ENTRY (fs_readlink)
470 TEST_ENTRY (fs_symlink)
471 TEST_ENTRY (fs_symlink_dir)
472 TEST_ENTRY (fs_stat_missing_path)
473 TEST_ENTRY (fs_read_file_eof)
474 TEST_ENTRY (fs_file_open_append)
475 TEST_ENTRY (fs_event_watch_dir)
476 TEST_ENTRY (fs_event_watch_file)
477 TEST_ENTRY (fs_event_watch_file_twice)
478 TEST_ENTRY (fs_event_watch_file_current_dir)
479 TEST_ENTRY (fs_event_no_callback_after_close)
480 TEST_ENTRY (fs_event_no_callback_on_close)
481 TEST_ENTRY (fs_event_immediate_close)
482 TEST_ENTRY (fs_event_close_with_pending_event)
483 TEST_ENTRY (fs_event_close_in_callback)
484 TEST_ENTRY (fs_readdir_empty_dir)
485 TEST_ENTRY (fs_readdir_file)
486 TEST_ENTRY (fs_open_dir)
487 TEST_ENTRY (fs_rename_to_existing_file)
488 TEST_ENTRY (threadpool_queue_work_simple)
489 TEST_ENTRY (threadpool_queue_work_einval)
490 TEST_ENTRY (threadpool_multiple_event_loops)
491 TEST_ENTRY (threadpool_cancel_getaddrinfo)
492 TEST_ENTRY (threadpool_cancel_work)
493 TEST_ENTRY (threadpool_cancel_fs)
494 TEST_ENTRY (threadpool_cancel_single)
495 TEST_ENTRY (thread_mutex)
496 TEST_ENTRY (thread_rwlock)
497 TEST_ENTRY (thread_create)
502 /* These are for testing the test runner. */
503 TEST_ENTRY (fail_always)
504 TEST_ENTRY (pass_always)