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