Commit Graph

1541 Commits

Author SHA1 Message Date
Igor Zinkovsky
cfa1423f96 fix fs_file_noent on windows 2011-09-08 18:23:19 -07:00
Bert Belder
2d1c672e2d More MinGW fixes 2011-09-08 23:49:46 +02:00
Erick Tryzelaar
1a43429774 Fix test-fs.c for darwin. 2011-09-08 14:22:08 -07:00
Erick Tryzelaar
f4e2d5559f Fix test-get-currentexe on darwin.
Darwin uses _NSGetExecutablePath to determine
the path of an executable, but that can return
an absolute path. This patch tweaks the executable
path to strip off a potential "./" prefix from
argv[0], which fixes the test.
2011-09-08 14:20:06 -07:00
Ben Noordhuis
98b9f582f4 test: make sure that write callbacks run when handle is closed 2011-09-08 19:13:39 +02:00
Ben Noordhuis
90ea007f61 test: fix compiler warnings for test-spawn.c 2011-09-08 00:15:47 +02:00
Ben Noordhuis
5641503ae7 test: fix compiler warnings for test-fs.c
Include <unistd.h> on Unices, fixes warnings about unlink() not being declared.
2011-09-08 00:15:07 +02:00
Ben Noordhuis
4d7cfe4313 test: remove stale prototype declaration 2011-09-08 00:00:18 +02:00
Ben Noordhuis
e8ab5cbe70 test: fix utime and futime tests on windows 2011-09-06 03:48:09 +02:00
Ben Noordhuis
79d9f81881 unix: implement uv_fs_futime, add tests for uv_fs_utime and uv_fs_futime 2011-09-06 02:52:52 +02:00
Ben Noordhuis
b7d88070d8 fs: add UV_ENOENT error code, add test 2011-09-06 00:17:59 +02:00
Igor Zinkovsky
a8017fd8a2 windows: update uv_fs_* functions to work with req.path 2011-09-04 23:58:31 -07:00
Ryan Dahl
a18860aec6 Add uv_fs_t.path on unix and tests
Windows implementation missing https://github.com/joyent/libuv/issues/177
2011-09-04 18:05:11 -07:00
Ryan Dahl
7ccc7470e0 Add test for uv_fs_readdir sync 2011-09-04 16:54:27 -07:00
Ryan Dahl
142a70292b unix: fix fs_chmod 2011-09-04 16:09:45 -07:00
Ben Noordhuis
826db45343 test: fix uv_fs_readdir test
Don't make assumptions about the order in which the
directory entries are returned by the file system.
2011-09-05 00:57:23 +02:00
Peter Bright
7db243dc6f Bring inline with node common.gypi.
Win32 readlink()
2011-09-04 13:24:45 -07:00
Igor Zinkovsky
060026ced3 windows: uv_fs_link + uv_fs_symlink 2011-09-04 13:24:35 -07:00
Bert Belder
12b01e95f9 Specialize uv_xxx_getsockname, add uv_tcp_getpeername 2011-09-04 04:49:13 +02:00
Igor Zinkovsky
cf5ed86a79 windows: implement missing fs functions 2011-09-03 12:23:27 -07:00
Ryan Dahl
9f932f92cf add test fs_chmod, implement uv_fs_fchmod and uv_fs_chmod on unix 2011-09-01 15:36:01 -07:00
Ryan Dahl
2e6035895c Add test for uv_fs_fstat, implement on unix. 2011-09-01 14:15:06 -07:00
Igor Zinkovsky
22197ebf3f windows: include _stat struct into uv_fs_t 2011-09-01 11:54:43 -07:00
Ryan Dahl
836cc204b6 unix: Fix test-gethostbyname 2011-08-31 15:37:16 -07:00
Bert Belder
b44ecf9929 multiplicity: update benchmarks 2011-08-31 05:18:48 +02:00
Bert Belder
8e3a8602ad update tests for multiplicity 2011-08-31 04:19:26 +02:00
Bert Belder
3aec77f9d4 bring back uv_init 2011-08-31 04:19:07 +02:00
Ryan Dahl
56dcaf9b06 unix: multiplicity 2011-08-31 04:18:55 +02:00
Ryan Dahl
a6ed1757ab unix: implement uv_fs_lstat 2011-08-30 01:32:53 -07:00
Ryan Dahl
d20233c7a8 Fix long lines 2011-08-30 00:54:59 -07:00
Ryan Dahl
894c005c42 unix: fix fs_async_sendfile 2011-08-30 00:52:43 -07:00
Ryan Dahl
0e81406bfb unix fs_async_dir works 2011-08-29 22:08:51 -07:00
Ryan Dahl
cf08c168ea Use Windows compatibile flags 2011-08-29 20:50:12 -07:00
Ryan Dahl
5d524fff1a unix passes test fs_file_async 2011-08-29 20:41:45 -07:00
Ryan Dahl
7cad73aa47 Fix build for UNIX 2011-08-26 11:26:24 -07:00
Igor Zinkovsky
25175c7071 uv_fs & uv_work APIs 2011-08-26 11:00:53 -07:00
Ben Noordhuis
738e2da0c1 test: add udp getsockname test 2011-08-25 02:55:49 +02:00
Bert Belder
36c9b791d4 Fix bugs in test-udp-send-and-recv and benchmark-udp-packet-storm 2011-08-24 05:24:07 +02:00
Ben Noordhuis
36ce74f2ca Add UDP support to libuv. 2011-08-24 04:55:01 +02:00
Ben Noordhuis
52024061e4 Make uv_getsockname() operate on uv_handle_t handles. 2011-08-24 04:17:36 +02:00
Bert Belder
cc0b0e6238 Remove trailing whitespace 2011-08-21 21:46:05 +02:00
Ryan Dahl
123119342f pound: only display connect errors on DEBUG 2011-08-18 15:31:54 -07:00
Igor Zinkovsky
f6c25a17ea Fix pipe-pound and clean-up 2011-08-18 15:30:34 -07:00
Ryan Dahl
ac1ce29ad0 Improve pound benchmark by reconnecting in close_cb 2011-08-18 15:30:34 -07:00
Ryan Dahl
e5a938f1f4 Add uv_buf_init() constructor 2011-08-17 17:43:19 -07:00
Jeroen Janssen
507c4ccea6 fixes for unsigned/signed comparison 2011-08-17 13:58:55 +02:00
Igor Zinkovsky
23e9ecb667 fix memory leak in echo server 2011-08-11 18:19:59 -07:00
Bert Belder
2d40e35b7e Style 2011-08-12 02:43:59 +02:00
Ben Noordhuis
d358738954 bench: #undef NANOSEC, defined in time.h on solaris 2011-08-11 23:43:52 +00:00
Peter Bright
3409c9b383 Include important Windows environmental variables even when a blank/custom environment is specified. 2011-08-09 14:29:51 -07:00
Ben Noordhuis
3f8bbb8c0f bench: create separate arrays for TCP and pipe streams
Size and alignment of tcp_conn_rec and pipe_conn_rec may differ
so it's not safe to reuse a single array of conn_rec elements.
2011-08-09 20:02:59 +02:00
Ben Noordhuis
65ed582cae bench: run pound benchmark for at least 5 seconds, track connect failures 2011-08-09 03:16:29 +02:00
Ben Noordhuis
cee3cc6940 bench: use high-res timer in pound benchmark 2011-08-09 01:51:25 +02:00
Igor Zinkovsky
f9eda88fe6 fix for pound benchmark 2011-08-08 15:09:14 -07:00
Ben Noordhuis
7dda111306 test, bench: add --list option to runners, prints available tests 2011-08-06 23:57:28 +02:00
Igor Zinkovsky
a706a66d81 accept benchmark 2011-08-05 18:20:06 -07:00
Peter Bright
d84b249616 Support for unescaped arguments, suitable for use with cmd /c.
Robust argument escaping that hopefully matches Windows' algorithm for unescaping.
2011-08-04 18:22:47 -07:00
Igor Zinkovsky
6d940a3afc windows: remove dependency on rpcrt4 and ole32 libs. fixes https://github.com/joyent/libuv/issues/118 2011-08-01 20:10:55 -07:00
Igor Zinkovsky
c35548a69e fix spawn_and_kill test on windows 2011-08-01 16:50:59 -07:00
Ben Noordhuis
aa37c698ee test: add platform-specific checks for kill-after-spawn test 2011-08-02 00:46:44 +02:00
Ben Noordhuis
5a15717144 test: make spawn_helper4 never return
Its whole raison d'être is to sleep until it's killed.
2011-08-02 00:46:44 +02:00
Ben Noordhuis
e56c1d7a60 test: exit with status code 1 in spawn_helper4
Fixes broken test spawn_and_kill.
2011-08-01 22:42:32 +02:00
Ben Noordhuis
31ecdcf3a4 test: move run-test spawn helpers to a separate function 2011-08-01 22:42:32 +02:00
Ben Noordhuis
023f99a609 test: gets(3)? Just say no! 2011-08-01 18:14:14 +02:00
Ryan Dahl
e9bee5131a add spawn benchmark 2011-07-30 22:45:03 -07:00
Igor Zinkovsky
3e6611a693 more output 2011-07-29 23:54:52 -07:00
Igor Zinkovsky
d272a2183d Windows: spawn child processes 2011-07-29 19:02:51 -07:00
Ryan Dahl
7108ca8853 uv_spawn requires stdio pipes to be initialized 2011-07-29 15:37:00 -07:00
Ben Noordhuis
78e94e9589 bench: remove unused locals from benchmark-pump.c 2011-07-29 21:07:09 +02:00
Ben Noordhuis
eed6f395d1 pipe: uv_pipe_listen raises UV_EINVAL on unbound socket 2011-07-29 04:22:59 +02:00
Ryan Dahl
ddee1821fa Add spawn_stdout test 2011-07-25 17:11:23 -07:00
Ryan Dahl
92bc7b4959 Start uv_spawn()
Unix only at the moment. Lacks test for stdio
2011-07-25 16:19:27 -04:00
Igor Zinkovsky
e7497227bd merge uv_tcp_listen and uv_pipe_listen into uv_listen 2011-07-22 16:57:09 -07:00
Ben Noordhuis
27999e839a test: update BAD_PIPENAME for Unices, check for UV_EACCESS 2011-07-21 19:48:42 +02:00
Ben Noordhuis
7fbe0c3882 test: run-tests helper_name runs helper in same process
Fixes #116.
2011-07-21 19:02:19 +02:00
Bert Belder
1ab28df433 Test that loop refs going down to zero in a prepare callback does not hang the event loop 2011-07-21 14:53:40 +02:00
Bert Belder
9d8c9cce7c Move loop reference tests to their own file 2011-07-21 14:51:56 +02:00
Bert Belder
5f12c30f73 Correct idle_starvation test 2011-07-21 03:28:40 +02:00
Bert Belder
d9612fe0e7 More changes related to uv_close returning void 2011-07-21 03:27:43 +02:00
Ryan Dahl
b931c9313f uv_close returns void 2011-07-20 18:03:48 -07:00
Bert Belder
f0c20aa913 Test: active idle watcher should not block other events 2011-07-21 02:53:27 +02:00
Igor Zinkovsky
afc998759f Add uv_pipe_bind tests 2011-07-21 02:25:10 +02:00
Ryan Dahl
685c083c79 Only sleep on 'make bench' not on 'make test' 2011-07-20 12:18:07 -07:00
Ryan Dahl
b13a446d6c Test for sync tcp and pipe connections 2011-07-20 12:14:21 -07:00
Ben Noordhuis
eb5e00fd1b runner: give helpers a chance to clean up after the test.
Fixes #50.
2011-07-20 21:13:00 +02:00
Ben Noordhuis
6c8acb0ed1 task: flush stderr after printing 2011-07-20 21:00:59 +02:00
Ryan Dahl
b38ba04698 Fix benchmark output for ares and getaddrinfo 2011-07-20 11:53:09 -07:00
Ryan Dahl
abf854597b Don't output progress in 'make bench'
Fixes #115.
2011-07-20 11:44:10 -07:00
Ryan Dahl
a24d6e4bd8 new uv_req_t sizes in benchmark-sizes 2011-07-19 09:35:09 -07:00
Bert Belder
3d2d97dbae Make test-hrtime a little better 2011-07-19 15:01:11 +02:00
Bert Belder
96f2ef6bc6 Make test-getsockname compile with msvc 2011-07-19 15:01:10 +02:00
Ben Noordhuis
c2ad51e39f test-bind-error: fix 'control reaches end of non-void function' 2011-07-19 13:51:31 +02:00
Ryan Dahl
d4563a197a Allow and test for lazy uv_tcp_listen 2011-07-19 02:40:54 -07:00
Ryan Dahl
07b49ce59a add uv_ip4_name and uv_ip6_name 2011-07-18 17:39:04 -07:00
Ben Noordhuis
4eff34da43 uv-unix: pipes API implementation
Based on UNIX sockets to avoid the vagaries of FIFOs
in asynchronous mode. Currently unlinks stale sockets
before binding and cleans them up again after shutdown.
2011-07-19 00:58:02 +02:00
Igor Zinkovsky
4d31f838b0 Windows: handle ERROR_PIPE_BUSY in uv_pipe_connect 2011-07-18 13:02:32 -07:00
Bert Belder
902dd567b1 Benchmarks use the improved request api 2011-07-14 10:46:34 -07:00
Bert Belder
0ea4c87f8b Windows implementation of new request API
This changes uv-win to use the new uv_req subclasses.

