Ben Noordhuis
c252bcb3f0
bench: fix loop starvation bug
...
Don't keep writing until the write queue fills up. On fast systems (mine), that
never happens - the data is sent out as fast as the benchmark generates it.
2012-11-15 01:02:07 +01:00
Ben Noordhuis
09b022232a
bench: report proper benchmark name
2012-11-13 17:47:47 +01:00
Ben Noordhuis
b9c8d19637
bench: close timer handles before deleting loop
...
Fixes a segmentation fault / use-after-free.
2012-11-13 15:56:55 +01:00
Ben Noordhuis
3243e9ae67
test: fix (harmless) typo in function name
2012-11-12 18:17:13 +01:00
Ben Noordhuis
625340066e
test: fix close of uninitialized handle
...
The test closes all handles after 1000 ms but the remote peer handle may not
have been initialized by then (very unlikely but not quite impossible).
2012-11-11 03:24:25 +01:00
Ben Noordhuis
0a7e36dcf1
test: add UV_RUN_AS_ROOT check
2012-11-11 03:24:22 +01:00
Ben Noordhuis
bef3ea4818
bench: squelch -Wstrict-aliasing warnings
2012-11-09 03:51:47 +01:00
Ben Noordhuis
2d1f17fecb
test: work around valgrind bug
2012-11-09 01:57:58 +01:00
Ben Noordhuis
91faa3e688
test: fix compiler warning
...
Fix the following warning by not using a static variable:
test/test-fs-poll.c:79: warning: ‘static’ is not at beginning of declaration
2012-11-07 16:20:18 +01:00
Ben Noordhuis
a320d46440
test: fix type casting style issue
2012-11-07 05:50:30 +01:00
Ben Noordhuis
7759bd63cd
test: remove unnecessary #ifdef _WIN32
2012-11-06 00:32:04 +01:00
Bert Belder
6620e614ac
windows: un-break the build
...
It was broken in 1d85815 .
2012-11-05 22:11:22 +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
Ben Noordhuis
dcce1eab3b
test: fix -Wmissing-field-initializers warnings
2012-11-02 14:34:28 +01:00
Ben Noordhuis
894a8523cb
test: fix signed/unsigned comparison warnings
2012-11-02 14:32:14 +01:00
Ben Noordhuis
b8aa5b9bf2
test: don't assert on UV_EPIPE in echo-server.c
...
UV_EPIPE is not an error per se, it simply indicates that the other end of the
connection - i.e. the test case - has gone away.
Pro-actively ignore UV_ECANCELED errors. They're not actually emitted right now
because there's only ever one pending write but let's be forward compatible.
2012-11-01 15:39:11 +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
0dbab84529
benchmark: async_pummel should not call uv_async_send on closed handle
...
This fixes an assertion that triggered in debug builds on Windows.
2012-10-24 21:36:57 +02:00
Bert Belder
a54b9e2921
benchmark: timed_udp_pummel should not write to closed udp handle
...
This fixes intermittent assertion failures when running the benchmark.
2012-10-24 21:36:57 +02:00
saghul
61ecb3415d
win: support compilation with Visual Studio 2008
2012-10-23 22:55:25 +02:00
Bert Belder
1e32cb01b5
unix: support signal handlers outside the main loop
2012-10-17 01:25:02 +02:00
Bert Belder
47eb03490a
test: move loop cleanup code to the individual tests
2012-10-17 01:24:49 +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
Bert Belder
c5e1140779
tests: fix some compile warnings on windows
2012-10-16 17:22:54 +02:00
Hiroaki Nakamura
36b1e1a57c
test: change 10e8 to 1e9
...
It is clearer and used everywhere else.
2012-10-16 00:07:46 +02:00
Hiroaki Nakamura
acea3028c5
unix, windows: add thread barrier support
2012-10-09 17:30:52 +02:00
Hiroaki Nakamura
2684f876a9
windows: don't set CRT debug mode on MinGW
2012-10-09 17:00:02 +02:00
Shigeki Ohtsu
f7c991f1ce
test: add consumer-producer test for condvar
2012-10-07 23:17:31 +02:00
Ting-Yu Lin
8f1ec32865
windows: fix application crashed popup in debug version
2012-10-07 15:43:03 +02:00
Hiroaki Nakamura
976c8a4387
Add support for condition variables on all platforms
2012-10-05 13:03:55 +02:00
Shigeki Ohtsu
01337af65d
test, windows: fix duplicated windows.h
...
including windows.h before winsock2.h cause build error
2012-10-03 03:46:49 +02:00
Ben Noordhuis
d796c3b6f4
test: fix windows #include bug
...
Fixes a "'AF_IPX' : macro redefinition" warning when compiling test/runner.c.
2012-10-03 00:58:04 +02:00
Ben Noordhuis
b88f8b40d6
test: fix uninitialized memory warning, use calloc
...
Fixes the following valgrind warning:
==29019== Syscall param writev(vector[...]) points to uninitialised byte(s)
==29019== at 0x584270B: writev (writev.c:51)
==29019== by 0x449BB2: uv__write (stream.c:733)
==29019== by 0x44AE91: uv_write2 (stream.c:1159)
==29019== by 0x44AF25: uv_write (stream.c:1180)
==29019== by 0x42CCAA: connect_cb (test-tcp-writealot.c:129)
==29019== by 0x44AC05: uv__stream_connect (stream.c:1097)
==29019== by 0x44AA25: uv__stream_io (stream.c:1050)
==29019== by 0x437430: uv__io_rw (core.c:539)
==29019== by 0x43C3D9: ev_invoke_pending (ev.c:2145)
==29019== by 0x436EC5: uv__poll (core.c:260)
==29019== by 0x436F0F: uv__run (core.c:269)
==29019== by 0x436F6E: uv_run (core.c:277)
==29019== Address 0x5f15040 is 0 bytes inside a block of size 94,371,840 alloc'd
==29019== at 0x4C2C5EF: malloc (vg_replace_malloc.c:270)
==29019== by 0x42CDED: run_test_tcp_writealot (test-tcp-writealot.c:148)
==29019== by 0x406551: run_test_part (runner.c:302)
==29019== by 0x405384: main (run-tests.c:57)
2012-10-03 00:23:38 +02:00
Ben Noordhuis
c6c691f323
test: join worker thread at exit in test-async.c
2012-10-02 23:54:19 +02:00
Ben Noordhuis
5135cfc45b
test: fix memory leak in test-getsockname.c
2012-10-02 23:45:27 +02:00
Ben Noordhuis
f89986b153
test: fix memory leaks in test-fs-event.c
2012-10-02 23:19:53 +02:00
Ben Noordhuis
e474a2a420
test: fix memory leak in test-fs.c
2012-10-02 23:10:59 +02:00
Ben Noordhuis
8399cb1fc3
test: fix memory leaks in fs_symlink test
2012-10-01 23:54:34 +02:00
Ben Noordhuis
7320633c4b
unix: remove uv_fs_stat windows compat hack
...
uv_fs_stat and uv_fs_lstat removed the trailing backslash (if any) from the path
in order to please a test case that was written for Windows. Remove the
compatibility hack and fix the test.
2012-10-01 22:53:59 +02:00
Ben Noordhuis
678e95a443
test: close handle in ref tests
...
Everything that gets reported by valgrind now is an actual memory leak.
2012-10-01 22:53:59 +02:00
Ben Noordhuis
45b5e79f8e
test: fix memory leak in tcp_ping_pong
2012-10-01 22:53:59 +02:00
Ben Noordhuis
f090297f62
test: delete default loop after test run
...
Delete the default event loop after the test completes. Keeps valgrind happy.
2012-10-01 22:53:59 +02:00
Ben Noordhuis
4e268f7718
test: add valgrind support
...
Run tests through valgrind when UV_USE_VALGRIND=1 is set in the environment.
2012-10-01 22:53:59 +02:00
Ben Noordhuis
48f98424bd
test: fix error message in runner
2012-10-01 22:53:59 +02:00
Ben Noordhuis
1923abda94
test: add uv_fs_readlink test
2012-10-01 22:53:59 +02:00
Fedor Indutny
778144f0b5
darwin: emit relative path in fsevents
2012-09-18 00:29:29 +02:00
Ben Noordhuis
37dc7472d7
test: fix aliasing warning in dns-server.c
2012-09-17 23:48:19 +02:00
Ben Noordhuis
29f44c7564
bench: let client close connection in tcp_multi_accept{2,4,8}
2012-09-17 23:22:04 +02:00
Ben Noordhuis
a8c6da8dfa
bench: add idle delay to tcp_multi_accept{2,4,8}
2012-09-17 23:22:04 +02:00
Ben Noordhuis
b74b1c4c56
bench: add tcp accept benchmarks
2012-09-17 23:22:04 +02:00