libuv 1.45.0, #include cleanup, probably something else.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4308 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Makefile
core
deps/libuv
.github
.mailmap.readthedocs.yamlAUTHORSCMakeLists.txtChangeLogLICENSELICENSE-extraLINKS.mdMAINTAINERS.mdMakefile.amREADME.mdSUPPORTED_PLATFORMS.mdautogen.shcmake-toolchains
configure.acdocs
include
libuv-static.pc.inlibuv.pc.insrc
inet.cthread-common.cthreadpool.c
unix
aix.casync.catomic-ops.hcore.ccygwin.cdarwin-stub.hdarwin.cepoll.cfreebsd.cfs.cfsevents.chaiku.churd.cibmi.cinternal.hkqueue.clinux-core.clinux-inotify.clinux-syscalls.clinux-syscalls.hlinux.cloop.cnetbsd.copenbsd.cos390.cpipe.cposix-hrtime.cposix-poll.cprocess.cpthread-fixes.cqnx.crandom-devurandom.crandom-getrandom.csignal.cspinlock.hstream.csunos.ctcp.cthread.ctty.cudp.c
uv-common.cuv-common.hwin
test
benchmark-async-pummel.cbenchmark-async.cbenchmark-fs-stat.cbenchmark-getaddrinfo.cbenchmark-loop-count.cbenchmark-million-async.cbenchmark-million-timers.cbenchmark-multi-accept.cbenchmark-ping-pongs.cbenchmark-ping-udp.cbenchmark-pound.cbenchmark-pump.cbenchmark-queue-work.cbenchmark-spawn.cbenchmark-tcp-write-batch.cbenchmark-udp-pummel.crun-tests.crunner-unix.crunner.ctask.htest-active.ctest-async-null-cb.ctest-async.ctest-barrier.ctest-callback-stack.ctest-close-fd.ctest-close-order.ctest-condvar.ctest-connect-unspecified.ctest-connection-fail.ctest-default-loop-close.ctest-delayed-accept.ctest-dlerror.ctest-eintr-handling.ctest-embed.ctest-emfile.ctest-env-vars.ctest-fork.ctest-fs-copyfile.ctest-fs-event.ctest-fs-open-flags.ctest-fs-poll.ctest-fs-readdir.ctest-fs.ctest-get-currentexe.ctest-get-memory.ctest-get-passwd.ctest-getaddrinfo.ctest-gethostname.ctest-getnameinfo.ctest-getsockname.ctest-getters-setters.ctest-handle-fileno.ctest-hrtime.ctest-idle.ctest-idna.ctest-ip-name.ctest-ip4-addr.ctest-ip6-addr.ctest-ipc-heavy-traffic-deadlock-bug.ctest-ipc-send-recv.ctest-ipc.ctest-list.htest-loop-alive.ctest-loop-close.ctest-loop-handles.ctest-loop-stop.ctest-loop-time.ctest-metrics.ctest-multiple-listen.ctest-not-readable-nor-writable-on-read-error.ctest-not-writable-after-shutdown.ctest-osx-select.ctest-ping-pong.ctest-pipe-bind-error.ctest-pipe-close-stdout-read-stdin.ctest-pipe-connect-error.ctest-pipe-connect-multiple.ctest-pipe-connect-prepare.ctest-pipe-getsockname.ctest-pipe-pending-instances.ctest-pipe-sendmsg.ctest-pipe-server-close.ctest-pipe-set-fchmod.ctest-pipe-set-non-blocking.ctest-platform-output.ctest-poll-close-doesnt-corrupt-stack.ctest-poll-close.ctest-poll-closesocket.ctest-poll-multiple-handles.ctest-poll-oob.ctest-poll.ctest-process-title.ctest-queue-foreach-delete.ctest-random.ctest-readable-on-eof.ctest-ref.ctest-run-nowait.ctest-run-once.ctest-shutdown-close.ctest-shutdown-eof.ctest-shutdown-simultaneous.ctest-shutdown-twice.ctest-signal-multiple-loops.ctest-signal-pending-on-close.ctest-signal.ctest-socket-buffer-size.ctest-spawn.ctest-stdio-over-pipes.ctest-tcp-alloc-cb-fail.ctest-tcp-bind-error.ctest-tcp-bind6-error.ctest-tcp-close-accept.ctest-tcp-close-after-read-timeout.ctest-tcp-close-reset.ctest-tcp-close-while-connecting.ctest-tcp-close.ctest-tcp-connect-error-after-write.ctest-tcp-connect-error.ctest-tcp-connect-timeout.ctest-tcp-connect6-error.ctest-tcp-create-socket-early.ctest-tcp-flags.ctest-tcp-oob.ctest-tcp-open.ctest-tcp-read-stop-start.ctest-tcp-read-stop.ctest-tcp-rst.ctest-tcp-shutdown-after-write.ctest-tcp-try-write-error.ctest-tcp-try-write.ctest-tcp-unexpected-read.ctest-tcp-write-after-connect.ctest-tcp-write-fail.ctest-tcp-write-in-a-row.ctest-tcp-write-queue-order.ctest-tcp-write-to-half-open-connection.ctest-tcp-writealot.ctest-thread-affinity.ctest-threadpool-cancel.ctest-threadpool.ctest-timer-again.ctest-timer-from-check.ctest-timer.ctest-tty-duplicate-key.ctest-tty-escape-sequence-processing.ctest-tty.ctest-udp-alloc-cb-fail.ctest-udp-bind.ctest-udp-connect.ctest-udp-connect6.ctest-udp-create-socket-early.ctest-udp-dgram-too-big.ctest-udp-ipv6.ctest-udp-mmsg.ctest-udp-multicast-interface.ctest-udp-multicast-interface6.ctest-udp-multicast-join.ctest-udp-multicast-join6.ctest-udp-multicast-ttl.ctest-udp-open.ctest-udp-options.ctest-udp-recv-in-a-row.ctest-udp-send-and-recv.ctest-udp-send-hang-loop.ctest-udp-send-immediate.ctest-udp-send-unreachable.ctest-udp-sendmmsg-error.ctest-udp-try-send.ctest-walk-handles.ctest-watcher-cross-stop.c
tsansupp.txtfixtures
one_file
src
59
deps/libuv/test/test-fs-event.c
vendored
59
deps/libuv/test/test-fs-event.c
vendored
@@ -33,19 +33,12 @@
|
||||
# if defined(__APPLE__) || \
|
||||
defined(__DragonFly__) || \
|
||||
defined(__FreeBSD__) || \
|
||||
defined(__FreeBSD_kernel__) || \
|
||||
defined(__OpenBSD__) || \
|
||||
defined(__NetBSD__)
|
||||
# define HAVE_KQUEUE 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__arm__)/* Increase the timeout so the test passes on arm CI bots */
|
||||
# define CREATE_TIMEOUT 100
|
||||
#else
|
||||
# define CREATE_TIMEOUT 1
|
||||
#endif
|
||||
|
||||
static uv_fs_event_t fs_event;
|
||||
static const char file_prefix[] = "fsevent-";
|
||||
static const int fs_event_file_count = 16;
|
||||
@@ -163,10 +156,7 @@ static void fs_event_create_files(uv_timer_t* handle) {
|
||||
if (++fs_event_created < fs_event_file_count) {
|
||||
/* Create another file on a different event loop tick. We do it this way
|
||||
* to avoid fs events coalescing into one fs event. */
|
||||
ASSERT(0 == uv_timer_start(&timer,
|
||||
fs_event_create_files,
|
||||
CREATE_TIMEOUT,
|
||||
0));
|
||||
ASSERT_EQ(0, uv_timer_start(&timer, fs_event_create_files, 100, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +232,8 @@ static void fs_event_create_files_in_subdir(uv_timer_t* handle) {
|
||||
if (++fs_event_created < fs_event_file_count) {
|
||||
/* Create another file on a different event loop tick. We do it this way
|
||||
* to avoid fs events coalescing into one fs event. */
|
||||
ASSERT(0 == uv_timer_start(&timer, fs_event_create_files_in_subdir, 1, 0));
|
||||
ASSERT_EQ(0,
|
||||
uv_timer_start(&timer, fs_event_create_files_in_subdir, 100, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,7 +432,7 @@ TEST_IMPL(fs_event_watch_dir) {
|
||||
remove("watch_dir/file1");
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -503,7 +494,7 @@ TEST_IMPL(fs_event_watch_dir_recursive) {
|
||||
remove("watch_dir/subdir");
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
#else
|
||||
RETURN_SKIP("Recursive directory watching not supported on this platform.");
|
||||
@@ -550,7 +541,7 @@ TEST_IMPL(fs_event_watch_dir_short_path) {
|
||||
remove("watch_dir/file1");
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
|
||||
if (!has_shortnames)
|
||||
RETURN_SKIP("Was not able to address files with 8.3 short name.");
|
||||
@@ -596,7 +587,7 @@ TEST_IMPL(fs_event_watch_file) {
|
||||
remove("watch_dir/file1");
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -623,7 +614,7 @@ TEST_IMPL(fs_event_watch_file_exact_path) {
|
||||
create_file("watch_dir/file.js");
|
||||
create_file("watch_dir/file.jsx");
|
||||
#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_12)
|
||||
/* Empirically, FSEvents seems to (reliably) report the preceeding
|
||||
/* Empirically, FSEvents seems to (reliably) report the preceding
|
||||
* create_file events prior to macOS 10.11.6 in the subsequent fs_watch
|
||||
* creation, but that behavior hasn't been observed to occur on newer
|
||||
* versions. Give a long delay here to let the system settle before running
|
||||
@@ -649,7 +640,7 @@ TEST_IMPL(fs_event_watch_file_exact_path) {
|
||||
remove("watch_dir/file.jsx");
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -673,7 +664,7 @@ TEST_IMPL(fs_event_watch_file_twice) {
|
||||
ASSERT(0 == uv_timer_start(&timer, timer_cb_watch_twice, 10, 0));
|
||||
ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -691,7 +682,7 @@ TEST_IMPL(fs_event_watch_file_current_dir) {
|
||||
remove("watch_file");
|
||||
create_file("watch_file");
|
||||
#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_12)
|
||||
/* Empirically, kevent seems to (sometimes) report the preceeding
|
||||
/* Empirically, kevent seems to (sometimes) report the preceding
|
||||
* create_file events prior to macOS 10.11.6 in the subsequent fs_event_start
|
||||
* So let the system settle before running the test. */
|
||||
uv_sleep(1100);
|
||||
@@ -728,7 +719,7 @@ TEST_IMPL(fs_event_watch_file_current_dir) {
|
||||
/* Cleanup */
|
||||
remove("watch_file");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -754,7 +745,7 @@ TEST_IMPL(fs_event_watch_file_root_dir) {
|
||||
|
||||
uv_close((uv_handle_t*) &fs_event, NULL);
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -793,7 +784,7 @@ TEST_IMPL(fs_event_no_callback_after_close) {
|
||||
remove("watch_dir/file1");
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -830,7 +821,7 @@ TEST_IMPL(fs_event_no_callback_on_close) {
|
||||
remove("watch_dir/file1");
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -868,7 +859,7 @@ TEST_IMPL(fs_event_immediate_close) {
|
||||
|
||||
ASSERT(close_cb_called == 2);
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -903,7 +894,7 @@ TEST_IMPL(fs_event_close_with_pending_event) {
|
||||
remove("watch_dir/file");
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -941,7 +932,7 @@ TEST_IMPL(fs_event_close_with_pending_delete_event) {
|
||||
/* Clean up */
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -982,7 +973,7 @@ TEST_IMPL(fs_event_close_in_callback) {
|
||||
fs_event_unlink_files(NULL);
|
||||
remove("watch_dir/");
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1017,7 +1008,7 @@ TEST_IMPL(fs_event_start_and_close) {
|
||||
ASSERT(close_cb_called == 2);
|
||||
|
||||
remove("watch_dir/");
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1070,7 +1061,7 @@ TEST_IMPL(fs_event_getpath) {
|
||||
}
|
||||
|
||||
remove("watch_dir/");
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1159,7 +1150,7 @@ TEST_IMPL(fs_event_error_reporting) {
|
||||
} while (i-- != 0);
|
||||
|
||||
remove("watch_dir/");
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(uv_default_loop());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1168,7 +1159,7 @@ TEST_IMPL(fs_event_error_reporting) {
|
||||
TEST_IMPL(fs_event_error_reporting) {
|
||||
/* No-op, needed only for FSEvents backend */
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(uv_default_loop());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1191,7 +1182,7 @@ TEST_IMPL(fs_event_watch_invalid_path) {
|
||||
r = uv_fs_event_start(&fs_event, fs_event_cb_file, "", 0);
|
||||
ASSERT(r != 0);
|
||||
ASSERT(uv_is_active((uv_handle_t*) &fs_event) == 0);
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1237,6 +1228,6 @@ TEST_IMPL(fs_event_stop_in_cb) {
|
||||
|
||||
remove(path);
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(uv_default_loop());
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user