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
If the output data contained a null byte (for example, because it was
really utf16), we'd truncate the output there. This commonly would
manifest as the output on the CI bot being:
> not ok 308 - threadpool_cancel_random
> # exit code 3
> # Output from process :
> # A
Now we'll attempt to print out the whole error message as text (albeit
with the wrong encoding, but the ascii content should still nearly
always be readable).
PR-URL: https://github.com/libuv/libuv/pull/2611
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit exposes the uv_sleep() function that previously
only existed in the test runner.
PR-URL: https://github.com/libuv/libuv/pull/2548
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
MinGW does not export the _set_fmode function via its
libmsvcrt.a import library unless on an ARM platform. This
causes the test target build to fail without manually
adjusting the link parameters.
It is safe to assume that _fmode is available in all stable
releases, and it should be preferred unless using MSVC. This
is unrelated to #2407, but when both are fixed, MinGW builds
should complete successfully.
PR-URL: https://github.com/libuv/libuv/pull/2411
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
The MSVC runtime provides a global variable that can be used to set the
default file translation mode so that file open calls don't need to
explicitly specify that mode.
libuv was changing that global mode to binary from its default of text.
However, libuv doesn't actually need to do that anymore, and the
application may not want the default changed under it. This change stops
libuv from modifying that global mode.
PR-URL: https://github.com/libuv/libuv/pull/2324
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The test runner inserted a 250 ms delay to give helper processes time to
settle. That's intrinsically race-y and caused tests to intermittently
fail on platforms like AIX.
Instead of a fixed delay, pass a file descriptor to the helper process
and wait until it closes the descriptor. That way we know for sure the
process has started.
Incidentally, this change reduces the running time of the test suite
from 112 to 26 seconds on my machine.
Fixes: https://github.com/libuv/libuv/issues/2041
PR-URL: https://github.com/libuv/libuv/pull/2056
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Back in the day I wrote comments in a really unusual way. Nowadays it
makes my eyes bleed, and clang-format doesn't know how to deal with it.
PR-URL: https://github.com/libuv/libuv/pull/1853
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: https://github.com/libuv/libuv/pull/1840
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Fix a bug in process_copy_output that would cause output larger
than 1kb to be incorrectly split into lines.
PR-URL: https://github.com/libuv/libuv/pull/1325
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Put a space after the '#' and handle messages with newlines.
PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
With the non-tap output, it's sometimes difficult to distinguish skipped
tests from test failures.
PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
The get_currentexe test requires a canonicalized argv[0] to check
against. Before this commit, it failed when argv[0] contained symbolic
links.
Fixeslibuv/libuv#18.
Added two new flags to identify tests that are intentionally ignored
(usually because we don't want to implement the tested functionality
on current platform) and test serving as TODO list (usually indicating
that the tested functionality should be implemented on current plaform
in the near future.)
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.
If a test failed we would previously see:
Output from process `test_foo`: blah
Output from process `test_foo`: (nothing)
This commit changes it to:
Output from process `test_foo`: blah
Output from process `foo_helper`: (nothing)