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_flags)
68 TEST_DECLARE (tcp_write_to_half_open_connection)
69 TEST_DECLARE (tcp_unexpected_read)
70 TEST_DECLARE (tcp_read_stop)
71 TEST_DECLARE (tcp_bind6_error_addrinuse)
72 TEST_DECLARE (tcp_bind6_error_addrnotavail)
73 TEST_DECLARE (tcp_bind6_error_fault)
74 TEST_DECLARE (tcp_bind6_error_inval)
75 TEST_DECLARE (tcp_bind6_localhost_ok)
76 TEST_DECLARE (udp_send_and_recv)
77 TEST_DECLARE (udp_multicast_join)
78 TEST_DECLARE (udp_multicast_ttl)
79 TEST_DECLARE (udp_dgram_too_big)
80 TEST_DECLARE (udp_dual_stack)
81 TEST_DECLARE (udp_ipv6_only)
82 TEST_DECLARE (udp_options)
83 TEST_DECLARE (udp_open)
84 TEST_DECLARE (pipe_bind_error_addrinuse)
85 TEST_DECLARE (pipe_bind_error_addrnotavail)
86 TEST_DECLARE (pipe_bind_error_inval)
87 TEST_DECLARE (pipe_listen_without_bind)
88 TEST_DECLARE (pipe_connect_bad_name)
89 TEST_DECLARE (pipe_connect_to_file)
90 TEST_DECLARE (connection_fail)
91 TEST_DECLARE (connection_fail_doesnt_auto_close)
92 TEST_DECLARE (shutdown_close_tcp)
93 TEST_DECLARE (shutdown_close_pipe)
94 TEST_DECLARE (shutdown_eof)
95 TEST_DECLARE (callback_stack)
96 TEST_DECLARE (error_message)
98 TEST_DECLARE (timer_init)
99 TEST_DECLARE (timer_again)
100 TEST_DECLARE (timer_start_twice)
101 TEST_DECLARE (timer_order)
102 TEST_DECLARE (timer_huge_timeout)
103 TEST_DECLARE (timer_huge_repeat)
104 TEST_DECLARE (timer_from_check)
105 TEST_DECLARE (idle_starvation)
106 TEST_DECLARE (loop_handles)
107 TEST_DECLARE (get_loadavg)
108 TEST_DECLARE (walk_handles)
110 TEST_DECLARE (idle_ref)
111 TEST_DECLARE (async_ref)
112 TEST_DECLARE (prepare_ref)
113 TEST_DECLARE (check_ref)
114 TEST_DECLARE (unref_in_prepare_cb)
115 TEST_DECLARE (timer_ref)
116 TEST_DECLARE (timer_ref2)
117 TEST_DECLARE (fs_event_ref)
118 TEST_DECLARE (fs_poll_ref)
119 TEST_DECLARE (tcp_ref)
120 TEST_DECLARE (tcp_ref2)
121 TEST_DECLARE (tcp_ref2b)
122 TEST_DECLARE (tcp_ref3)
123 TEST_DECLARE (tcp_ref4)
124 TEST_DECLARE (udp_ref)
125 TEST_DECLARE (udp_ref2)
126 TEST_DECLARE (udp_ref3)
127 TEST_DECLARE (pipe_ref)
128 TEST_DECLARE (pipe_ref2)
129 TEST_DECLARE (pipe_ref3)
130 TEST_DECLARE (pipe_ref4)
131 TEST_DECLARE (process_ref)
132 TEST_DECLARE (active)
135 TEST_DECLARE (get_currentexe)
136 TEST_DECLARE (process_title)
137 TEST_DECLARE (cwd_and_chdir)
138 TEST_DECLARE (get_memory)
139 TEST_DECLARE (hrtime)
140 TEST_DECLARE (getaddrinfo_basic)
141 TEST_DECLARE (getaddrinfo_concurrent)
142 TEST_DECLARE (getsockname_tcp)
143 TEST_DECLARE (getsockname_udp)
144 TEST_DECLARE (fail_always)
145 TEST_DECLARE (pass_always)
146 TEST_DECLARE (spawn_fails)
147 TEST_DECLARE (spawn_exit_code)
148 TEST_DECLARE (spawn_stdout)
149 TEST_DECLARE (spawn_stdin)
150 TEST_DECLARE (spawn_stdio_greater_than_3)
151 TEST_DECLARE (spawn_ignored_stdio)
152 TEST_DECLARE (spawn_and_kill)
153 TEST_DECLARE (spawn_detached)
154 TEST_DECLARE (spawn_and_kill_with_std)
155 TEST_DECLARE (spawn_and_ping)
156 TEST_DECLARE (spawn_preserve_env)
157 TEST_DECLARE (spawn_setuid_fails)
158 TEST_DECLARE (spawn_setgid_fails)
159 TEST_DECLARE (spawn_stdout_to_file)
160 TEST_DECLARE (spawn_auto_unref)
161 TEST_DECLARE (fs_poll)
163 TEST_DECLARE (fs_file_noent)
164 TEST_DECLARE (fs_file_nametoolong)
165 TEST_DECLARE (fs_file_loop)
166 TEST_DECLARE (fs_file_async)
167 TEST_DECLARE (fs_file_sync)
168 TEST_DECLARE (fs_async_dir)
169 TEST_DECLARE (fs_async_sendfile)
170 TEST_DECLARE (fs_fstat)
171 TEST_DECLARE (fs_chmod)
172 TEST_DECLARE (fs_chown)
173 TEST_DECLARE (fs_link)
174 TEST_DECLARE (fs_readlink)
175 TEST_DECLARE (fs_symlink)
176 TEST_DECLARE (fs_symlink_dir)
177 TEST_DECLARE (fs_utime)
178 TEST_DECLARE (fs_futime)
179 TEST_DECLARE (fs_file_open_append)
180 TEST_DECLARE (fs_stat_missing_path)
181 TEST_DECLARE (fs_read_file_eof)
182 TEST_DECLARE (fs_event_watch_dir)
183 TEST_DECLARE (fs_event_watch_file)
184 TEST_DECLARE (fs_event_watch_file_twice)
185 TEST_DECLARE (fs_event_watch_file_current_dir)
186 TEST_DECLARE (fs_event_no_callback_after_close)
187 TEST_DECLARE (fs_event_no_callback_on_close)
188 TEST_DECLARE (fs_event_immediate_close)
189 TEST_DECLARE (fs_event_close_with_pending_event)
190 TEST_DECLARE (fs_event_close_in_callback)
191 TEST_DECLARE (fs_readdir_empty_dir)
192 TEST_DECLARE (fs_readdir_file)
193 TEST_DECLARE (fs_open_dir)
194 TEST_DECLARE (fs_rename_to_existing_file)
195 TEST_DECLARE (threadpool_queue_work_simple)
196 TEST_DECLARE (threadpool_queue_work_einval)
197 TEST_DECLARE (threadpool_multiple_event_loops)
198 TEST_DECLARE (threadpool_cancel_getaddrinfo)
199 TEST_DECLARE (threadpool_cancel_work)
200 TEST_DECLARE (threadpool_cancel_fs)
201 TEST_DECLARE (threadpool_cancel_single)
202 TEST_DECLARE (thread_mutex)
203 TEST_DECLARE (thread_rwlock)
204 TEST_DECLARE (thread_create)
205 TEST_DECLARE (strlcpy)
206 TEST_DECLARE (strlcat)
207 TEST_DECLARE (dlerror)
208 TEST_DECLARE (poll_duplex)
209 TEST_DECLARE (poll_unidirectional)
210 TEST_DECLARE (poll_close)
212 TEST_DECLARE (spawn_detect_pipe_name_collisions_on_windows)
213 TEST_DECLARE (argument_escaping)
214 TEST_DECLARE (environment_creation)
215 TEST_DECLARE (listen_with_simultaneous_accepts)
216 TEST_DECLARE (listen_no_simultaneous_accepts)
217 TEST_DECLARE (fs_stat_root)
219 TEST_DECLARE (spawn_setuid_setgid)
220 TEST_DECLARE (we_get_signal)
221 TEST_DECLARE (we_get_signals)
222 TEST_DECLARE (signal_multiple_loops)
225 TEST_DECLARE (osx_select)
227 HELPER_DECLARE (tcp4_echo_server)
228 HELPER_DECLARE (tcp6_echo_server)
229 HELPER_DECLARE (udp4_echo_server)
230 HELPER_DECLARE (pipe_echo_server)
234 TEST_OUTPUT_ENTRY (platform_output)
237 TEST_ENTRY (callback_order)
239 TEST_ENTRY (run_once)
240 TEST_ENTRY (run_nowait)
241 TEST_ENTRY (loop_stop)
242 TEST_ENTRY (barrier_1)
243 TEST_ENTRY (barrier_2)
244 TEST_ENTRY (barrier_3)
245 TEST_ENTRY (condvar_1)
246 TEST_ENTRY (condvar_2)
247 TEST_ENTRY (condvar_3)
248 TEST_ENTRY (condvar_4)
249 TEST_ENTRY (condvar_5)
250 TEST_ENTRY (semaphore_1)
251 TEST_ENTRY (semaphore_2)
252 TEST_ENTRY (semaphore_3)
254 TEST_ENTRY (pipe_connect_bad_name)
255 TEST_ENTRY (pipe_connect_to_file)
258 TEST_ENTRY (stdio_over_pipes)
259 TEST_ENTRY (ipc_listen_before_write)
260 TEST_ENTRY (ipc_listen_after_write)
262 TEST_ENTRY (ipc_send_recv_pipe)
264 TEST_ENTRY (ipc_send_recv_tcp)
265 TEST_ENTRY (ipc_tcp_connection)
267 TEST_ENTRY (tcp_ping_pong)
268 TEST_HELPER (tcp_ping_pong, tcp4_echo_server)
270 TEST_ENTRY (tcp_ping_pong_v6)
271 TEST_HELPER (tcp_ping_pong_v6, tcp6_echo_server)
273 TEST_ENTRY (pipe_ping_pong)
274 TEST_HELPER (pipe_ping_pong, pipe_echo_server)
276 TEST_ENTRY (delayed_accept)
277 TEST_ENTRY (multiple_listen)
279 TEST_ENTRY (tcp_writealot)
280 TEST_HELPER (tcp_writealot, tcp4_echo_server)
282 TEST_ENTRY (tcp_open)
283 TEST_HELPER (tcp_open, tcp4_echo_server)
285 TEST_ENTRY (tcp_shutdown_after_write)
286 TEST_HELPER (tcp_shutdown_after_write, tcp4_echo_server)
288 TEST_ENTRY (tcp_connect_error_after_write)
289 TEST_ENTRY (tcp_bind_error_addrinuse)
290 TEST_ENTRY (tcp_bind_error_addrnotavail_1)
291 TEST_ENTRY (tcp_bind_error_addrnotavail_2)
292 TEST_ENTRY (tcp_bind_error_fault)
293 TEST_ENTRY (tcp_bind_error_inval)
294 TEST_ENTRY (tcp_bind_localhost_ok)
295 TEST_ENTRY (tcp_listen_without_bind)
296 TEST_ENTRY (tcp_connect_error_fault)
297 TEST_ENTRY (tcp_connect_timeout)
298 TEST_ENTRY (tcp_close_while_connecting)
299 TEST_ENTRY (tcp_close)
300 TEST_ENTRY (tcp_flags)
301 TEST_ENTRY (tcp_write_to_half_open_connection)
302 TEST_ENTRY (tcp_unexpected_read)
304 TEST_ENTRY (tcp_read_stop)
305 TEST_HELPER (tcp_read_stop, tcp4_echo_server)
307 TEST_ENTRY (tcp_bind6_error_addrinuse)
308 TEST_ENTRY (tcp_bind6_error_addrnotavail)
309 TEST_ENTRY (tcp_bind6_error_fault)
310 TEST_ENTRY (tcp_bind6_error_inval)
311 TEST_ENTRY (tcp_bind6_localhost_ok)
313 TEST_ENTRY (udp_send_and_recv)
314 TEST_ENTRY (udp_dgram_too_big)
315 TEST_ENTRY (udp_dual_stack)
316 TEST_ENTRY (udp_ipv6_only)
317 TEST_ENTRY (udp_options)
318 TEST_ENTRY (udp_multicast_join)
319 TEST_ENTRY (udp_multicast_ttl)
321 TEST_ENTRY (udp_open)
322 TEST_HELPER (udp_open, udp4_echo_server)
324 TEST_ENTRY (pipe_bind_error_addrinuse)
325 TEST_ENTRY (pipe_bind_error_addrnotavail)
326 TEST_ENTRY (pipe_bind_error_inval)
327 TEST_ENTRY (pipe_listen_without_bind)
329 TEST_ENTRY (connection_fail)
330 TEST_ENTRY (connection_fail_doesnt_auto_close)
332 TEST_ENTRY (shutdown_close_tcp)
333 TEST_HELPER (shutdown_close_tcp, tcp4_echo_server)
334 TEST_ENTRY (shutdown_close_pipe)
335 TEST_HELPER (shutdown_close_pipe, pipe_echo_server)
337 TEST_ENTRY (shutdown_eof)
338 TEST_HELPER (shutdown_eof, tcp4_echo_server)
340 TEST_ENTRY (callback_stack)
341 TEST_HELPER (callback_stack, tcp4_echo_server)
343 TEST_ENTRY (error_message)
346 TEST_ENTRY (timer_init)
347 TEST_ENTRY (timer_again)
348 TEST_ENTRY (timer_start_twice)
349 TEST_ENTRY (timer_order)
350 TEST_ENTRY (timer_huge_timeout)
351 TEST_ENTRY (timer_huge_repeat)
352 TEST_ENTRY (timer_from_check)
354 TEST_ENTRY (idle_starvation)
357 TEST_ENTRY (idle_ref)
358 TEST_ENTRY (fs_poll_ref)
359 TEST_ENTRY (async_ref)
360 TEST_ENTRY (prepare_ref)
361 TEST_ENTRY (check_ref)
362 TEST_ENTRY (unref_in_prepare_cb)
363 TEST_ENTRY (timer_ref)
364 TEST_ENTRY (timer_ref2)
365 TEST_ENTRY (fs_event_ref)
367 TEST_ENTRY (tcp_ref2)
368 TEST_ENTRY (tcp_ref2b)
369 TEST_ENTRY (tcp_ref3)
370 TEST_HELPER (tcp_ref3, tcp4_echo_server)
371 TEST_ENTRY (tcp_ref4)
372 TEST_HELPER (tcp_ref4, tcp4_echo_server)
374 TEST_ENTRY (udp_ref2)
375 TEST_ENTRY (udp_ref3)
376 TEST_HELPER (udp_ref3, udp4_echo_server)
377 TEST_ENTRY (pipe_ref)
378 TEST_ENTRY (pipe_ref2)
379 TEST_ENTRY (pipe_ref3)
380 TEST_HELPER (pipe_ref3, pipe_echo_server)
381 TEST_ENTRY (pipe_ref4)
382 TEST_HELPER (pipe_ref4, pipe_echo_server)
383 TEST_ENTRY (process_ref)
385 TEST_ENTRY (loop_handles)
386 TEST_ENTRY (walk_handles)
394 TEST_ENTRY (get_currentexe)
396 TEST_ENTRY (process_title)
398 TEST_ENTRY (cwd_and_chdir)
400 TEST_ENTRY (get_memory)
402 TEST_ENTRY (get_loadavg)
406 TEST_ENTRY (getaddrinfo_basic)
407 TEST_ENTRY (getaddrinfo_concurrent)
409 TEST_ENTRY (getsockname_tcp)
410 TEST_ENTRY (getsockname_udp)
412 TEST_ENTRY (poll_duplex)
413 TEST_ENTRY (poll_unidirectional)
414 TEST_ENTRY (poll_close)
416 TEST_ENTRY (spawn_fails)
417 TEST_ENTRY (spawn_exit_code)
418 TEST_ENTRY (spawn_stdout)
419 TEST_ENTRY (spawn_stdin)
420 TEST_ENTRY (spawn_stdio_greater_than_3)
421 TEST_ENTRY (spawn_ignored_stdio)
422 TEST_ENTRY (spawn_and_kill)
423 TEST_ENTRY (spawn_detached)
424 TEST_ENTRY (spawn_and_kill_with_std)
425 TEST_ENTRY (spawn_and_ping)
426 TEST_ENTRY (spawn_preserve_env)
427 TEST_ENTRY (spawn_setuid_fails)
428 TEST_ENTRY (spawn_setgid_fails)
429 TEST_ENTRY (spawn_stdout_to_file)
430 TEST_ENTRY (spawn_auto_unref)
435 TEST_ENTRY (spawn_detect_pipe_name_collisions_on_windows)
436 TEST_ENTRY (argument_escaping)
437 TEST_ENTRY (environment_creation)
438 TEST_ENTRY (listen_with_simultaneous_accepts)
439 TEST_ENTRY (listen_no_simultaneous_accepts)
440 TEST_ENTRY (fs_stat_root)
442 TEST_ENTRY (spawn_setuid_setgid)
443 TEST_ENTRY (we_get_signal)
444 TEST_ENTRY (we_get_signals)
445 TEST_ENTRY (signal_multiple_loops)
449 TEST_ENTRY (osx_select)
452 TEST_ENTRY (fs_file_noent)
453 TEST_ENTRY (fs_file_nametoolong)
454 TEST_ENTRY (fs_file_loop)
455 TEST_ENTRY (fs_file_async)
456 TEST_ENTRY (fs_file_sync)
457 TEST_ENTRY (fs_async_dir)
458 TEST_ENTRY (fs_async_sendfile)
459 TEST_ENTRY (fs_fstat)
460 TEST_ENTRY (fs_chmod)
461 TEST_ENTRY (fs_chown)
462 TEST_ENTRY (fs_utime)
463 TEST_ENTRY (fs_futime)
464 TEST_ENTRY (fs_readlink)
465 TEST_ENTRY (fs_symlink)
466 TEST_ENTRY (fs_symlink_dir)
467 TEST_ENTRY (fs_stat_missing_path)
468 TEST_ENTRY (fs_read_file_eof)
469 TEST_ENTRY (fs_file_open_append)
470 TEST_ENTRY (fs_event_watch_dir)
471 TEST_ENTRY (fs_event_watch_file)
472 TEST_ENTRY (fs_event_watch_file_twice)
473 TEST_ENTRY (fs_event_watch_file_current_dir)
474 TEST_ENTRY (fs_event_no_callback_after_close)
475 TEST_ENTRY (fs_event_no_callback_on_close)
476 TEST_ENTRY (fs_event_immediate_close)
477 TEST_ENTRY (fs_event_close_with_pending_event)
478 TEST_ENTRY (fs_event_close_in_callback)
479 TEST_ENTRY (fs_readdir_empty_dir)
480 TEST_ENTRY (fs_readdir_file)
481 TEST_ENTRY (fs_open_dir)
482 TEST_ENTRY (fs_rename_to_existing_file)
483 TEST_ENTRY (threadpool_queue_work_simple)
484 TEST_ENTRY (threadpool_queue_work_einval)
485 TEST_ENTRY (threadpool_multiple_event_loops)
486 TEST_ENTRY (threadpool_cancel_getaddrinfo)
487 TEST_ENTRY (threadpool_cancel_work)
488 TEST_ENTRY (threadpool_cancel_fs)
489 TEST_ENTRY (threadpool_cancel_single)
490 TEST_ENTRY (thread_mutex)
491 TEST_ENTRY (thread_rwlock)
492 TEST_ENTRY (thread_create)
497 /* These are for testing the test runner. */
498 TEST_ENTRY (fail_always)
499 TEST_ENTRY (pass_always)