Commit Graph

7 Commits

Author SHA1 Message Date
Pleuvens
011a1ac1a3
test: switch to new-style ASSERT_EQ macros (#4159)
Switch from old-style ASSERT macro to new-style ASSERT_EQ,... macros.

Using new-style macros makes it easier to debug test failures

Fixes: https://github.com/libuv/libuv/issues/2974
2023-10-06 19:50:15 +02:00
Trevor Norris
91a7e49846
test: silence more valgrind warnings (#3917)
Pass the loop to MAKE_VALGRIND_HAPPY() so it's explicit on which loop
needs to be cleaned up. Since it asserts on uv_loop_close(), need to
remove a couple of those that were being done before the call.

Cleanup where loop was assigned, so the entire test either uses loop or
uv_default_loop(). Not both.

Also take care of any reqs that may have been left uncleaned.
2023-03-12 14:59:00 +01:00
Ben Noordhuis
679d679f25 test: fix ThreadSanitizer thread leak warning
Refs: https://github.com/libuv/libuv/issues/3681
2023-01-20 22:38:59 +01:00
Ben Noordhuis
b0f3310bb1 Revert "unix,fs: fix for potential partial reads/writes"
This commit has been reported as introducing a backwards-incompatible
change in reading from stdin and is independently suspected of breaking
the Node.js test suite on MacOS and maybe other platforms, possibly in
combination with commit fd049399 ("unix,tcp: avoid marking server
sockets connected".)

This reverts commit 14bfc27e64.

Fixes: https://github.com/libuv/libuv/issues/1716
Fixes: https://github.com/libuv/libuv/issues/1720
Fixes: https://github.com/nodejs/node/issues/18225
PR-URL: https://github.com/libuv/libuv/pull/1717
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2018-01-19 17:51:08 +01:00
Ben Wijen
14bfc27e64
unix,fs: fix for potential partial reads/writes
Added a check in uv__fs_buf_iter to detect partial reads and writes.
Partial reads and writes are looped until all data has been processed.

PR-URL: https://github.com/libuv/libuv/pull/640
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2018-01-10 17:14:53 +01:00
Saúl Ibarra Corretgé
01ab8d64ad test: fixup eintr_handling
- Add missing include
- Fix test name on Windows
- Fixup style

Refs: https://github.com/libuv/libuv/pull/661
PR-URL: https://github.com/libuv/libuv/pull/673
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-01-06 08:30:49 +01:00
Dave
a564ef09dc fs: don't nullify req->bufs on EINTR
uv__fs_buf_iter currently sets req->bufs to NULL after it is done, but
if the operation fails with EINTR then it will be retried, at which
point it expects the bufs to not be NULL, causing a seg fault as in
https://github.com/nodejs/node/issues/4291.

uv__fs_buf_iter should not set req->bufs to NULL if the operation
fails with EINTR.

Also, when it sets req->bufs to NULL, it should set req->nbufs to 0 as
well, so we don't have the messy situation of a positive nbufs with no
actual bufs.

PR-URL: https://github.com/libuv/libuv/pull/661
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-01-04 14:07:50 -05:00