cosmopolitan/test/libc/sock
Justine Tunney 1d4eb08fa1
Support non-blocking i/o across platforms
This change introduces new tests for `O_NONBLOCK` and `SOCK_NONBLOCK` to
confirm that non-blocking i/o is now working on all supported platforms,
including Windows. For example, you can now say on Windows, MacOS, etc.:

    socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, IPPROTO_TCP);

To create a non-blocking IPv4 TCP socket. Or you can enable non-blocking
i/o on an existing socket / pipe / etc. file descriptor by calling fcntl

    fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);

This functionality is polyfilled on older Linux kernels too, e.g. RHEL5.
Now that fcntl() support is much better the FIOCLEX / FIONCLEX polyfills
for ioctl() have been removed since they're ugly non-POSIX diameond APIs

This change fixes a weakness in kprintf() that was causing Windows trace
tools to frequently crash.
2023-07-23 02:56:47 -07:00
..
inet_ntoa_test.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
inet_ntop_test.c Fix inet_ntop(AF_INET6) buffer length (#582) 2022-09-03 22:46:45 -07:00
inet_pton_test.c Implement inet_pton for AF_INET6 (#583) 2022-08-31 15:14:42 -07:00
nointernet_test.c Port a lot more code to AARCH64 2023-05-14 09:37:26 -07:00
nonblock_test.c Support non-blocking i/o across platforms 2023-07-23 02:56:47 -07:00
select_test.c Release pledge.com 1.7 and landlockmake.com 1.3 2022-08-15 19:52:00 -07:00
sendfile_test.c Add WSL to test fleet 2022-11-02 06:49:42 -07:00
sendrecvmsg_test.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
setsockopt_test.c Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
socket_test.c Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
socketpair_test.c Unbloat the build 2022-08-11 00:15:29 -07:00
test.mk Support non-blocking i/o across platforms 2023-07-23 02:56:47 -07:00
unix_test.c Update tests and CPU detection for Blink 2023-01-18 00:56:09 -08:00