History log of /libuv/test/test-poll.c (Results 1 – 25 of 34)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 8a499e13 22-Dec-2023 Matheus Izvekov

win: stop using deprecated names (#4253)


# 011a1ac1 06-Oct-2023 Pleuvens

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 failure

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

show more ...


# 91a7e498 12-Mar-2023 Trevor Norris

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

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.

show more ...


# 5102b2c0 28-Nov-2022 Ben Noordhuis

unix: drop kfreebsd support (#3835)

Because kFreeBSD is dead. RIP.

Fixes: https://github.com/libuv/libuv/issues/3833


Revision tags: v1.41.0
# 270d0518 29-Dec-2020 tjarlama

test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros

Moving to new style test macros will make debugging easier in case
of test failure and improve redability. This commit will repl

test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros

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>

show more ...

Revision tags: v1.40.0, v1.39.0, v1.38.1, v1.38.0, v1.37.0, v1.36.0
# f52786b4 13-Apr-2020 Xu Meng

test: skip poll_duplex and poll_unidirectional on PASE

Issuing a shutdown() on IBM i PASE with parameter SHUT_WR
also sends a normal close sequence to the partner program.
This leads

test: skip poll_duplex and poll_unidirectional on PASE

Issuing a shutdown() on IBM i PASE with parameter SHUT_WR
also sends a normal close sequence to the partner program.
This leads to timing issues and ECONNRESET failures in the
test poll_duplex and poll_unidirectional.

https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_74/apis/shutdn.htm

PR-URL: https://github.com/libuv/libuv/pull/2782
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...

Revision tags: v1.35.0
# af3330b7 29-Feb-2020 Ben Noordhuis

test: handle EINTR, fix EOF check in poll test

The test had two bugs:

1. It didn't handle EINTR when calling send() and recv().

2. It checked `errno` on EOF but that's only

test: handle EINTR, fix EOF check in poll test

The test had two bugs:

1. It didn't handle EINTR when calling send() and recv().

2. It checked `errno` on EOF but that's only set when the return value
is less than zero.

PR-URL: https://github.com/libuv/libuv/pull/2713
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.34.2, v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0, v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0, v1.28.0, v1.27.0
# bdf9a96a 21-Feb-2019 Andrew Paprocki

test,sunos: disable UV_DISCONNECT handling

Solaris does not support the non-standard Linux `POLLRDHUP` event, so
disable the code awaiting the disconnects to exit the loop. Without

test,sunos: disable UV_DISCONNECT handling

Solaris does not support the non-standard Linux `POLLRDHUP` event, so
disable the code awaiting the disconnects to exit the loop. Without
this, the `poll_duplex` and `poll_unidirectional` tests will hang and
timeout.

PR-URL: https://github.com/libuv/libuv/pull/2200
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.26.0, v1.25.0, v1.24.1, v1.24.0, v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0, v1.20.3, v1.20.2, v1.20.1, v1.20.0
# 9051126b 20-Mar-2018 Santiago Gimeno

test,freebsd: fix flaky poll tests

On FreeBSD `close()` can fail with `ECONNRESET` if the socket was
shutdown by the peer before all pending data was delivered.

PR-URL: https://

test,freebsd: fix flaky poll tests

On FreeBSD `close()` can fail with `ECONNRESET` if the socket was
shutdown by the peer before all pending data was delivered.

PR-URL: https://github.com/libuv/libuv/pull/1780
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.19.2, v1.19.1, v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0, v1.15.0
# 7824370f 30-Sep-2017 Kamil Rytarowski

netbsd: disable poll_bad_fdtype on NetBSD

Follow other BSDs and disable the failing poll_bad_fdtype test on
NetBSD.

PR-URL: https://github.com/libuv/libuv/pull/1574
Reviewed

netbsd: disable poll_bad_fdtype on NetBSD

Follow other BSDs and disable the failing poll_bad_fdtype test on
NetBSD.

PR-URL: https://github.com/libuv/libuv/pull/1574
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.14.1, v1.14.0, v1.13.1, v1.13.0, v1.12.0
# 62165535 07-Apr-2017 Brad King

test: skip self-connecting tests on cygwin

The cygwin runtime library fails to connect a socket client to a
listening server within the same thread. Test cases that use
this approac

test: skip self-connecting tests on cygwin

The cygwin runtime library fails to connect a socket client to a
listening server within the same thread. Test cases that use
this approach hang while waiting for the connection to complete.
This can be reproduced independent of libuv in a simple example
using both socket/bind/listen and socket/connect in a single
thread.

Avoid this problem in our test suite by skipping such tests on cygwin.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# 6398251a 07-Apr-2017 Brad King

cygwin: implement support for cygwin and msys2

Cygwin and MSYS2 are POSIX layers implemented on top of Windows.
Use our POSIX `poll(2)` implementation of our poll abstraction.
For mo

cygwin: implement support for cygwin and msys2

Cygwin and MSYS2 are POSIX layers implemented on top of Windows.
Use our POSIX `poll(2)` implementation of our poll abstraction.
For most other components we already have dedicated sources
implementing them in terms of APIs available on Cygwin or
providing non-implementations of components not supported.

This leaves only three components that need Cygwin-specific
implementations:

* uv_uptime: implement using sysinfo
* uv_resident_set_memory: add a placeholder returning UV_ENOSYS
* uv_cpu_info: add a placeholder returning UV_ENOSYS

Update our test suite to account for features not available
due to Cygwin platform limitations or our placeholders.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# c355c8b1 06-Feb-2017 Santiago Gimeno

test: fix tests on OpenBSD

It fixes `process_title`, `poll_bad_fdtype` and `poll_nested_kqueue`
tests.

Fixes: https://github.com/libuv/libuv/issues/1216
PR-URL: https://gith

test: fix tests on OpenBSD

It fixes `process_title`, `poll_bad_fdtype` and `poll_nested_kqueue`
tests.

Fixes: https://github.com/libuv/libuv/issues/1216
PR-URL: https://github.com/libuv/libuv/pull/1218
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.11.0, v1.10.2, v1.10.1, v1.10.0
# 0a4b51fc 28-Jul-2016 Jeffrey Clark

build: GNU/kFreeBSD support

autotools support only, gvp does not support kfreebsd detection.

PR-URL: https://github.com/libuv/libuv/pull/960
Reviewed-By: Ben Noordhuis <info@bno

build: GNU/kFreeBSD support

autotools support only, gvp does not support kfreebsd detection.

PR-URL: https://github.com/libuv/libuv/pull/960
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 1cff5b75 05-Jul-2016 John Barboza

zos: add support for new platform

- zos: disable test cases not applicable
- zos: build options
- zos: semaphore implementation
- zos: use compare and swap builtins
- zos: st

zos: add support for new platform

- zos: disable test cases not applicable
- zos: build options
- zos: semaphore implementation
- zos: use compare and swap builtins
- zos: struct rusage not the same as other platforms
- zos: backlog<=0 produces undefined behaviour
Will redefine backlog in the following way
* if backlog == 0, set it to 1
* if backlog < 0, set it to SOMAXCONN
- zos: define IMAXBEL as empty flag and implement uv__tty_make_raw
- zos: use udp multicast operations from aix
- zos: ESC in ebcdic
- zos: use LIBPATH for dynamic linker path
- zos: uv_udp_set_ttl only works for ipv6
- zos: increase pthread stack size by factor of 4
- zos: return ENODEV instead of ENXIO errors for setsockopt
- zos: use uv_cond_init the same way as aix
- test: enable oob test for zos
- zos: return EINVAL for zos error code EOPNOTSUPP

PR-URL: https://github.com/libuv/libuv/pull/937
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v0.10.37
# c5c419f7 23-May-2016 Ben Noordhuis

unix: allow nesting of kqueue fds in uv_poll_start

kqueue file descriptors don't support ioctl(FIONBIO) (or any other ioctl
for that matter) so retry using fcntl(F_GETFL) + fcntl(F_SETFL

unix: allow nesting of kqueue fds in uv_poll_start

kqueue file descriptors don't support ioctl(FIONBIO) (or any other ioctl
for that matter) so retry using fcntl(F_GETFL) + fcntl(F_SETFL) when we
receive a ENOTTY error.

Fixes: https://github.com/libuv/libuv/issues/883
PR-URL: https://github.com/libuv/libuv/pull/885
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.9.1
# 337e9fd0 04-May-2016 Imran Iqbal

test: fix POLLHDRUP related failures for AIX

`POLLHDRUP` is not implemented on AIX. Therefore `UV_DISCONNECT` will
never be set on `events`. This causes the socket to never be closed and

test: fix POLLHDRUP related failures for AIX

`POLLHDRUP` is not implemented on AIX. Therefore `UV_DISCONNECT` will
never be set on `events`. This causes the socket to never be closed and
the tests to be stuck inside `pollset_poll` indefinitely, resulting in a
timeout.

This fixes the following tests:
- poll_duplex
- poll_unidirectional

Updated docs to let end users know that `UV_DISCONNECT` can be set, but
is unsupported on AIX.

Fixes: https://github.com/libuv/libuv/issues/844
PR-URL: https://github.com/libuv/libuv/pull/857
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.9.0
# c7c8e916 11-Jan-2016 Santiago Gimeno

poll: add UV_DISCONNECT event

It allows detecting the remote socket closing the connection. It's
emitted when `EPOLLRDHUP`(Linux), `EV_EOF`(BSD), `POLLRDHUP`(Solaris,
AIX) and `AFD_P

poll: add UV_DISCONNECT event

It allows detecting the remote socket closing the connection. It's
emitted when `EPOLLRDHUP`(Linux), `EV_EOF`(BSD), `POLLRDHUP`(Solaris,
AIX) and `AFD_POLL_DISCONNECT`(Windows) events are received.

PR-URL: https://github.com/libuv/libuv/pull/691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 213e681a 09-Mar-2016 Imran Iqbal

test: fix poll_bad_fdtype for AIX

PR-URL: https://github.com/libuv/libuv/pull/757
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

# a0b56059 20-Dec-2015 Ben Noordhuis

unix: report errors for unpollable fds

Libuv would abort() when trying to watch a file descriptor that is
not compatible with epoll-style polling; file descriptors referring
to on-di

unix: report errors for unpollable fds

Libuv would abort() when trying to watch a file descriptor that is
not compatible with epoll-style polling; file descriptors referring
to on-disk files fall into this category.

File descriptors that libuv creates itself are not an issue but
external ones that come in through the uv_poll_init() API are.

Make uv_poll_init() check whether the file descriptor is accepted by
the underlying system call and return an error when it's not.

Fixes: https://github.com/libuv/libuv/issues/658
PR-URL: https://github.com/libuv/libuv/pull/659
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.8.0, v1.7.5, v1.7.4, v1.7.3, v1.7.2, v1.7.1
# 01544d86 07-Aug-2015 Saúl Ibarra Corretgé

Revert "stream: squelch ECONNRESET error if already closed"

This reverts commit 05a003a3f78d07185b7137601fe8e93561855a8d.

This commit triggerd "test-tls-hello-parser-failure" failur

Revert "stream: squelch ECONNRESET error if already closed"

This reverts commit 05a003a3f78d07185b7137601fe8e93561855a8d.

This commit triggerd "test-tls-hello-parser-failure" failure in io.js.
See the reference below for a more thorough explanation.

Refs: https://github.com/nodejs/io.js/pull/2310
PR-URL: https://github.com/libuv/libuv/pull/475
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.7.0
# 05a003a3 17-Jun-2015 Santiago Gimeno

stream: squelch ECONNRESET error if already closed

Add new UV__POLLRDHUP event to be emitted when EPOLLRDHUP(in Linux) or
EV_EOF(in BSD / OSX) is detected and only if UV_READABLE is set.

stream: squelch ECONNRESET error if already closed

Add new UV__POLLRDHUP event to be emitted when EPOLLRDHUP(in Linux) or
EV_EOF(in BSD / OSX) is detected and only if UV_READABLE is set.

When a read returns ECONNRESET after a UV__POLLRDHUP event, emit EOF instead
of the error.

Add tcp-squelch-connreset test. Not to be run on Windows as it returns
ECONNRESET error.

Fixes in test-poll and test-tcp-open so they pass after these changes.

PR-URL: https://github.com/libuv/libuv/pull/403
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.6.1, v1.6.0, v1.5.0, v0.10.36, v1.4.2, v0.10.35, v1.4.1, v0.10.34, v1.4.0, v1.3.0, v0.10.33, v1.2.1
# b30a3e67 14-Jan-2015 Saúl Ibarra Corretgé

unix, windows: set non-block mode in uv_poll_init

libuv requires that the socket/fd is in non-blocking mode, so do it
internally so the user doesn't need to write platform specific code

unix, windows: set non-block mode in uv_poll_init

libuv requires that the socket/fd is in non-blocking mode, so do it
internally so the user doesn't need to write platform specific code to
do so.

This also makes the API consistent with uv_{tcp,udp,pipe}_open, since
it's not required to pass the fd in non-blocking mode there either.

PR-URL: https://github.com/libuv/libuv/pull/136
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.2.0, v0.10.32, v1.1.0, v0.10.31, v1.0.2, v0.10.30, v1.0.1, v1.0.0, v0.10.29, v1.0.0-rc2, v1.0.0-rc1, v0.11.29, v0.11.28, v0.11.27, v0.10.28, v0.11.26, v0.10.27, v0.11.25, v0.11.24, v0.11.23, v0.10.26, v0.11.22
# db2a9072 10-Mar-2014 Saúl Ibarra Corretgé

unix, windows: removed unused status parameter

async, timer, prepare, idle and check handles don't need the status
parameter.

Revision tags: v0.11.21, v0.11.20, v0.10.25, v0.11.19, v0.10.24, v0.11.18, v0.10.23, v0.10.22, v0.11.17, v0.10.21, v0.11.16, v0.10.20, v0.11.15, v0.10.19, v0.11.14, v0.10.18, v0.10.17
# d7115f06 12-Sep-2013 Ben Noordhuis

unix, windows: make uv_is_*() always return 0 or 1

Ensure that the following API functions always return either 0 or 1:

* uv_is_active()
* uv_is_closing()
* uv_is_read

unix, windows: make uv_is_*() always return 0 or 1

Ensure that the following API functions always return either 0 or 1:

* uv_is_active()
* uv_is_closing()
* uv_is_readable()
* uv_is_writable()

show more ...

12