It gets rid of the uv_req.flags field. There used to be only request flag
(UV_REQ_PENDING), and it was mostly obsolete; it only had a real purpose for
internal uv_read requests. Now we'll use the UV_HANDLE_READ_PENDING flag on
the handle instead.

This patch also simplifies the accept logic for named pipes on windows. We
no longer have a separate struct to store information about established
connections. Instead we just carry over the windows HANDLE from the accept
request to the client handle in uv_pipe_accept().
2011-07-14 10:46:08 -07:00
Ryan Dahl
abe0b1ea61 Better request API
Instead of uv_shutdown, uv_write, uv_connect taking raw uv_req_t we subclass
uv_req_t into uv_shutdown_t, uv_write_t, and uv_connect_t.

uv_req_init is removed.
2011-07-14 10:45:28 -07:00
Igor Zinkovsky
f5ff869488 allocate windows pipe handles on demand 2011-07-13 20:43:10 -07:00
Ben Noordhuis
9aff11026b runner: bring back benchmark output 2011-07-14 03:33:56 +02:00
Bert Belder
4c2d0545fc Whitespace fixes 2011-07-14 03:00:21 +02:00
Ben Noordhuis
a29b2099ac Make it possible to run individual tests.
Fixes #100.
2011-07-14 02:19:36 +02:00
Ben Noordhuis
9c19391536 test-ping-pong: cast callback to expected prototype. 2011-07-13 18:06:05 +02:00
Ben Noordhuis
afc96b58c8 test-delayed-accept.c: fix type mismatch in comparison. 2011-07-13 18:06:05 +02:00
Ben Noordhuis
1a53b89847 test-hrtime: fix printf() compiler warning. 2011-07-13 18:06:05 +02:00
Ben Noordhuis
0ebd2ce02d test-delayed-accept: remove unused variable. 2011-07-13 18:06:05 +02:00
Ben Noordhuis
d7389e6f89 test-async: remove unused variable. 2011-07-13 18:06:05 +02:00
Ben Noordhuis
4829ad5d04 test-getsockname: fix function prototype, clean up unused variable. 2011-07-13 18:06:05 +02:00
Bert Belder
036d5db16f test-getsockname: minor cleanups 2011-07-13 16:39:54 +02:00
Henry Rawas
6a67b51b4c fix uv_getsockname for listening socket 2011-07-12 22:43:43 +02:00
Henry Rawas
6b32ebc54f uv_getsockname 2011-07-12 09:57:08 -07:00
Igor Zinkovsky
2e49cc56d1 Rename uv_pipe_create to uv_pipe_bind.
Fixes issue #97.
2011-07-11 15:24:35 -07:00
Igor Zinkovsky
b6a6dae34f Named pipes implementation for Windows 2011-07-09 21:41:04 +02:00
Robert Mustacchi
8c00b369b4 C99 compatibility.
Get 99% of the way there for --std=c89 -pedantic for core files. Also cleans
up follow up warnings and others in tests.
2011-07-07 21:39:08 -07:00
Ben Noordhuis
1717d42165 read() and write() return ssize_t, not size_t.
rv < 0 error checks were always false.
2011-07-08 00:40:13 +02:00
Ryan Dahl
ce8ff3031c src/ and include/ directories
Helps #71 but does not update the MSVC files.
2011-07-07 07:52:57 -07:00
Henry Rawas
a4b05abce6 optional IPv6 for echo-server 2011-07-06 17:07:37 -07:00
Ben Noordhuis
9a5b47d915 uv_sleep() takes milliseconds, usleep() microseconds. Convert argument. 2011-07-06 13:53:01 -07:00
Henry Rawas
26880b0c90 win: IPv6 connect 2011-07-05 09:45:57 -07:00
Ben Noordhuis
09bd08ed97 Assert that uv_hrtime() actually sleeps for several microseconds. 2011-07-01 12:28:24 -04:00
Igor Zinkovsky
320057d588 uv_stream_t 2011-07-01 05:28:02 -07:00
Ryan Dahl
5b7cfe4bd4 unbreak 'make bench' 2011-06-28 21:11:33 +02:00
Ryan Dahl
796621c773 Implement c-ares on unix. 2011-06-28 21:08:17 +02:00
Ryan Dahl
fa514948fc Move around uv_hrtime in the header 2011-06-28 14:30:10 +02:00
Ryan Dahl
7b56134f73 Rename uv_get_hrtime, uv_get_exepath to uv_hrtime, uv_exepath 2011-06-28 14:26:28 +02:00
Matt Stevens
caf1a99115 IPv6 support
Fixes #70.
Fixes #19.
2011-06-28 14:11:21 +02:00
Bert Belder
8801925b41 Un-break the unix build 2011-06-25 17:47:46 +02:00
Bert Belder
21969b7a6f benchmark-getaddrinfo: resolve more, use less concurrency 2011-06-25 17:47:39 +02:00
Bert Belder
16f471fa2e Separate uv_getaddrinfo tests 2011-06-25 17:47:39 +02:00
Bert Belder
f04abc966a Avoid type warnings in benchmark-sizes 2011-06-25 17:47:33 +02:00
Bert Belder
5115d446c6 Misc. cleanups 2011-06-25 17:38:35 +02:00
Henry Rawas
295fa6f538 Windows: getaddrinfo support 2011-06-23 01:31:17 +02:00
Ryan Dahl
af15cbe6e9 Handle EAGAIN in some of the read_cb tests 2011-06-22 18:37:51 +02:00
Henry Rawas
4aeee38484 c-ares integration on windows 2011-06-22 15:21:01 +02:00
Robert Mustacchi
6eefdaf966 Fixes #61. Failure in test-hrtime 2011-06-19 14:03:01 +02:00
Bert Belder
4eb06151bd Split up uv_loop type 2011-06-17 23:00:39 +02:00
Bert Belder
debae03771 Declare variables first 2011-06-17 23:00:38 +02:00
Ryan Dahl
8218146a1c uv_ip4_addr: Clear the struct sockaddr_in before using 2011-06-17 18:53:54 +02:00
Ryan Dahl
24baf36075 Add test for uv_get_hrtime 2011-06-17 11:47:35 +02:00
Ryan Dahl
2b5707d834 Correct uv_counter API 2011-06-12 15:55:17 +02:00
Ryan Dahl
aabe56b680 uv_tcp_init() must be called before uv_accept()
Windows broken.
2011-06-09 23:33:33 +02:00
Ryan Dahl
9400c3ffff Add some counters for testing 2011-06-09 23:33:30 +02:00
Ryan Dahl
6d07c0d522 benchmarks should print helper output too 2011-06-09 19:45:19 +02:00
Ryan Dahl
b3863c8051 nread should have type ssize_t 2011-06-09 19:45:19 +02:00
Ryan Dahl
b2df6d9a99 Increase racy sleep to make some tests pass 2011-06-08 15:18:03 +02:00
Ryan Dahl
04b6aaeb44 API Change: Move close_cb to uv_close from init functions 2011-06-08 05:44:22 -07:00
Ryan Dahl
7db9629f87 API Change: Remove data parameters from init functions 2011-06-08 05:43:02 -07:00
Bert Belder
cfca30433f API change: report accept errors to connection_cb 2011-06-07 18:11:43 +02:00
Bert Belder
fbd2d7a194 Misc. cleanups 2011-06-07 18:11:42 +02:00
Ryan Dahl
3ee60b7351 test runner separator should be paired with progress bar 2011-06-07 14:23:40 +02:00
Ryan Dahl
8a0742910c accept_cb -> connection_cb 2011-06-07 14:12:25 +02:00
Bert Belder
aa59c81d60 Declare variables first please 2011-06-07 00:35:18 +02:00
Bert Belder
3d9b965aee Whitespace error 2011-06-07 00:34:34 +02:00
Ryan Dahl
acbd168069 Add test to assert behavior of uv_tcp_t after shutdown
Handles should *never* call the close callback without the user having first
issued a uv_close() command.

