Dylan Cali
756087e017
test: support flexibly setting custom task options
...
Add a single TEST_ENTRY_CUSTOM hook that can be used to override task
entry defaults. Different tests can have different timeouts depending on
what is appropriate for each test. A separate TEST_OUTPUT_ENTRY hook is
no longer necessary.
In order to support per-task timeouts, the timeout field has been moved
into the task_entry_t struct. The default (5000) is now set as part of
TEST_ENTRY.
2014-02-01 00:50:40 +04:00
Bert Belder
53effc3dd8
Merge branch 'v0.10'
...
Conflicts:
ChangeLog
src/unix/process.c
src/version.c
2014-01-22 19:49:24 +01:00
Fedor Indutny
e403a2c486
process: close stdio after dup2'ing it
...
Thus allow passing the same file descriptor as the source of multiple
stdios.
Committed with the help and code parts from:
* Sam Roberts <sam@strongloop.com>
fix #1074
2014-01-22 22:39:08 +04:00
Bert Belder
140c863ff0
Merge branch 'v0.10'
...
Conflicts:
build.mk
Makefile.am
test/test-ipc.c
2013-12-21 02:42:48 -08:00
Bert Belder
c66340d59b
test: add pipe-server-close test
...
Add a regression test for the pipe server close issue on Windows, which
was reported in joyent/node#6749 and fixed in 7b16a3f .
2013-12-20 19:40:02 -08:00
Sam Roberts
ed36b85d3b
unix, windows: add uv_loop_alive() function
...
Useful to know when the the event loop is empty, this can't be done with
uv_run() without possibly blocking, or running some events (which might
empty the event loop as a side-effect).
2013-12-19 15:35:03 -08:00
Fedor Indutny
b5e7798a89
stream: introduce uv_try_write(...)
...
`uv_try_write(stream, buf, size)` acts like `uv_write()`,
but without queueing actual write until UV_POLLOUT (or IOCP completion).
This is useful for doing writes using on-stack `uv_write_t` requests.
fix #1025
2013-12-13 22:29:00 +04:00
Yorkie
4ed6496b9c
unix, windows: detect errors in uv_ip4/6_addr
2013-12-13 09:27:28 +01:00
Saúl Ibarra Corretgé
15af49a7a0
unix, windows: always update loop time
...
Fixes #846
2013-12-10 09:13:34 +01:00
Ben Noordhuis
a43537eead
test: back-port EMFILE test from master branch
...
Back-port the test from commit 27795cf from the master branch ("unix:
fix accept() EMFILE error handling").
2013-11-25 12:58:39 +01:00
Ben Noordhuis
27795cfc0f
unix: fix accept() EMFILE error handling
...
Fix a bug that was introduced in commit 3ee4d3f ("unix, windows:
return error codes directly") and add a regression test for good
measure.
Hat tip to Fedor for pointing out the issue.
Fixes #1007 .
2013-11-25 01:54:47 +01:00
Fedor Indutny
86b5c1ef1c
test: test fsevents error reporting
...
Create a lot of `FSEventStream`s to make `FSEventStreamStart()` fail.
Fetch the error code and verify that it is correct.
2013-11-13 18:18:56 +04:00
Fedor Indutny
6149b66ccb
Merge branch 'v0.10'
...
Conflicts:
build.mk
src/unix/core.c
src/unix/darwin.c
2013-11-12 15:30:54 +04:00
Fedor Indutny
bbccafbe70
unix: fix reopened fd bug
...
When fd is closed and new one (with the same number) is opened inside
kqueue/epoll/port loop's callback - stale events might invoke callbacks
on wrong watchers.
Check if watcher was changed after invocation and invalidate all events
with the same fd.
fix #826
2013-11-12 15:02:59 +04:00
Ben Noordhuis
24bfef2ef4
linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT
...
Work around an epoll quirk where it sometimes reports just the EPOLLERR
or EPOLLHUP event. In order to force the event loop to move forward,
we merge in the read/write events that the watcher is interested in;
uv__read() and uv__write() will then deal with the error or hangup in
the usual fashion.
Fixes #982 .
2013-11-08 05:16:55 +01:00
Ben Noordhuis
2bb3326c48
Merge remote-tracking branch 'origin/v0.10'
...
Drops commit 3780e12 ("fsevents: support japaneese characters in path")
for being quite inapplicable to the master branch. Will be reworked
and applied in a follow-up commit.
Conflicts:
README.md
build.mk
src/unix/fsevents.c
src/unix/udp.c
2013-11-08 03:44:31 +01:00
Ben Noordhuis
7f44933c43
include: remove uv_strlcat() and uv_strlcpy()
...
It was pointed out that they don't quite work like their BSD namesakes
and they arguably shouldn't have been part of the API anyway.
Fixes #983 .
2013-11-03 03:50:23 +01:00
Fedor Indutny
f9960184fd
test: add regression test for 29fdb3471
2013-10-31 01:16:02 +04:00
Fedor Indutny
429bb804ed
fsevents: fix clever rescheduling
...
There're could be a situation, where one fsevents handle gets created
and another one is destroyed simultaneously. In such cases
`fsevent_need_reschedule` will be set to 1 twice and reset only once,
leaving handle destructor hanging in uv_sem_wait().
2013-10-05 22:18:06 +04:00
Saúl Ibarra Corretgé
2b9c374c1c
windows: run close callbacks after polling for i/o
...
Makes the uv-win behavior compatible with uv-unix.
Fixes #796 .
2013-09-06 06:28:42 +02:00
Ben Noordhuis
5d2434bf71
unix, windows: add thread-local storage API
...
Uses the pthread_key_{create,delete} and pthread_{get,set}specific
functions on UNIX platforms, Tls{Alloc,Free} and Tls{Get,Set}Value
on Windows.
Fixes #904 .
2013-08-25 15:51:07 +02:00
Ben Noordhuis
1510ce81fd
unix, windows: allow NULL async callback
...
Allow a NULL callback so the user doesn't have to provide a dummy when
the actual event is processed by e.g. a check handle callback.
2013-08-12 08:55:51 +02:00
Miroslav Bajtoš
fd45f876ff
linux,darwin,win: link-local IPv6 addresses
...
Modified uv_ip6_addr() to fill sin6_scope_id for link-local addresses.
Fixes #271
Conflicts:
build.mk
2013-07-04 15:43:20 +02:00
Ben Noordhuis
ce2458c053
Merge remote-tracking branch 'origin/v0.10'
...
Conflicts:
test/test-fs.c
test/test-list.h
2013-06-26 10:35:41 +02:00
Ben Noordhuis
5841852703
test: add 'start timer from check handle' test
...
Check that a timer that is started from a check handle gets picked up
correctly, i.e. that it influences the timeout used in the next tick
of the event loop.
2013-06-26 13:56:32 +02:00
Ben Noordhuis
f6d8ba3c9a
unix, windows: run expired timers in run-once mode
...
Before this commit, creating an event loop, starting a timer and
calling uv_run(UV_RUN_ONCE) blocked in uv_run() until the timer
expired - but didn't actually run the timer.
2013-05-30 00:33:23 +02:00
Ben Noordhuis
ebdeaed2e3
Merge remote-tracking branch 'origin/v0.10'
...
Conflicts:
ChangeLog
src/version.c
2013-05-02 09:22:39 +02:00
Fedor Indutny
ac4e7e7ff2
stream: fix small nit in select hack, add test
2013-04-27 18:50:55 +02:00
Saúl Ibarra Corretgé
a92b66fe33
unix, windows: add uv_has_ref() function
2013-04-17 15:31:08 +02:00
Ben Noordhuis
76d831e4c8
unix: getaddrinfo_cb status arg should be 0 or -1
...
The documentation in uv.h states that the status argument to the
uv_getaddrinfo() callback is either 0 or -1 but uv-unix actually
passed it the addrinfo error code. Rectify that and add a regression
test.
Fixes #754 .
2013-03-26 22:30:46 +01:00
Ben Noordhuis
9b619396d9
unix: make timers handle large timeouts
...
This commit fixes two closely related integer overflow bugs:
* Timers with a timeout > INT_MAX cause uv__next_timeout() to return
a negative value.
* Timers with very large timeouts (close or equal to ULLONG_MAX) run on
the next tick.
In both cases, clamp the values to prevent the overflow from happening.
Fixes joyent/node#5101 .
2013-03-21 14:54:36 +01:00
Brian Mazza
77cb29a723
unix: make uv_timer_init() initialize repeat
...
uv_timer_get_repeat() should return 0 for timers that haven't been
started.
2013-03-19 23:15:30 +01:00
Saúl Ibarra Corretgé
bb3d1e24da
unix, windows: add uv_stop, stop running event loop
2013-02-25 16:21:37 +01:00
Ben Noordhuis
da0b84d4e8
unix: auto-unref spawn handle on process exit
...
Consistent, for better or worse, with uv-win.
Fixes #718 .
2013-02-22 14:39:40 +01:00
Shigeki Ohtsu
fadfeaf6ec
unix,windows: fix timer order in case of same timeout
...
Compare start_id of timer handles when they have the same timeout.
start_id is allocated with loop->timer_counter in uv_timer_start.
2013-02-10 17:46:22 +01:00
Ben Noordhuis
4cbd5c7b32
test: remove bad tcp_write_error test
...
It makes the assumption that if you try to write to a localhost socket
often enough, eventually its send queue will fill up - which doesn't
happen if the machine it's running on is fast enough.
2013-01-16 00:31:21 +01:00
Ben Noordhuis
9aab5d4837
Revert "unix: improve uv_guess_handle() implementation"
...
This reverts commit 98bcddc8dd .
It's making a lot of tests in the node.js test suite fail.
2013-01-11 13:40:25 +01:00
Ben Leslie
98bcddc8dd
unix: improve uv_guess_handle() implementation
...
uv_guess_handle is currently squelching both fifo and all
sockets on to the UV_NAMED_PIPE type. Rather than treating
all sockets as UV_NAMED_PIPE, use getsockopt() and
getsockaddr() to determine if the socket is an AF_UNIX
stream (in which case return UV_NAMED_PIPE), or an AF_INET
stream (in which case return UV_TCP), or an AF_INET datagram
socket (in which case return UV_UDP).
Additionally, currently all other file descriptor types are
squelched to the UV_FILE type. Instead, only file descriptors
that are marked as regular files are treated as UV_FILE. All
other types (such as directories, character and block devices)
are now treated as UV_UNKNOWN_HANDLE.
2013-01-08 05:26:58 +01:00
Ben Noordhuis
1f52fc1c5a
test: remove consumer_producer test
...
It fails intermittently on Travis for no other reason than that Travis
is occasionally slow. Reduce the number of false positives, remove the
test.
2013-01-06 19:19:23 +01:00
Ben Noordhuis
92a19a19dd
unix: ensure done_cb gets called after uv_cancel()
...
Wake up the event loop with uv_async_send() when a request is cancelled.
Ensures the done_cb is run on the next tick of the event loop.
Not sending a wakeup signal results in the done_cb not getting called until
another request completes, which may be a long time coming when it's the only
request in the queue or when other requests are executing long-running jobs.
Fixes #669 .
2012-12-28 18:09:39 +01:00
Saúl Ibarra Corretgé
0820be7008
Implemented uv_run2
...
Allows for running the event loop in 3 modes:
* default: loop runs until the refcount drops to zero
* once: poll for events only once and block until one is handled
* nowait: poll for events only once but don't block if there are
no pending events
2012-12-18 16:11:23 +01:00
Ben Noordhuis
c6c5b7a901
Merge branch 'v0.8'
2012-12-14 12:07:31 +01:00
Andrew Shaffer
49977386e9
sunos: properly disarm PORT_LOADED fsevent watcher
...
Fixes a segmentation fault when the watched entity is changed after the watcher
has been closed.
2012-12-14 12:02:57 +01:00
Ben Noordhuis
e079a99abd
unix: fix event loop stall
...
Fix a rather obscure bug where the event loop stalls when an I/O watcher is
stopped while an artificial event, generated with uv__io_feed(), is pending.
2012-12-13 20:17:12 +01:00
Ben Noordhuis
52c8a8617d
unix: add uv_cancel()
2012-12-09 15:12:42 +01:00
Fedor Indutny
09a7f85b70
unix: add uv_backend_fd() and uv_backend_timeout()
...
This can be used in conjuction with uv_run_once() to poll in one thread and run
the event loop's event callbacks in another.
Useful for embedding libuv's event loop in another event loop.
2012-11-28 16:30:50 +01:00
Shigeki Ohtsu
0cca5391ba
unix, windows: disallow NULL worker in thread pool
...
See #629 .
2012-11-24 01:09:49 +01:00
Charlie McConnell
fb64948746
unix: do not set environ unless one is provided
...
Currently, `uv_spawn` will set `environ` to the value of `options.env`, even if
`options.env` is `NULL`. This results in child processes for whom `environ ==
NULL`, which can cause a variety of unexpected issues.
This is a back-port of commit 1d85815 from the master branch.
2012-11-03 01:41:10 +01:00
Charlie McConnell
1d858156b4
unix: do not set environ unless one is provided
...
Currently, `uv_spawn` will set `environ` to the value of `options.env`, even if
`options.env` is `NULL`. This results in child processes for whom `environ ==
NULL`, which can cause a variety of unexpected issues.
2012-11-03 01:37:22 +01:00
Bert Belder
149b16f123
windows: closing handles should always keep the loop alive
...
This makes the tcp-ref2 and udp-ref2 tests pass again.
Also adds another reference count test.
2012-10-25 15:10:29 +02:00
Bert Belder
1e32cb01b5
unix: support signal handlers outside the main loop
2012-10-17 01:25:02 +02:00
Bert Belder
28eb619c65
windows: don't run signal tests
...
They are dummy tests on windows, running them is misleading.
Also remove duplicate 'test-signal.c' entry from uv.gyp.
2012-10-16 17:23:04 +02:00
Hiroaki Nakamura
acea3028c5
unix, windows: add thread barrier support
2012-10-09 17:30:52 +02:00
Shigeki Ohtsu
f7c991f1ce
test: add consumer-producer test for condvar
2012-10-07 23:17:31 +02:00
Hiroaki Nakamura
976c8a4387
Add support for condition variables on all platforms
2012-10-05 13:03:55 +02:00
Ben Noordhuis
1923abda94
test: add uv_fs_readlink test
2012-10-01 22:53:59 +02:00
Saúl Ibarra Corretgé
cc1c1912ca
unix, windows: add uv_tcp_open and uv_udp_open
2012-09-17 18:09:51 +02:00
Bert Belder
621a4e36f7
test: add test for uv_is_active and uv_is_closing
2012-08-27 23:57:48 +02:00
Ben Noordhuis
837edf4c0f
unix, windows: remove handle init counters
...
Remove the handle init counters, no one uses them.
2012-08-10 02:00:11 +02:00
Ben Noordhuis
ee50db6e36
unix, windows: preliminary signal handler support
...
* a no-op on Windows for now
* only supports the main loop on UNIX (again, for now)
2012-08-10 02:00:07 +02:00
Ben Noordhuis
13467a40d4
unix: retrieve execve() errors in process.c
...
Make the forked child process send the errno to its parent process when it
fails to spawn a new process.
2012-08-08 23:19:50 +02:00
Bert Belder
35c4858231
Remove c-ares tests and benchmarks
2012-08-07 01:03:51 +02:00
Ben Noordhuis
b5b8ead808
test: add failing fs_event test
...
Watches the same file twice. Fails on Linux with a segmentation fault.
2012-07-28 14:40:03 +02:00
Ben Noordhuis
1d1dd9bb7d
test: add 'unexpected read' tcp test
...
Regression test that verifies that the event loop doesn't busy loop when
the server sends a message and the client isn't reading.
2012-06-30 03:25:52 +02:00
Bert Belder
7628b6597e
test: fix test-gethostbyname to not use a DNS server on localhost
...
Because, you know, not everybody has one.
2012-06-29 05:44:20 +02:00
Ben Noordhuis
cc7c8542a5
unix, windows: add stat() based file watcher
...
Monitors a file path for changes. Supersedes ev_stat.
2012-05-31 20:32:24 +02:00
Iñaki Baz Castillo
b47af98e00
test: add tcp 'close on failed connect' test
...
Demonstrates temporary event loop stall with uv-unix. The issue is that pending
requests aren't processed until the next event (I/O, timeout, etc.) happens.
See #446 , #447 and #448 .
2012-06-07 00:06:24 +02:00
Ben Noordhuis
7d2ea31618
unix: fix event loop stall
...
Stop libev from entering the epoll_wait/kevent/port_getn/etc. syscall when
there are no active handles left, that will block indefinitely.
2012-06-04 23:36:50 +02:00
Ben Noordhuis
d08070435d
test: rename test tcp_dont_connect_after_write
...
Rename test tcp_dont_connect_after_write to tcp_connect_error_after_write,
teensy tad more descriptive.
2012-06-04 17:35:56 +02:00
Ben Noordhuis
b96ed68f46
test: add TCP connect error + write test
...
Original test contributed by Iñaki Baz Castillo. See #443 .
2012-06-04 15:58:32 +02:00
Ben Noordhuis
c76c2066c6
unix, windows: add semaphore functions
2012-06-03 04:04:05 +02:00
Fedor Indutny
1cd9642cbb
test: stdin/out/err should be set to /dev/null when ignored
2012-06-02 21:38:39 +02:00
Bert Belder
9759c20e90
test: verify that closing an active poll handle doesn't hang
2012-06-01 18:39:47 +02:00
Fedor Indutny
dc7a62d114
test: test for uv_spawn with stdio_count == 3
2012-06-01 17:32:34 +02:00
Charlie McConnell
69a923bf93
process: implement UV_PROCESS_DETACHED flag for uv_spawn
2012-06-01 02:24:05 +02:00
Ben Noordhuis
171ad8567d
unix, windows: add uv_walk()
...
Lets the libuv user iterate over the open handles. Mostly intended as a
debugging tool or a post-hoc cleanup mechanism.
2012-05-30 02:33:39 +02:00
Igor Zinkovsky
5a34f19970
windows: allow specifying FDs to be inherited by a child process
...
Previously the only option was to create a pipe or an ipc channel. This
patch makes it possible to inherit a handle that is already open in the
parent process. There is also room for setting more than just stdin,
stdout and stderr, although this is not supported yet.
2012-05-28 23:59:58 +02:00
Ben Noordhuis
028fef84b8
unix: update timer if already active
...
uv_timer_start() no longer returns an error when the timer is already active,
now it just updates the timer. Consistent with the uv-win implementation.
Fixes #425 .
2012-05-26 02:09:59 +02:00
Ben Noordhuis
28766dcf55
test: remove test-eio-overflow.c
...
Unreliable, it's timing / system load sensitive.
2012-05-25 01:33:44 +02:00
Ben Noordhuis
7c8313bd0f
unix, windows: make uv_run_once() return a bool
...
The return value of uv_run_once() now signals if it needs to be called again.
Fixes #427 .
2012-05-23 20:49:03 +02:00
Bert Belder
0ef7844b87
Disable test-callback-order
...
It's not correct.
2012-05-22 17:13:04 +02:00
Ben Noordhuis
a478847f74
test: add callback order test
...
Ensure that idle callbacks run before other callbacks.
2012-05-22 16:04:11 +02:00
Ben Noordhuis
7447048981
test: enable tcp_connect_error_fault test
2012-05-18 01:19:57 +02:00
Ben Noordhuis
538a562cdb
test: add tcp connect timeout test
2012-05-18 01:19:56 +02:00
Igor Zinkovsky
60af28abab
windows: support junctions with uv_fs_synlink
...
based on @piscisaureus implementation
2012-05-17 09:53:26 -07:00
Ben Noordhuis
9efa8b3571
unix, windows: rework reference counting scheme
...
This commit changes how the event loop determines if it needs to stay alive.
Previously, an internal counter was increased whenever a handle got created
and decreased again when the handle was closed.
While conceptually simple, it turned out hard to work with: you often want
to keep the event loop alive only if the handle is actually doing something.
Stopped or inactive handles were a frequent source of hanging event loops.
That's why this commit changes the reference counting scheme to a model where
a handle only references the event loop when it's active. 'Active' means
different things for different handle types, e.g.:
* timers: ticking
* sockets: reading, writing or listening
* processes: always active (for now, subject to change)
* idle, check, prepare: only active when started
This commit also changes how the uv_ref() and uv_unref() functions work: they
now operate on the level of individual handles, not the whole event loop.
The Windows implementation was done by Bert Belder.
2012-05-17 07:07:53 +02:00
Bert Belder
beaf750700
Test: add tests for uv_poll
2012-05-03 15:52:57 +02:00
Bert Belder
bfd6d465c7
Test for the uv_spawn's setuid and setgid options
2012-04-28 02:39:18 +02:00
Bert Belder
4f0ff3c504
Disable ipc_send_recv_pipe test on Windows
...
It's not supported yet
2012-04-12 03:33:53 +02:00
Igor Zinkovsky
70925c3bb9
windows: Enable passing of TCP connections over IPC
2012-03-29 18:18:46 -07:00
Bert Belder
6e0ca3aa8f
Merge branch 'v0.6'
...
Conflicts:
src/unix/linux/inotify.c
2012-03-27 23:46:23 +02:00
Bert Belder
aff078390f
Test: verify that uv_close from an fs event callback works properly
2012-03-27 23:00:26 +02:00
Bert Belder
732cf91d6d
Test: verify that no callbacks are made after closing an fs event watcher
2012-03-27 23:00:26 +02:00
Ben Noordhuis
e190162975
test: test cross-process handle send/recv
2012-03-09 09:12:53 -08:00
Bert Belder
e99fba47c8
Merge remote-tracking branch 'origin/v0.6'
...
Conflicts:
src/win/pipe.c
test/run-tests.c
2012-03-09 16:41:12 +01:00
Bert Belder
422a898a7f
Tests: verify that shutdown_cb is always called
2012-03-09 05:00:11 +01:00
Bert Belder
fb65d74c84
Tests: verify that uv_write and uv_shutdown ref the event loop
2012-03-09 05:00:11 +01:00
Brandon Philips
d07f2466d0
test: fs: add tests for read EOF
...
This fix was merged without tests:
https://github.com/philips/libuv/tree/fix-read-on-windows-to-handle-eof
So take tests from igorzi:
46024bf33d
2012-03-07 14:33:33 +01:00
Shigeki Ohtsu
b55801f225
win, unix: add uv_dlerror() and uv_dlerror_free()
2012-03-02 16:39:21 +01:00
Igor Zinkovsky
6bbccf1fe0
windows: return UV_ENOTSOCK when doing uv_pipe_connect to a file
2012-03-01 12:11:29 -08:00
Ben Noordhuis
ec0eff955e
Revert b3e0ad4, 149d32c, e99fdf0 and ea9baef.
...
Detaching doesn't work yet, the setsid() call fails and leaves the child process
attached to the parent's session.
Revert "test: Add test case for spawning detached child processes."
Revert "win: Implement options.detached for uv_spawn() for Windows."
Revert "unix: Implement options.detached for uv_spawn() for unix."
Revert "Add "detached" member to uv_process_options_t to denote whether a child
process should spawn detached from its parent."
This reverts commit ea9baef95c .
This reverts commit e99fdf0df6 .
This reverts commit 149d32cb96 .
This reverts commit b3e0ad4db8 .
2012-02-28 15:29:05 +01:00
Charlie McConnell
ea9baef95c
test: Add test case for spawning detached child processes.
2012-02-24 15:15:00 +01:00
Ben Noordhuis
4e1f2b1f64
Merge remote-tracking branch 'origin/v0.6'
2012-02-12 16:10:05 +01:00
Ben Noordhuis
c5aa86bd39
Remove uv_import() and uv_export().
...
Not needed anymore now that support for isolates has been removed from Node.
This commit reverts the following commits:
812e410 test: fix up stream import/export test
e34dc13 unix: implement uv_import() and uv_export()
d1a0e8e test: fix undefined macro error
2ce0058 import/export streams accross loops
2012-02-12 15:49:54 +01:00
Roman Shtylman
9fa2cf2eac
test: add multicast TTL test
2012-02-06 15:02:39 +01:00
Maciej Małecki
0596c59bc3
test: test if UV_ELOOP mapping works
2012-02-03 22:20:14 +01:00
isaacs
243cfcd078
Merge remote-tracking branch 'ry/v0.6'
2012-01-31 18:00:59 -08:00
Ben Noordhuis
cd16ba5186
test: add UDP broadcast/multicast/ttl tests
2012-01-31 16:52:27 +01:00
Igor Zinkovsky
2ce0058251
import/export streams accross loops
2012-01-30 21:44:27 +01:00
Ben Noordhuis
3de0411591
Merge remote-tracking branch 'origin/v0.6'
2012-01-27 22:23:26 +01:00
Bert Belder
92b260c065
windows: fix stat("c:\\") regression
2012-01-27 22:09:55 +01:00
Maciej Małecki
24e6c7ec86
unix: map ENAMETOOLONG to UV_ENAMETOOLONG
...
With tests. Closes #295
2012-01-23 19:33:09 +01:00
Ben Noordhuis
ac218a7ed5
test: add lots of refcount tests
2012-01-14 00:22:20 +01:00
Ben Noordhuis
dc3b80a50f
test: add udp4_echo_server helper
2012-01-14 00:11:43 +01:00
Ben Noordhuis
38fc6ad839
unix: unref fs event watcher
...
Watchers were being ref-counted twice which wasn't harmful in itself but stopped
uv_unref() from working like you'd expect it to.
2012-01-02 10:42:27 +01:00
Igor Zinkovsky
43e3ac5798
windows: uv_fs_rename to replace the new file if it exists
...
fixes #283
2011-12-30 15:48:22 -08:00
Shigeki Ohtsu
ba52023ef3
Fix missing increments of loop->counters
2011-12-12 18:01:26 +01:00
Igor Zinkovsky
dceb3e65ca
uv_cwd + uv_chdir
2011-12-01 12:27:12 -08:00
Ben Noordhuis
2bd181a8d2
unix: properly disarm kqueue fs watcher
...
Fixes "Assertion failed: (revents == EV_LIBUV_KQUEUE_HACK),
function uv__fs_event, file ../src/unix/kqueue.c, line 58."
2011-11-18 01:40:11 +01:00
Igor Zinkovsky
f1859eb841
windows: convert WSAECONNABORTED to EOF
2011-11-07 16:53:27 -08:00
Igor Zinkovsky
fe97c4dc63
windows: honor O_APPEND in uv_fs_open
2011-11-04 12:41:23 -07:00
Ryan Dahl
0698e3f905
Fix UNIX pipe connect error reporting, add test
2011-11-03 15:47:43 -07:00
Igor Zinkovsky
0fb3769586
windows: don't emit fs-event callback after uv_fs_event handle is closed
2011-11-02 19:10:04 -07:00
Igor Zinkovsky
74b49e821b
uv_kill
2011-11-02 14:34:07 -07:00
Igor Zinkovsky
9c6103a479
windows: add tests for uv_tcp_simultaneous_accepts
2011-11-01 01:13:13 -07:00
Igor Zinkovsky
314d0ee4f6
windows: don't fail uv_listen with UV_EALREADY if already listening. fixes #227 .
2011-10-26 13:48:53 -07:00
Igor Zinkovsky
0cb2213db0
windows: when sharing a server socket, only call listen in the parent process
2011-10-25 13:23:53 -07:00
Ben Noordhuis
ec825ffc62
unix: add TCP keepalive and no-delay control knobs
2011-10-21 16:08:26 -07:00
Igor Zinkovsky
54982a23ef
windows: stdio over non-overlapped pipes
2011-10-20 15:14:39 -07:00
Igor Zinkovsky
2216d38c29
windows: enable uv_fs_open to open directories
2011-10-12 10:42:41 -07:00
Ben Noordhuis
25a177a2e5
test: assert that readdir on file raises UV_ENOTDIR
2011-10-12 16:43:33 +02:00
Ben Noordhuis
acc98ca922
test: uv_process_kill(proc, 0) should not kill the process
2011-10-11 21:36:54 +02:00
Roman Shtylman
a3d1f6fd6f
add uv_udp_set_membership for unix multicast support
...
- test-udp-multicast-join tests that multicast packets can be received
- stub src/win/udp.c until support added
2011-10-11 21:25:20 +02:00
Ben Noordhuis
41e8574920
unix: don't alloc memory for readdir on empty dir
2011-10-10 16:27:55 +02:00
Ryan Dahl
60c639fd57
Merge branch 'ipc2'
2011-10-06 10:18:13 -07:00
Ryan Dahl
6921d2fc07
Add argument to uv_pipe_init for IPC, unix impl
2011-10-06 10:17:07 -07:00
Ben Noordhuis
c7870465aa
error reporting: return sensible messages for synthetic errors
2011-10-06 01:17:46 +02:00
Fedor Indutny
a35591bbfc
os: implement loadavg (not working on cygwin/win)
2011-10-04 18:15:14 +02:00
Fedor Indutny
33cb8775bc
os: implement memory bindings
...
* us_get_free_memory
* us_get_total_memory
2011-10-04 18:10:35 +02:00
Igor Zinkovsky
4fb120f649
windows: fix error reporting for uv_fs_ functions
2011-09-28 12:46:37 -07:00
Ben Noordhuis
71f6c0edb8
Merge remote-tracking branch 'origin/v0.6'
...
Conflicts:
src/win/util.c
2012-01-16 18:07:49 +01:00
Fedor Indutny
e7758e126f
unix: remove eio_set_max_poll_reqs
...
* added test
2012-01-16 14:49:13 +01:00
Igor Zinkovsky
26512731e3
remove uv_thread_self
2012-01-13 17:24:30 -08:00
Ryan Dahl
51ea46de45
Merge remote branch 'origin/v0.6'
2012-01-09 11:31:13 -08:00
Ryan Dahl
4ad33e9748
Revert "Add uv_pipe_pair for communication between threads"
...
Not needed. We took a different approach for isolates.
This reverts commit 5cc6090fdf .
2012-01-09 11:22:46 -08:00
Ryan Dahl
5cc6090fdf
Add uv_pipe_pair for communication between threads
...
This is only the Unix implementation and test.
2011-12-29 22:41:08 -08:00
Ben Noordhuis
d6a06b8689
test: eio callbacks should run in their owning threads
2011-12-22 03:42:54 +01:00
Ryan Dahl
a993329c02
add uv_thread_self
2011-12-20 11:34:18 -08:00
Igor Zinkovsky
3d189de699
platform api
2011-12-14 17:50:36 -08:00
Ben Noordhuis
4c6008f488
Merge branch 'v0.6'
...
Conflicts:
test/test-list.h
2011-12-12 18:04:17 +01:00
Ben Noordhuis
f5c2a4a1ae
Merge branch 'v0.6'
...
Conflicts:
src/unix/core.c
src/win/winapi.h
2011-12-02 18:15:04 +01:00
seebees
59f9a736b1
test: process should not wait for stdio before terminating
2011-11-23 17:34:18 +01:00
Ben Noordhuis
b52b8c7128
util: add uv_strlcpy() and uv_strlcat() functions
2011-11-23 17:29:02 +01:00
Ben Noordhuis
8e4ed88bbe
Wrap platform thread APIs.
2011-11-21 21:04:16 +01:00
Ben Noordhuis
1fc1f28093
Wrap platform mutex and rwlock APIs.
...
Read/write locks are emulated with critical sections on Windows XP and Vista
because those platforms don't have a (complete) native read/write lock API.
2011-11-18 12:42:08 +01:00
Ben Noordhuis
1e0aab06c9
unix: properly disarm kqueue fs watcher
...
Fixes "Assertion failed: (revents == EV_LIBUV_KQUEUE_HACK),
function uv__fs_event, file ../src/unix/kqueue.c, line 58."
2011-11-18 01:39:30 +01:00
Ryan Dahl
2ebb2272c3
Add tcp reference count tests
2011-09-26 22:51:08 -07:00
Ryan Dahl
3e5aa06c49
Add two timer ref count tests
2011-09-26 22:01:21 -07:00
Igor Zinkovsky
1e0757ffda
windows: file watcher
2011-09-21 13:13:34 -07:00
Ryan Dahl
c1374ba587
Add uv_is_tty()
2011-09-20 11:48:47 -07:00
Ben Noordhuis
4487531b06
test: check that write_queue_size updates after write error
2011-09-16 16:17:23 -07:00
Igor Zinkovsky
2931bdcf54
windows: strip '\??\' from readlink path buffer.
2011-09-14 12:58:18 -07:00
Ben Noordhuis
3c96410902
unix: bring back uv__stream_destroy()
...
This is the revised version of reverted commit 431195c .
2011-09-14 04:48:56 +02:00
Ben Noordhuis
ca5346f9ce
unix: revert 98b9f58 and 431195c for now, corrupts memory
2011-09-09 23:40:10 +02: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
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
060026ced3
windows: uv_fs_link + uv_fs_symlink
2011-09-04 13:24:35 -07: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
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
Ben Noordhuis
36ce74f2ca
Add UDP support to libuv.
2011-08-24 04:55:01 +02: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
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
d272a2183d
Windows: spawn child processes
2011-07-29 19:02:51 -07: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
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
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
d4563a197a
Allow and test for lazy uv_tcp_listen
2011-07-19 02:40:54 -07:00
Henry Rawas
6b32ebc54f
uv_getsockname
2011-07-12 09:57:08 -07:00
Igor Zinkovsky
b6a6dae34f
Named pipes implementation for Windows
2011-07-09 21:41:04 +02:00
Henry Rawas
26880b0c90
win: IPv6 connect
2011-07-05 09:45:57 -07:00
Matt Stevens
caf1a99115
IPv6 support
...
Fixes #70 .
Fixes #19 .
2011-06-28 14:11:21 +02:00
Bert Belder
16f471fa2e
Separate uv_getaddrinfo tests
2011-06-25 17:47:39 +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
Henry Rawas
4aeee38484
c-ares integration on windows
2011-06-22 15:21:01 +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
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
Igor Zinkovsky
9fc8a7f167
Adds uv_get_exepath API
...
Only works on Linux, Mac, Windows currently.
2011-05-24 08:40:27 -07:00
Ryan Dahl
1352c72e35
Add reference count tests
...
Broken on UNIX.
2011-05-22 12:56:49 -07:00
Bert Belder
78c2930e25
Test for uv_timer_again ,~get_repeat, ~set_repeat
2011-05-19 01:58:07 +02:00
Bert Belder
810651e04c
Update tests & benchmarks to use the new timer api
2011-05-17 01:17:48 +02:00
Bert Belder
b1a8675ced
Add test-async
2011-05-09 05:52:05 +02:00
Bert Belder
e0be8efef6
Test for oio_prepare/oio_check/oio_idle
2011-05-08 04:45:56 +02:00
Bert Belder
9d9c242a24
More extensive test-callback-stack. Fails on windows now.
2011-05-04 17:10:33 +02:00
Ryan Dahl
a8e4c0bc6b
Disable fail-always and pass-always
2011-05-03 16:56:26 -07: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
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
a5bf3988ee
Write-a-lot test
2011-04-22 05:12:10 +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
53f9d5a841
Allow tests and benchmarks to use the same helpers.
...
Closes #21 .
2011-04-19 14:51:10 +02:00
Ryan Dahl
595756048c
Linux passes test_connection_fail
2011-04-19 02:09:58 -07:00
Bert Belder
5275b036b0
Benchmark runner
2011-04-19 04:47:21 +02:00
Ryan Dahl
cf4fbc0925
Add copyright headers, license file.
...
closes #17 .
2011-04-18 11:11:30 -07:00
Ryan Dahl
c8bdf15f5d
Unix: fix build for timer test
2011-04-15 11:21:07 -07:00
Bert Belder
aec5eac8bc
Add oio_timeout test
2011-04-15 19:32:28 +02:00
Ryan Dahl
769948a5ad
test-runner compiles
2011-04-14 12:58:24 -07: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
ad94c9297e
First shot at test harness
2011-04-05 02:05:41 +02:00