libuv/test
Stefan Stojanovic c17bd99f1c
win: fix fstat for pipes and character files (#3811)
Calling uv_fs_fstat for file types other then disk type was resulting in
error on Windows while it was retrieving data on Linux. This change
enables getting fstat for pipes and character files on Windows with data
fetched being as reasonable as possible.

A simple test is also added to check this behavior on all platforms. It
uses stdin, stdout and stderr. uv_fs_fstat needs to pass with disk files
pipes and character files (eg. console).

Refs: https://github.com/nodejs/node/issues/40006
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
2022-11-29 17:46:09 -05:00
..
fixtures unix,win: fix memory leak in uv_fs_scandir() (#3760) 2022-09-22 09:25:55 +02:00
benchmark-async-pummel.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
benchmark-async.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
benchmark-fs-stat.c
benchmark-getaddrinfo.c
benchmark-list.h test: fix benchmark-ping-udp (#2817) 2022-02-13 01:04:41 -05:00
benchmark-loop-count.c
benchmark-million-async.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
benchmark-million-timers.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
benchmark-multi-accept.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
benchmark-ping-pongs.c
benchmark-ping-udp.c test: fix benchmark-ping-udp (#2817) 2022-02-13 01:04:41 -05:00
benchmark-pound.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
benchmark-pump.c test: fix pump and tcp_write_batch benchmarks 2020-10-31 16:42:49 +01:00
benchmark-queue-work.c bench: add uv_queue_work ping-pong measurement (#3425) 2022-02-13 00:40:35 -05:00
benchmark-sizes.c
benchmark-spawn.c
benchmark-tcp-write-batch.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
benchmark-thread.c
benchmark-udp-pummel.c test: remove string + int warning on udp-pummel 2021-04-04 17:16:44 +02:00
blackhole-server.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
echo-server.c unix,stream: fix loop hang after uv_shutdown 2021-07-13 10:54:02 -04:00
run-benchmarks.c benchmark: remove unreachable code 2021-04-04 17:47:37 +02:00
run-tests.c test: remove flaky test ipc_closed_handle (#3464) 2022-02-08 14:18:10 +01:00
runner-unix.c build: add MemorySanitizer (MSAN) support (#3788) 2022-10-18 23:21:42 +02:00
runner-unix.h
runner-win.c test: simplify platform_init() 2020-03-27 23:51:32 +01:00
runner-win.h
runner.c test: fix -Wunused-but-set-variable warnings (#3829) 2022-11-26 22:30:04 +01:00
runner.h test: simplify platform_init() 2020-03-27 23:51:32 +01:00
task.h win,test: change format of TEST_PIPENAME's 2022-11-11 10:44:34 +01:00
test-active.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-async-null-cb.c
test-async.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-barrier.c
test-callback-stack.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-close-fd.c stream: add uv_pipe and uv_socketpair to the API 2020-11-09 21:50:09 -05:00
test-close-order.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-condvar.c
test-connect-unspecified.c
test-connection-fail.c build: test on more platforms via QEMU in CI 2020-05-17 10:03:20 -04:00
test-cwd-and-chdir.c test: canonicalize argv[0] in exepath test 2020-03-27 23:51:22 +01:00
test-default-loop-close.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-delayed-accept.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-dlerror.c test: fix musl libc.a dlerror() test expectation (#3735) 2022-09-07 11:21:24 -04:00
test-eintr-handling.c
test-embed.c aix,test: uv_backend_fd is not supported by poll (#3621) 2022-05-13 12:43:28 +02:00
test-emfile.c
test-env-vars.c test: fix -Wunused-but-set-variable warnings (#3829) 2022-11-26 22:30:04 +01:00
test-error.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-fail-always.c
test-fork.c
test-fs-copyfile.c asan: fix some tests (#3323) 2021-10-10 00:57:43 +02:00
test-fs-event.c unix: drop kfreebsd support (#3835) 2022-11-28 22:45:28 +01:00
test-fs-fd-hash.c
test-fs-open-flags.c win,fs: fix error code in uv_fs_read() and uv_fs_write() (#3303) 2021-10-16 15:11:52 +02:00
test-fs-poll.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-fs-readdir.c asan: fix some tests (#3323) 2021-10-10 00:57:43 +02:00
test-fs.c win: fix fstat for pipes and character files (#3811) 2022-11-29 17:46:09 -05:00
test-get-currentexe.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-get-loadavg.c
test-get-memory.c unix,win: add uv_get_available_memory() (#3754) 2022-11-24 22:09:32 +01:00
test-get-passwd.c core: change uv_get_password uid/gid to unsigned (#3476) 2022-02-22 10:59:06 -05:00
test-getaddrinfo.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-gethostname.c test: pass test when hostname is single character 2020-04-06 12:57:32 +02:00
test-getnameinfo.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-getsockname.c test: separate some static variables by test cases (#3567) 2022-04-11 11:22:37 -04:00
test-getters-setters.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-gettimeofday.c
test-handle-fileno.c
test-homedir.c test: canonicalize argv[0] in exepath test 2020-03-27 23:51:22 +01:00
test-hrtime.c
test-idle.c unix,win: fix UV_RUN_ONCE + uv_idle_stop loop hang (#3590) 2022-04-06 15:49:21 +02:00
test-idna.c idna: fix OOB read in punycode decoder 2021-07-02 14:07:07 -04:00
test-ip4-addr.c unix: set sin_len and sin6_len 2019-10-04 23:58:18 +02:00
test-ip6-addr.c run test named ip6_sin6_len 2021-07-21 12:39:13 -04:00
test-ip-name.c unix,win: add uv_ip_name to get name from sockaddr (#3368) 2021-11-25 10:05:15 +01:00
test-ipc-heavy-traffic-deadlock-bug.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-ipc-send-recv.c test: fix ipc_send_recv_pipe flakiness (#3478) 2022-02-20 12:17:13 +01:00
test-ipc.c test: remove flaky test ipc_closed_handle (#3464) 2022-02-08 14:18:10 +01:00
test-list.h win: fix fstat for pipes and character files (#3811) 2022-11-29 17:46:09 -05:00
test-loop-alive.c
test-loop-close.c
test-loop-configure.c
test-loop-handles.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-loop-stop.c
test-loop-time.c loop: add pending work to loop-alive check (#3466) 2022-02-13 00:12:11 -05:00
test-metrics.c src: add new metrics APIs (#3749) 2022-11-11 16:21:58 +01:00
test-multiple-listen.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-mutexes.c
test-not-readable-nor-writable-on-read-error.c Re-merge "unix,stream: clear read/write states on close/eof" 2021-05-21 16:20:07 -04:00
test-not-writable-after-shutdown.c Re-merge "unix,stream: clear read/write states on close/eof" 2021-05-21 16:20:07 -04:00
test-osx-select.c
test-pass-always.c
test-ping-pong.c asan: fix some tests (#3323) 2021-10-10 00:57:43 +02:00
test-pipe-bind-error.c tcp,pipe: fail bind or listen after close (#3641) 2022-06-11 00:32:08 -04:00
test-pipe-close-stdout-read-stdin.c
test-pipe-connect-error.c asan: fix some tests (#3323) 2021-10-10 00:57:43 +02:00
test-pipe-connect-multiple.c win,pipe: fixes in uv_pipe_connect() 2022-11-11 10:44:34 +01:00
test-pipe-connect-prepare.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-pipe-getsockname.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-pipe-pending-instances.c
test-pipe-sendmsg.c
test-pipe-server-close.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-pipe-set-fchmod.c build: add MemorySanitizer (MSAN) support (#3788) 2022-10-18 23:21:42 +02:00
test-pipe-set-non-blocking.c loop: better align order-of-events behavior between platforms (#3598) 2022-05-13 12:41:33 +02:00
test-platform-output.c unix,win: add uv_available_parallelism() (#3499) 2022-03-04 22:35:14 +01:00
test-poll-close-doesnt-corrupt-stack.c test: fix -fno-common build errors 2020-01-10 11:09:04 -05:00
test-poll-close.c
test-poll-closesocket.c test: fix -fno-common build errors 2020-01-10 11:09:04 -05:00
test-poll-multiple-handles.c test: fix 'incompatible pointer types' warnings 2021-01-16 15:07:57 -05:00
test-poll-oob.c
test-poll.c unix: drop kfreebsd support (#3835) 2022-11-28 22:45:28 +01:00
test-process-priority.c
test-process-title-threadsafe.c test: fix thread race in process_title_threadsafe 2020-08-06 10:18:29 +02:00
test-process-title.c unix: fix size check in uv_get_process_title() 2020-02-08 12:28:34 +01:00
test-queue-foreach-delete.c test: fix gcc 8 warnings for tests 2019-08-06 12:01:15 -04:00
test-random.c unix,win: add uv_random() 2019-09-18 08:09:14 +02:00
test-readable-on-eof.c stream: permit read after seeing EOF (#3361) 2021-11-24 19:25:47 -05:00
test-ref.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-run-nowait.c
test-run-once.c
test-semaphore.c
test-shutdown-close.c
test-shutdown-eof.c unix,win: more uv_read_start() argument validation 2020-11-05 16:41:44 -05:00
test-shutdown-simultaneous.c unix,stream: fix loop hang after uv_shutdown 2021-07-13 10:54:02 -04:00
test-shutdown-twice.c
test-signal-multiple-loops.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-signal-pending-on-close.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-signal.c
test-socket-buffer-size.c
test-spawn.c loop: better align order-of-events behavior between platforms (#3598) 2022-05-13 12:41:33 +02:00
test-stdio-over-pipes.c win,pipe: ensure req->event_handle is defined 2020-02-27 09:12:52 +01:00
test-strscpy.c
test-strtok.c core: add thread-safe strtok implementation (#3553) 2022-03-22 15:15:00 -04:00
test-tcp-alloc-cb-fail.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tcp-bind6-error.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tcp-bind-error.c tcp,pipe: fail bind or listen after close (#3641) 2022-06-11 00:32:08 -04:00
test-tcp-close-accept.c
test-tcp-close-after-read-timeout.c win: fix unexpected ECONNRESET error on TCP socket (#3584) 2022-04-07 21:44:45 -04:00
test-tcp-close-reset.c unix,tcp: allow EINVAL errno from setsockopt in uv_tcp_close_reset() (#3662) 2022-07-11 12:29:25 -04:00
test-tcp-close-while-connecting.c
test-tcp-close.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tcp-connect6-error.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tcp-connect-error-after-write.c
test-tcp-connect-error.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tcp-connect-timeout.c win,test: fix a few typos 2021-11-30 23:22:31 -05:00
test-tcp-create-socket-early.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tcp-flags.c
test-tcp-oob.c
test-tcp-open.c test: fix stack-use-after-scope 2021-04-04 17:29:54 +02:00
test-tcp-read-stop-start.c win,tcp: avoid reinserting a pending request (#2688) 2020-07-28 13:59:08 -04:00
test-tcp-read-stop.c
test-tcp-rst.c test: remove unused declarations in tcp_rst test (#3574) 2022-03-22 15:13:10 -04:00
test-tcp-shutdown-after-write.c
test-tcp-try-write-error.c
test-tcp-try-write.c
test-tcp-unexpected-read.c
test-tcp-write-after-connect.c build: test on more platforms via QEMU in CI 2020-05-17 10:03:20 -04:00
test-tcp-write-fail.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tcp-write-in-a-row.c stream: process more than one write req per loop tick (#3728) 2022-10-08 10:23:01 +02:00
test-tcp-write-queue-order.c
test-tcp-write-to-half-open-connection.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tcp-writealot.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-test-macros.c test: avoid double evaluation in ASSERT_BASE macro 2020-08-12 13:13:02 -04:00
test-thread-affinity.c thread: add uv_thread_getcpu() (#3803) 2022-11-15 18:01:29 +01:00
test-thread-equal.c thread: initialize uv_thread_self for all threads (#3357) 2021-11-24 19:34:57 -05:00
test-thread.c unix: don't allow too small thread stack size (#3423) 2022-01-17 09:36:26 +01:00
test-threadpool-cancel.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-threadpool.c
test-timer-again.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-timer-from-check.c
test-timer.c test: separate some static variables by test cases (#3567) 2022-04-11 11:22:37 -04:00
test-tmpdir.c test: canonicalize argv[0] in exepath test 2020-03-27 23:51:22 +01:00
test-tty-duplicate-key.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-tty-escape-sequence-processing.c build: add windows build to CI (#3212) 2021-10-16 12:25:48 +02:00
test-tty.c unix: drop kfreebsd support (#3835) 2022-11-28 22:45:28 +01:00
test-udp-alloc-cb-fail.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-udp-bind.c
test-udp-connect6.c ibmi: Implement UDP disconnect (#3561) 2022-03-18 12:03:47 +00:00
test-udp-connect.c ibmi: Implement UDP disconnect (#3561) 2022-03-18 12:03:47 +00:00
test-udp-create-socket-early.c
test-udp-dgram-too-big.c
test-udp-ipv6.c unix: drop kfreebsd support (#3835) 2022-11-28 22:45:28 +01:00
test-udp-mmsg.c test: fix flaky udp_mmsg test 2022-02-17 17:34:36 +01:00
test-udp-multicast-interface6.c unix: drop kfreebsd support (#3835) 2022-11-28 22:45:28 +01:00
test-udp-multicast-interface.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-udp-multicast-join6.c unix: drop kfreebsd support (#3835) 2022-11-28 22:45:28 +01:00
test-udp-multicast-join.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-udp-multicast-ttl.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-udp-open.c test: fix stack-use-after-scope 2021-04-04 17:29:54 +02:00
test-udp-options.c build: test on more platforms via QEMU in CI 2020-05-17 10:03:20 -04:00
test-udp-recv-in-a-row.c win: optimize udp receive performance (#3807) 2022-11-08 10:23:40 +01:00
test-udp-send-and-recv.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-udp-send-hang-loop.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-udp-send-immediate.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-udp-send-unreachable.c test: fix test-udp-send-unreachable 2021-02-17 10:30:13 +01:00
test-udp-sendmmsg-error.c udp: fix write_queue cleanup on sendmmsg error 2020-07-02 21:29:42 +02:00
test-udp-try-send.c test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros 2021-02-14 10:05:46 +01:00
test-uname.c
test-walk-handles.c
test-watcher-cross-stop.c test: skip some UDP tests on IBMi 2020-02-28 11:51:36 +01:00