This test is broken on windows. See #52.
2011-06-03 02:54:50 -07:00
Ryan Dahl
903c07bf98 API Change: uv_close only called by user - never automatically
Add test that failing on_connect callback does not trigger on_close.
2011-06-03 02:49:55 -07:00
Ryan Dahl
7770b1a1f6 API change: alloc_cb moved to uv_read_start()
Fixes #47.
2011-06-03 02:30:00 -07:00
Ryan Dahl
6b07791598 API Change: Pass sockaddr_in by value instead of reference 2011-06-03 02:19:35 -07:00
Ryan Dahl
11a4ad50c8 Separate out uv_handle_t into different types
Fixes #4
2011-06-03 11:03:52 +02:00
Bert Belder
d5b3ae0f58 usleep -> uv_sleep 2011-05-27 19:41:34 +02:00
Ryan Dahl
982a620f1c Echo server gracefully dies on 'Q'
Allows for better clean up during tests.
2011-05-27 02:11:43 -07:00
Ryan Dahl
e28c0bb60b unix: Use fork instead of vfork in runner. 2011-05-27 01:47:42 -07:00
Ryan Dahl
7e34b7bdfc runner: insert little delay after starting helpers 2011-05-27 01:47:42 -07:00
Ryan Dahl
f0ebf0c7fc Split pump bench into two processes.
And add a pump test with 1 client.
2011-05-27 01:32:48 -07:00
Igor Zinkovsky
9fc8a7f167 Adds uv_get_exepath API
Only works on Linux, Mac, Windows currently.
2011-05-24 08:40:27 -07:00
Bert Belder
d91b5012bd Test the right thing 2011-05-23 23:56:57 +02:00
Ryan Dahl
40f0ad6d36 unix: fix ref count tests 2011-05-22 12:56:54 -07:00
Ryan Dahl
1352c72e35 Add reference count tests
Broken on UNIX.
2011-05-22 12:56:49 -07:00
Ryan Dahl
9c2dd6bea9 timer tests to work on unix 2011-05-18 22:23:17 -07:00
Ryan Dahl
103099e175 pump: connect to 127.0.0.1 instead of 0.0.0.0 2011-05-18 21:18:52 -07:00
Bert Belder
ccc2784153 Avoid printf type warning in test-timer-again 2011-05-19 02:28:50 +02:00
Bert Belder
0fa733e0ea Forgot one assert in test-timer-again 2011-05-19 02:02:39 +02:00
Bert Belder
78c2930e25 Test for uv_timer_again ,~get_repeat, ~set_repeat 2011-05-19 01:58:07 +02:00
Ryan Dahl
452681fbe9 fix port conflict 2011-05-16 17:55:11 -07:00
Bert Belder
1676e4abcc Please, declare vars at the top 2011-05-17 02:29:20 +02:00
Ryan Dahl
816289ae8f unix: implement timers
currently loop_handles is broken.
2011-05-16 17:08:43 -07:00
Bert Belder
810651e04c Update tests & benchmarks to use the new timer api 2011-05-17 01:17:48 +02:00
Ryan Dahl
2b8812ffe1 uv_buf -> uv_buf_t 2011-05-13 07:15:02 -07:00
Ryan Dahl
d2653df01b Last but if oio renaming 2011-05-12 17:53:21 -07:00
Ryan Dahl
2ef3c6c632 oio -> uv 2011-05-11 20:21:49 -07:00
Ryan Dahl
1925a091d8 Only report read throughput from pump bench
Generally they are the same anyway...
2011-05-10 00:44:50 -07:00
Ryan Dahl
bf86b2e273 Run ping-pong bench for 5 secs 2011-05-10 00:42:18 -07:00
Ryan Dahl
2f4e65a1b2 Port to Solaris 2011-05-10 06:53:50 +00:00
Ryan Dahl
f0de01379f Use argv[0] if we can't get_executable_path() 2011-05-09 23:12:44 -07:00
Ryan Dahl
9f652d4729 Benchmarks print their own name 2011-05-09 21:39:02 -07:00
Ryan Dahl
1b85c9f211 Parsable output from pump bench 2011-05-09 21:29:33 -07:00
Ryan Dahl
34f12fa5a5 Remove unnecessary printf 2011-05-09 19:40:31 -07:00
Bert Belder
3530433dd1 Memory leak in pump benchmark 2011-05-10 02:43:10 +02:00
Bert Belder
391f0098de Loopback pump benchmark 2011-05-10 01:39:54 +02:00
Bert Belder
a379649899 Add handle->write_queue_size support for windows 2011-05-09 23:55:11 +02:00
Ryan Dahl
4eb2c6b3f2 Remove unnecessary function 2011-05-09 09:18:15 -07:00
Bert Belder
820c942e3a Make MS happy, declare variables first 2011-05-09 16:59:20 +02:00
Ryan Dahl
8f9ff78413 oio_err -> oio_err_t 2011-05-09 02:30:11 -07:00
Ryan Dahl
f71ea7f65d Fix compiler warning 2011-05-09 02:27:26 -07:00
Ryan Dahl
cc72a0d1ed unix: implement OIO_ASYNC
Had to hack up the test to be inline with how libev does things.
2011-05-09 02:25:03 -07:00
Ryan Dahl
67118c0b58 unix: initial implementation of prepare, check, idle
Had to comment out a few of the asserts in the test.
2011-05-09 01:02:06 -07:00
Ryan Dahl
9e9bae5eb6 unix: Stub out async and thread functions 2011-05-08 22:47:51 -07:00
Bert Belder
b1a8675ced Add test-async 2011-05-09 05:52:05 +02:00
Bert Belder
801b874415 Implement test threading helpers for windows 2011-05-09 05:52:04 +02:00
Bert Belder
d4c5e599f3 Define API for test threading helpers 2011-05-09 05:52:04 +02:00
Bert Belder
517a296c85 Add checks to test-loop-handles 2011-05-09 05:41:12 +02:00
Ryan Dahl
ba31e8d0fa Add _t to typedef structs 2011-05-08 02:40:39 -07:00
Bert Belder
5a5b435c5e Minor test-loop-handles fix 2011-05-08 05:08:31 +02:00
Bert Belder
e0be8efef6 Test for oio_prepare/oio_check/oio_idle 2011-05-08 04:45:56 +02:00
Ryan Dahl
5591ed9d74 Replace dummy benchmark with sizeof(oio_handle) 2011-05-07 19:32:51 -07:00
Bert Belder
850e4072e7 tests & benchmarks - make internal stuff static 2011-05-08 03:28:28 +02:00
Ryan Dahl
8e1645b85f LF after tests complete 2011-05-05 00:21:13 -07:00
Ryan Dahl
e9dcf598cc unix: Close on EOF if already shutdown 2011-05-04 15:36:40 -07:00
Bert Belder
636c75e0b6 Update ping-pongs benchmark to use the new api 2011-05-04 23:25:44 +02:00
Ryan Dahl
54c9436501 unix: fix test-callback-stack 2011-05-04 13:56:50 -07:00
Bert Belder
9d9c242a24 More extensive test-callback-stack. Fails on windows now. 2011-05-04 17:10:33 +02:00
Bert Belder
0d28b9e549 Echo server should shutdown instead of close 2011-05-04 03:59:35 +02:00
Ryan Dahl
7de6861146 shutdown half-implemented on unix 2011-05-03 16:57:05 -07:00
Ryan Dahl
a8e4c0bc6b Disable fail-always and pass-always 2011-05-03 16:56:26 -07:00
Ryan Dahl
b5e9579d05 Work around possible linux bug in bind_error_addrnotavail_1 2011-05-03 16:55:16 -07:00
Bert Belder
6d09362c8e Improve test-runner output
* fix rewind_cursor() for windows
* use stderr consistently
* let rewind_cursor() return void; closes #14
2011-05-04 00:41:50 +02:00
Bert Belder
773b0dcf79 Remove trailing whitespace 2011-05-04 00:41:49 +02:00
Bert Belder
270078adef Fix bugs in test-delayed-accept 2011-05-04 00:41:48 +02:00
Bert Belder
30d16e2dfd Windows: pass test-bind-error-fault 2011-05-04 00:41:37 +02:00
Bert Belder
26148c1310 No EACCESS, expect EADDRNOTAVAIL instead 2011-05-04 00:25:48 +02:00
Ryan Dahl
17c568b235 unix: fix tcp-writealot 2011-05-03 13:28:56 -07:00
Bert Belder
7124fc5eca Updated echo-server 2011-05-03 21:30:09 +02:00
Bert Belder
b909ff5fba Some test fixes 2011-05-03 05:22:21 +02:00
Bert Belder
d553776f5d Fix echo-server and test-ping-pong 2011-05-03 02:55:51 +02:00
Bert Belder
6accf285db Fixed tests 2011-05-03 02:35:11 +02:00
Bert Belder
1a76881cb0 Yet another oio_read api. Hopefully this one sticks. 2011-05-03 00:31:22 +02:00
Ryan Dahl
8c6c48595a Make test runner better.
Probably screws up windows.
Fixes #30.
2011-04-28 15:19:11 -04:00
Joshua Peek
9b92e13721 Use _NSGetExecutablePath on darwin
Closes #26.
2011-04-28 01:18:00 +02:00
Ryan Dahl
b4836377f9 unix runner: implement timeout on process_wait 2011-04-25 21:54:17 -07:00
Ryan Dahl
1d9e1850f6 Linux passes bind tests 2011-04-25 20:08:56 -07:00
Bert Belder
a6430f4121 More bind error tests 2011-04-26 03:48:08 +02:00
Ryan Dahl
0a7c19e19e unix: implement errnos 2011-04-25 18:17:01 -07:00
Bert Belder
c3cd1ae937 Add test for EADDRINUSE 2011-04-26 01:59:37 +02:00
Bert Belder
7e9e0e5e32 Test-ping-pong: don't bind client address 2011-04-25 23:20:08 +02:00
Bert Belder
89da632a19 Make test-tcp-writealot faster 2011-04-25 23:19:52 +02:00
Bert Belder
c48e753d98 Fix bug in test-timeout 2011-04-25 23:17:48 +02:00
Bert Belder
a5bf3988ee Write-a-lot test 2011-04-22 05:12:10 +02:00
Bert Belder
c18d6649f8 Style 2011-04-22 05:09:58 +02:00
Bert Belder
c61b38f48b Test for not immediately calling oio_accept from accept_cb
Closes #10.
2011-04-22 00:46:31 +02:00
Alan Gutierrez
9468c6570a Check oio_err in connection_fail test.
* Renamed test_connection_fail to connection_fail following the conventions.
 * Mapped Windows error ERROR_CONNECTION_REFUSED to OIO_ECONNREFUSED.
 * Asserting that the oio_err in connection_fail is OIO_ECONNREFUSED.
