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 (close_order)
25 TEST_DECLARE (run_once)
26 TEST_DECLARE (run_nowait)
27 TEST_DECLARE (loop_stop)
28 TEST_DECLARE (loop_update_time)
29 TEST_DECLARE (barrier_1)
30 TEST_DECLARE (barrier_2)
31 TEST_DECLARE (barrier_3)
32 TEST_DECLARE (condvar_1)
33 TEST_DECLARE (condvar_2)
34 TEST_DECLARE (condvar_3)
35 TEST_DECLARE (condvar_4)
36 TEST_DECLARE (condvar_5)
37 TEST_DECLARE (semaphore_1)
38 TEST_DECLARE (semaphore_2)
39 TEST_DECLARE (semaphore_3)
41 TEST_DECLARE (stdio_over_pipes)
42 TEST_DECLARE (ipc_listen_before_write)
43 TEST_DECLARE (ipc_listen_after_write)
45 TEST_DECLARE (ipc_send_recv_pipe)
47 TEST_DECLARE (ipc_send_recv_tcp)
48 TEST_DECLARE (ipc_tcp_connection)
49 TEST_DECLARE (tcp_ping_pong)
50 TEST_DECLARE (tcp_ping_pong_v6)
51 TEST_DECLARE (pipe_ping_pong)
52 TEST_DECLARE (delayed_accept)
53 TEST_DECLARE (multiple_listen)
54 TEST_DECLARE (tcp_writealot)
55 TEST_DECLARE (tcp_try_write)
56 TEST_DECLARE (tcp_open)
57 TEST_DECLARE (tcp_connect_error_after_write)
58 TEST_DECLARE (tcp_shutdown_after_write)
59 TEST_DECLARE (tcp_bind_error_addrinuse)
60 TEST_DECLARE (tcp_bind_error_addrnotavail_1)
61 TEST_DECLARE (tcp_bind_error_addrnotavail_2)
62 TEST_DECLARE (tcp_bind_error_fault)
63 TEST_DECLARE (tcp_bind_error_inval)
64 TEST_DECLARE (tcp_bind_localhost_ok)
65 TEST_DECLARE (tcp_listen_without_bind)
66 TEST_DECLARE (tcp_connect_error_fault)
67 TEST_DECLARE (tcp_connect_timeout)
68 TEST_DECLARE (tcp_close_while_connecting)
69 TEST_DECLARE (tcp_close)
70 TEST_DECLARE (tcp_close_accept)
71 TEST_DECLARE (tcp_flags)
72 TEST_DECLARE (tcp_write_to_half_open_connection)
73 TEST_DECLARE (tcp_unexpected_read)
74 TEST_DECLARE (tcp_read_stop)
75 TEST_DECLARE (tcp_bind6_error_addrinuse)
76 TEST_DECLARE (tcp_bind6_error_addrnotavail)
77 TEST_DECLARE (tcp_bind6_error_fault)
78 TEST_DECLARE (tcp_bind6_error_inval)
79 TEST_DECLARE (tcp_bind6_localhost_ok)
80 TEST_DECLARE (udp_send_and_recv)
81 TEST_DECLARE (udp_multicast_join)
82 TEST_DECLARE (udp_multicast_ttl)
83 TEST_DECLARE (udp_dgram_too_big)
84 TEST_DECLARE (udp_dual_stack)
85 TEST_DECLARE (udp_ipv6_only)
86 TEST_DECLARE (udp_options)
87 TEST_DECLARE (udp_open)
88 TEST_DECLARE (pipe_bind_error_addrinuse)
89 TEST_DECLARE (pipe_bind_error_addrnotavail)
90 TEST_DECLARE (pipe_bind_error_inval)
91 TEST_DECLARE (pipe_listen_without_bind)
92 TEST_DECLARE (pipe_connect_bad_name)
93 TEST_DECLARE (pipe_connect_to_file)
94 TEST_DECLARE (connection_fail)
95 TEST_DECLARE (connection_fail_doesnt_auto_close)
96 TEST_DECLARE (shutdown_close_tcp)
97 TEST_DECLARE (shutdown_close_pipe)
98 TEST_DECLARE (shutdown_eof)
99 TEST_DECLARE (callback_stack)
100 TEST_DECLARE (error_message)
102 TEST_DECLARE (timer_init)
103 TEST_DECLARE (timer_again)
104 TEST_DECLARE (timer_start_twice)
105 TEST_DECLARE (timer_order)
106 TEST_DECLARE (timer_huge_timeout)
107 TEST_DECLARE (timer_huge_repeat)
108 TEST_DECLARE (timer_run_once)
109 TEST_DECLARE (timer_from_check)
110 TEST_DECLARE (idle_starvation)
111 TEST_DECLARE (loop_handles)
112 TEST_DECLARE (get_loadavg)
113 TEST_DECLARE (walk_handles)
114 TEST_DECLARE (watcher_cross_stop)
116 TEST_DECLARE (idle_ref)
117 TEST_DECLARE (async_ref)
118 TEST_DECLARE (prepare_ref)
119 TEST_DECLARE (check_ref)
120 TEST_DECLARE (unref_in_prepare_cb)
121 TEST_DECLARE (timer_ref)
122 TEST_DECLARE (timer_ref2)
123 TEST_DECLARE (fs_event_ref)
124 TEST_DECLARE (fs_poll_ref)
125 TEST_DECLARE (tcp_ref)
126 TEST_DECLARE (tcp_ref2)
127 TEST_DECLARE (tcp_ref2b)
128 TEST_DECLARE (tcp_ref3)
129 TEST_DECLARE (tcp_ref4)
130 TEST_DECLARE (udp_ref)
131 TEST_DECLARE (udp_ref2)
132 TEST_DECLARE (udp_ref3)
133 TEST_DECLARE (pipe_ref)
134 TEST_DECLARE (pipe_ref2)
135 TEST_DECLARE (pipe_ref3)
136 TEST_DECLARE (pipe_ref4)
137 TEST_DECLARE (process_ref)
138 TEST_DECLARE (has_ref)
139 TEST_DECLARE (active)
142 TEST_DECLARE (async_null_cb)
143 TEST_DECLARE (get_currentexe)
144 TEST_DECLARE (process_title)
145 TEST_DECLARE (cwd_and_chdir)
146 TEST_DECLARE (get_memory)
147 TEST_DECLARE (hrtime)
148 TEST_DECLARE (getaddrinfo_fail)
149 TEST_DECLARE (getaddrinfo_basic)
150 TEST_DECLARE (getaddrinfo_concurrent)
151 TEST_DECLARE (getsockname_tcp)
152 TEST_DECLARE (getsockname_udp)
153 TEST_DECLARE (fail_always)
154 TEST_DECLARE (pass_always)
155 TEST_DECLARE (spawn_fails)
156 TEST_DECLARE (spawn_exit_code)
157 TEST_DECLARE (spawn_stdout)
158 TEST_DECLARE (spawn_stdin)
159 TEST_DECLARE (spawn_stdio_greater_than_3)
160 TEST_DECLARE (spawn_ignored_stdio)
161 TEST_DECLARE (spawn_and_kill)
162 TEST_DECLARE (spawn_detached)
163 TEST_DECLARE (spawn_and_kill_with_std)
164 TEST_DECLARE (spawn_and_ping)
165 TEST_DECLARE (spawn_preserve_env)
166 TEST_DECLARE (spawn_setuid_fails)
167 TEST_DECLARE (spawn_setgid_fails)
168 TEST_DECLARE (spawn_stdout_to_file)
169 TEST_DECLARE (spawn_auto_unref)
170 TEST_DECLARE (fs_poll)
172 TEST_DECLARE (fs_file_noent)
173 TEST_DECLARE (fs_file_nametoolong)
174 TEST_DECLARE (fs_file_loop)
175 TEST_DECLARE (fs_file_async)
176 TEST_DECLARE (fs_file_sync)
177 TEST_DECLARE (fs_async_dir)
178 TEST_DECLARE (fs_async_sendfile)
179 TEST_DECLARE (fs_fstat)
180 TEST_DECLARE (fs_chmod)
181 TEST_DECLARE (fs_chown)
182 TEST_DECLARE (fs_link)
183 TEST_DECLARE (fs_readlink)
184 TEST_DECLARE (fs_symlink)
185 TEST_DECLARE (fs_symlink_dir)
186 TEST_DECLARE (fs_utime)
187 TEST_DECLARE (fs_futime)
188 TEST_DECLARE (fs_file_open_append)
189 TEST_DECLARE (fs_stat_missing_path)
190 TEST_DECLARE (fs_read_file_eof)
191 TEST_DECLARE (fs_event_watch_dir)
192 TEST_DECLARE (fs_event_watch_file)
193 TEST_DECLARE (fs_event_watch_file_twice)
194 TEST_DECLARE (fs_event_watch_file_current_dir)
195 TEST_DECLARE (fs_event_no_callback_after_close)
196 TEST_DECLARE (fs_event_no_callback_on_close)
197 TEST_DECLARE (fs_event_immediate_close)
198 TEST_DECLARE (fs_event_close_with_pending_event)
199 TEST_DECLARE (fs_event_close_in_callback)
200 TEST_DECLARE (fs_event_start_and_close)
201 TEST_DECLARE (fs_event_error_reporting)
202 TEST_DECLARE (fs_readdir_empty_dir)
203 TEST_DECLARE (fs_readdir_file)
204 TEST_DECLARE (fs_open_dir)
205 TEST_DECLARE (fs_rename_to_existing_file)
206 TEST_DECLARE (threadpool_queue_work_simple)
207 TEST_DECLARE (threadpool_queue_work_einval)
208 TEST_DECLARE (threadpool_multiple_event_loops)
209 TEST_DECLARE (threadpool_cancel_getaddrinfo)
210 TEST_DECLARE (threadpool_cancel_work)
211 TEST_DECLARE (threadpool_cancel_fs)
212 TEST_DECLARE (threadpool_cancel_single)
213 TEST_DECLARE (thread_local_storage)
214 TEST_DECLARE (thread_mutex)
215 TEST_DECLARE (thread_rwlock)
216 TEST_DECLARE (thread_create)
217 TEST_DECLARE (dlerror)
218 TEST_DECLARE (poll_duplex)
219 TEST_DECLARE (poll_unidirectional)
220 TEST_DECLARE (poll_close)
221 TEST_DECLARE (ip4_addr)
222 TEST_DECLARE (ip6_addr_link_local)
224 TEST_DECLARE (spawn_detect_pipe_name_collisions_on_windows)
225 TEST_DECLARE (argument_escaping)
226 TEST_DECLARE (environment_creation)
227 TEST_DECLARE (listen_with_simultaneous_accepts)
228 TEST_DECLARE (listen_no_simultaneous_accepts)
229 TEST_DECLARE (fs_stat_root)
231 TEST_DECLARE (emfile)
232 TEST_DECLARE (close_fd)
233 TEST_DECLARE (spawn_setuid_setgid)
234 TEST_DECLARE (we_get_signal)
235 TEST_DECLARE (we_get_signals)
236 TEST_DECLARE (signal_multiple_loops)
239 TEST_DECLARE (osx_select)
241 HELPER_DECLARE (tcp4_echo_server)
242 HELPER_DECLARE (tcp6_echo_server)
243 HELPER_DECLARE (udp4_echo_server)
244 HELPER_DECLARE (pipe_echo_server)
248 TEST_OUTPUT_ENTRY (platform_output)
251 TEST_ENTRY (callback_order)
253 TEST_ENTRY (close_order)
254 TEST_ENTRY (run_once)
255 TEST_ENTRY (run_nowait)
256 TEST_ENTRY (loop_stop)
257 TEST_ENTRY (loop_update_time)
258 TEST_ENTRY (barrier_1)
259 TEST_ENTRY (barrier_2)
260 TEST_ENTRY (barrier_3)
261 TEST_ENTRY (condvar_1)
262 TEST_ENTRY (condvar_2)
263 TEST_ENTRY (condvar_3)
264 TEST_ENTRY (condvar_4)
265 TEST_ENTRY (condvar_5)
266 TEST_ENTRY (semaphore_1)
267 TEST_ENTRY (semaphore_2)
268 TEST_ENTRY (semaphore_3)
270 TEST_ENTRY (pipe_connect_bad_name)
271 TEST_ENTRY (pipe_connect_to_file)
274 TEST_ENTRY (stdio_over_pipes)
275 TEST_ENTRY (ipc_listen_before_write)
276 TEST_ENTRY (ipc_listen_after_write)
278 TEST_ENTRY (ipc_send_recv_pipe)
280 TEST_ENTRY (ipc_send_recv_tcp)
281 TEST_ENTRY (ipc_tcp_connection)
283 TEST_ENTRY (tcp_ping_pong)
284 TEST_HELPER (tcp_ping_pong, tcp4_echo_server)
286 TEST_ENTRY (tcp_ping_pong_v6)
287 TEST_HELPER (tcp_ping_pong_v6, tcp6_echo_server)
289 TEST_ENTRY (pipe_ping_pong)
290 TEST_HELPER (pipe_ping_pong, pipe_echo_server)
292 TEST_ENTRY (delayed_accept)
293 TEST_ENTRY (multiple_listen)
295 TEST_ENTRY (tcp_writealot)
296 TEST_HELPER (tcp_writealot, tcp4_echo_server)
298 TEST_ENTRY (tcp_try_write)
300 TEST_ENTRY (tcp_open)
301 TEST_HELPER (tcp_open, tcp4_echo_server)
303 TEST_ENTRY (tcp_shutdown_after_write)
304 TEST_HELPER (tcp_shutdown_after_write, tcp4_echo_server)
306 TEST_ENTRY (tcp_connect_error_after_write)
307 TEST_ENTRY (tcp_bind_error_addrinuse)
308 TEST_ENTRY (tcp_bind_error_addrnotavail_1)
309 TEST_ENTRY (tcp_bind_error_addrnotavail_2)
310 TEST_ENTRY (tcp_bind_error_fault)
311 TEST_ENTRY (tcp_bind_error_inval)
312 TEST_ENTRY (tcp_bind_localhost_ok)
313 TEST_ENTRY (tcp_listen_without_bind)
314 TEST_ENTRY (tcp_connect_error_fault)
315 TEST_ENTRY (tcp_connect_timeout)
316 TEST_ENTRY (tcp_close_while_connecting)
317 TEST_ENTRY (tcp_close)
318 TEST_ENTRY (tcp_close_accept)
319 TEST_ENTRY (tcp_flags)
320 TEST_ENTRY (tcp_write_to_half_open_connection)
321 TEST_ENTRY (tcp_unexpected_read)
323 TEST_ENTRY (tcp_read_stop)
324 TEST_HELPER (tcp_read_stop, tcp4_echo_server)
326 TEST_ENTRY (tcp_bind6_error_addrinuse)
327 TEST_ENTRY (tcp_bind6_error_addrnotavail)
328 TEST_ENTRY (tcp_bind6_error_fault)
329 TEST_ENTRY (tcp_bind6_error_inval)
330 TEST_ENTRY (tcp_bind6_localhost_ok)
332 TEST_ENTRY (udp_send_and_recv)
333 TEST_ENTRY (udp_dgram_too_big)
334 TEST_ENTRY (udp_dual_stack)
335 TEST_ENTRY (udp_ipv6_only)
336 TEST_ENTRY (udp_options)
337 TEST_ENTRY (udp_multicast_join)
338 TEST_ENTRY (udp_multicast_ttl)
340 TEST_ENTRY (udp_open)
341 TEST_HELPER (udp_open, udp4_echo_server)
343 TEST_ENTRY (pipe_bind_error_addrinuse)
344 TEST_ENTRY (pipe_bind_error_addrnotavail)
345 TEST_ENTRY (pipe_bind_error_inval)
346 TEST_ENTRY (pipe_listen_without_bind)
348 TEST_ENTRY (connection_fail)
349 TEST_ENTRY (connection_fail_doesnt_auto_close)
351 TEST_ENTRY (shutdown_close_tcp)
352 TEST_HELPER (shutdown_close_tcp, tcp4_echo_server)
353 TEST_ENTRY (shutdown_close_pipe)
354 TEST_HELPER (shutdown_close_pipe, pipe_echo_server)
356 TEST_ENTRY (shutdown_eof)
357 TEST_HELPER (shutdown_eof, tcp4_echo_server)
359 TEST_ENTRY (callback_stack)
360 TEST_HELPER (callback_stack, tcp4_echo_server)
362 TEST_ENTRY (error_message)
365 TEST_ENTRY (timer_init)
366 TEST_ENTRY (timer_again)
367 TEST_ENTRY (timer_start_twice)
368 TEST_ENTRY (timer_order)
369 TEST_ENTRY (timer_huge_timeout)
370 TEST_ENTRY (timer_huge_repeat)
371 TEST_ENTRY (timer_run_once)
372 TEST_ENTRY (timer_from_check)
374 TEST_ENTRY (idle_starvation)
377 TEST_ENTRY (idle_ref)
378 TEST_ENTRY (fs_poll_ref)
379 TEST_ENTRY (async_ref)
380 TEST_ENTRY (prepare_ref)
381 TEST_ENTRY (check_ref)
382 TEST_ENTRY (unref_in_prepare_cb)
383 TEST_ENTRY (timer_ref)
384 TEST_ENTRY (timer_ref2)
385 TEST_ENTRY (fs_event_ref)
387 TEST_ENTRY (tcp_ref2)
388 TEST_ENTRY (tcp_ref2b)
389 TEST_ENTRY (tcp_ref3)
390 TEST_HELPER (tcp_ref3, tcp4_echo_server)
391 TEST_ENTRY (tcp_ref4)
392 TEST_HELPER (tcp_ref4, tcp4_echo_server)
394 TEST_ENTRY (udp_ref2)
395 TEST_ENTRY (udp_ref3)
396 TEST_HELPER (udp_ref3, udp4_echo_server)
397 TEST_ENTRY (pipe_ref)
398 TEST_ENTRY (pipe_ref2)
399 TEST_ENTRY (pipe_ref3)
400 TEST_HELPER (pipe_ref3, pipe_echo_server)
401 TEST_ENTRY (pipe_ref4)
402 TEST_HELPER (pipe_ref4, pipe_echo_server)
403 TEST_ENTRY (process_ref)
406 TEST_ENTRY (loop_handles)
407 TEST_ENTRY (walk_handles)
409 TEST_ENTRY (watcher_cross_stop)
416 TEST_ENTRY (async_null_cb)
418 TEST_ENTRY (get_currentexe)
420 TEST_ENTRY (process_title)
422 TEST_ENTRY (cwd_and_chdir)
424 TEST_ENTRY (get_memory)
426 TEST_ENTRY (get_loadavg)
430 TEST_ENTRY (getaddrinfo_fail)
431 TEST_ENTRY (getaddrinfo_basic)
432 TEST_ENTRY (getaddrinfo_concurrent)
434 TEST_ENTRY (getsockname_tcp)
435 TEST_ENTRY (getsockname_udp)
437 TEST_ENTRY (poll_duplex)
438 TEST_ENTRY (poll_unidirectional)
439 TEST_ENTRY (poll_close)
441 TEST_ENTRY (spawn_fails)
442 TEST_ENTRY (spawn_exit_code)
443 TEST_ENTRY (spawn_stdout)
444 TEST_ENTRY (spawn_stdin)
445 TEST_ENTRY (spawn_stdio_greater_than_3)
446 TEST_ENTRY (spawn_ignored_stdio)
447 TEST_ENTRY (spawn_and_kill)
448 TEST_ENTRY (spawn_detached)
449 TEST_ENTRY (spawn_and_kill_with_std)
450 TEST_ENTRY (spawn_and_ping)
451 TEST_ENTRY (spawn_preserve_env)
452 TEST_ENTRY (spawn_setuid_fails)
453 TEST_ENTRY (spawn_setgid_fails)
454 TEST_ENTRY (spawn_stdout_to_file)
455 TEST_ENTRY (spawn_auto_unref)
460 TEST_ENTRY (spawn_detect_pipe_name_collisions_on_windows)
461 TEST_ENTRY (argument_escaping)
462 TEST_ENTRY (environment_creation)
463 TEST_ENTRY (listen_with_simultaneous_accepts)
464 TEST_ENTRY (listen_no_simultaneous_accepts)
465 TEST_ENTRY (fs_stat_root)
468 TEST_ENTRY (close_fd)
469 TEST_ENTRY (spawn_setuid_setgid)
470 TEST_ENTRY (we_get_signal)
471 TEST_ENTRY (we_get_signals)
472 TEST_ENTRY (signal_multiple_loops)
476 TEST_ENTRY (osx_select)
479 TEST_ENTRY (fs_file_noent)
480 TEST_ENTRY (fs_file_nametoolong)
481 TEST_ENTRY (fs_file_loop)
482 TEST_ENTRY (fs_file_async)
483 TEST_ENTRY (fs_file_sync)
484 TEST_ENTRY (fs_async_dir)
485 TEST_ENTRY (fs_async_sendfile)
486 TEST_ENTRY (fs_fstat)
487 TEST_ENTRY (fs_chmod)
488 TEST_ENTRY (fs_chown)
489 TEST_ENTRY (fs_utime)
490 TEST_ENTRY (fs_futime)
491 TEST_ENTRY (fs_readlink)
492 TEST_ENTRY (fs_symlink)
493 TEST_ENTRY (fs_symlink_dir)
494 TEST_ENTRY (fs_stat_missing_path)
495 TEST_ENTRY (fs_read_file_eof)
496 TEST_ENTRY (fs_file_open_append)
497 TEST_ENTRY (fs_event_watch_dir)
498 TEST_ENTRY (fs_event_watch_file)
499 TEST_ENTRY (fs_event_watch_file_twice)
500 TEST_ENTRY (fs_event_watch_file_current_dir)
501 TEST_ENTRY (fs_event_no_callback_after_close)
502 TEST_ENTRY (fs_event_no_callback_on_close)
503 TEST_ENTRY (fs_event_immediate_close)
504 TEST_ENTRY (fs_event_close_with_pending_event)
505 TEST_ENTRY (fs_event_close_in_callback)
506 TEST_ENTRY (fs_event_start_and_close)
507 TEST_ENTRY (fs_event_error_reporting)
508 TEST_ENTRY (fs_readdir_empty_dir)
509 TEST_ENTRY (fs_readdir_file)
510 TEST_ENTRY (fs_open_dir)
511 TEST_ENTRY (fs_rename_to_existing_file)
512 TEST_ENTRY (threadpool_queue_work_simple)
513 TEST_ENTRY (threadpool_queue_work_einval)
514 TEST_ENTRY (threadpool_multiple_event_loops)
515 TEST_ENTRY (threadpool_cancel_getaddrinfo)
516 TEST_ENTRY (threadpool_cancel_work)
517 TEST_ENTRY (threadpool_cancel_fs)
518 TEST_ENTRY (threadpool_cancel_single)
519 TEST_ENTRY (thread_local_storage)
520 TEST_ENTRY (thread_mutex)
521 TEST_ENTRY (thread_rwlock)
522 TEST_ENTRY (thread_create)
524 TEST_ENTRY (ip4_addr)
525 TEST_ENTRY (ip6_addr_link_local)
527 /* These are for testing the test runner. */
528 TEST_ENTRY (fail_always)
529 TEST_ENTRY (pass_always)