Moving to new style test macros will make debugging easier in case
of test failure and improve redability. This commit will replace all
ASSERT macros matching the statement:
`ASSERT(identifier (== or !=) value);`
to:
`ASSERT_(NOT_)NULL(identifier);`
Refs: https://github.com/libuv/libuv/issues/2974
PR-URL: https://github.com/libuv/libuv/pull/3081
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Decrease the data sent for `arm` so the test doesn't timeout in the arm
CI bots.
PR-URL: https://github.com/libuv/libuv/pull/1038
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.
Fixes#684.
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.
Fixes#684.
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.
Fixes#684.
Passing or returning structs as values makes life hard for people that
work with libuv through a foreign function interface. Switch to a
pointer-based approach.
Fixes#684.
This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.
A code snippet like this one:
if (uv_foo(loop) < 0) {
uv_err_t err = uv_last_error(loop);
fprintf(stderr, "%s\n", uv_strerror(err));
}
Should be rewritten like this:
int err = uv_foo(loop);
if (err < 0)
fprintf(stderr, "%s\n", uv_strerror(err));
The rationale for this change is that it should make creating bindings
for other languages a lot easier: dealing with struct return values is
painful with most FFIs and often downright buggy.
This changes the prototype of uv_run() from:
int uv_run(uv_loop_t* loop);
To:
int uv_run(uv_loop_t* loop, uv_run_mode mode);
Where `mode` is UV_RUN_DEFAULT, UV_RUN_ONCE or UV_RUN_NOWAIT.
Fixes#683.
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)
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.