2011-04-21 18:44:59 +08:00
Bert Belder
5bcbc31920 Tests / benchmarks use new error handling api 2011-04-20 22:34:21 +02:00
Bert Belder
67a3fa24dc Revert "Remove oio_err - use ints"
This reverts commit 111536c9e5.
2011-04-19 23:48:47 +02:00
Bert Belder
8a187171ed Remove oio_write2.
Closes #20
2011-04-19 17:04:31 +02:00
Bert Belder
53f9d5a841 Allow tests and benchmarks to use the same helpers.
Closes #21.
2011-04-19 14:51:10 +02:00
Bert Belder
2f1150e680 Fix windows build. Test-connection-fails still fails. 2011-04-19 14:22:18 +02:00
Ryan Dahl
111536c9e5 Remove oio_err - use ints 2011-04-19 02:29:36 -07:00
Ryan Dahl
595756048c Linux passes test_connection_fail 2011-04-19 02:09:58 -07:00
Ryan Dahl
461f0a74ce Add test-connection-fail. Not yet passing linux.
Feel free to modify.
2011-04-19 01:50:50 -07:00
Ryan Dahl
1a99dcc980 Add ping-pong benchmark
On Linux I'm getting

    ping_pongs: 22807 pings
2011-04-18 23:51:53 -07:00
Bert Belder
5275b036b0 Benchmark runner 2011-04-19 04:47:21 +02:00
Ryan Dahl
61e1f5f3c9 s/oio_tcp_handle_init/oio_tcp_init/ 2011-04-18 13:01:50 -07:00
Ryan Dahl
8f6a175e9d s/oio_tcp_handle_accept/oio_accept/ 2011-04-18 12:53:02 -07:00
Ryan Dahl
cf4fbc0925 Add copyright headers, license file.
closes #17.
2011-04-18 11:11:30 -07:00
Bert Belder
981616514b More MinGW compatibility 2011-04-18 19:29:11 +02:00
Bert Belder
50e3c5fa97 Resolve MinGW compile errors 2011-04-18 18:08:36 +02:00
Bert Belder
a3be5339e2 Rename test-runner to just runner
And a minor fix to the VS solution.
2011-04-18 14:44:01 +02:00
Ryan Dahl
c3eda7a4da oio_tcp_handle_accept() does not require initialization of client
closes #13.
2011-04-18 03:20:05 -07:00
Ryan Dahl
fa439e7bbc Style 2011-04-18 00:40:50 -07:00
Ryan Dahl
59f1ce0f44 Macro styling for ASSERT and FATAL.
closes #8.
closes #6.
2011-04-18 00:29:56 -07:00
Ryan Dahl
d546a3115f API Change: Remove unnecessary params from oio_tcp_handle_accept()
closes #13.
2011-04-18 00:12:36 -07:00
Ryan Dahl
0027dbd976 Implement and add test for oio_now() 2011-04-17 23:53:09 -07:00
Ryan Dahl
2ba25c8249 API change: oio_tcp_handle_init() required before oio_accept()
Fixes close_cb_stack on UNIX.
2011-04-17 22:51:13 -07:00
Ryan Dahl
42cefd934e linux: ping-pong test passes. 2011-04-17 19:15:08 -07:00
Ryan Dahl
c8bdf15f5d Unix: fix build for timer test 2011-04-15 11:21:07 -07:00
Ryan Dahl
84ebdf8429 style fixes to close_cb_stack 2011-04-15 11:05:15 -07:00
Bert Belder
0ffc8b6240 Timeout test passes on windows 2011-04-15 19:43:28 +02:00
Bert Belder
1ce1f82ca3 Typo 2011-04-15 19:38:29 +02:00
Bert Belder
aec5eac8bc Add oio_timeout test 2011-04-15 19:32:28 +02:00
Bert Belder
93dd5f74c7 Clean up test error handling
Define FATAL and ASSERT macros. Dont use libc's assert as it might get optimized away.
2011-04-15 03:32:55 +02:00
Ryan Dahl
7ed7bb34b0 Fix exit status checking in test-runner-unix 2011-04-14 13:16:04 -07:00
Ryan Dahl
769948a5ad test-runner compiles 2011-04-14 12:58:24 -07:00
Bert Belder
53207d0e78 Fix bug in test 2011-04-14 01:35:39 +02:00
Bert Belder
39d31a100f ol -> oio 2011-04-07 11:12:18 +02:00
Bert Belder
0d85eb252b API changes - unix broken 2011-04-07 10:50:14 +02:00
Bert Belder
ea149dd2d7 Windows: x64 support, fixes 2011-04-05 17:15:22 +02:00
Bert Belder
4899328166 Add ol_close_cb stack test and fix it for Windows 2011-04-05 04:28:40 +02:00
Bert Belder
56608452af Test runner minor fixes 2011-04-05 03:03:45 +02:00
Bert Belder
ad94c9297e First shot at test harness 2011-04-05 02:05:41 +02:00
Bert Belder
37ea7d572d Update tests 2011-04-01 00:10:44 +02:00
Bert Belder
3b0175c135 Echo demo fix 2011-03-31 14:30:25 +02:00
Bert Belder
5628ee9e51 API change - probably breaks unix 2011-03-31 14:23:49 +02:00
Ryan Dahl
42d96dc3ca Add ping-pong test - not yet working on unix 2011-03-31 00:21:15 -07:00
Ryan Dahl
5304a18002 Change around names in test directory - sorry bert 2011-03-30 22:42:02 -07:00
Ryan Dahl
3a23aaa21c ol_handle_new -> ol_tcp_handle_new 2011-03-29 19:57:11 -07:00
Ryan Dahl
311fbe3f8f Compile with -ansi 2011-03-29 16:42:13 -07:00
Bert Belder
0fe92b75bc C90 conformance 2011-03-30 01:35:40 +02:00
Ryan Dahl
4fdf0276b3 ... 2011-03-29 10:08:45 -07:00
Ryan Dahl
b17dcd55d7 compiles - obviously doesn't work 2011-03-28 03:54:18 -07:00
Ryan Dahl
6b0d4fa372 Mostly compiling 2011-03-28 03:26:00 -07:00
Ryan Dahl
151e2a8f0d Add libev, more changes 2011-03-28 03:17:52 -07:00
Ryan Dahl
cb17a5e37a New start 2011-03-28 01:55:29 -07:00