summaryrefslogtreecommitdiff
path: root/deps/uv/test/run-tests.c
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-11-12 23:59:52 -0500
committercjihrig <cjihrig@gmail.com>2018-11-15 14:52:55 -0500
commit9cef7b84b1f6b1e116afaad945f31b368e8917e2 (patch)
tree333273bbf34a23e65deea4a85d009b75f2f77e4d /deps/uv/test/run-tests.c
parent1ddcccb7e379089ac47b87d772343e16fd84c1c8 (diff)
downloadandroid-node-v8-9cef7b84b1f6b1e116afaad945f31b368e8917e2.tar.gz
android-node-v8-9cef7b84b1f6b1e116afaad945f31b368e8917e2.tar.bz2
android-node-v8-9cef7b84b1f6b1e116afaad945f31b368e8917e2.zip
deps: upgrade to libuv 1.24.0
PR-URL: https://github.com/nodejs/node/pull/24332 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'deps/uv/test/run-tests.c')
-rw-r--r--deps/uv/test/run-tests.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/uv/test/run-tests.c b/deps/uv/test/run-tests.c
index 9b8af04608..42bde0bb96 100644
--- a/deps/uv/test/run-tests.c
+++ b/deps/uv/test/run-tests.c
@@ -109,20 +109,24 @@ static int maybe_run_test(int argc, char **argv) {
}
if (strcmp(argv[1], "spawn_helper1") == 0) {
+ notify_parent_process();
return 1;
}
if (strcmp(argv[1], "spawn_helper2") == 0) {
+ notify_parent_process();
printf("hello world\n");
return 1;
}
if (strcmp(argv[1], "spawn_tcp_server_helper") == 0) {
+ notify_parent_process();
return spawn_tcp_server_helper();
}
if (strcmp(argv[1], "spawn_helper3") == 0) {
char buffer[256];
+ notify_parent_process();
ASSERT(buffer == fgets(buffer, sizeof(buffer) - 1, stdin));
buffer[sizeof(buffer) - 1] = '\0';
fputs(buffer, stdout);
@@ -130,12 +134,14 @@ static int maybe_run_test(int argc, char **argv) {
}
if (strcmp(argv[1], "spawn_helper4") == 0) {
+ notify_parent_process();
/* Never surrender, never return! */
while (1) uv_sleep(10000);
}
if (strcmp(argv[1], "spawn_helper5") == 0) {
const char out[] = "fourth stdio!\n";
+ notify_parent_process();
#ifdef _WIN32
DWORD bytes;
WriteFile((HANDLE) _get_osfhandle(3), out, sizeof(out) - 1, &bytes, NULL);
@@ -156,6 +162,8 @@ static int maybe_run_test(int argc, char **argv) {
if (strcmp(argv[1], "spawn_helper6") == 0) {
int r;
+ notify_parent_process();
+
r = fprintf(stdout, "hello world\n");
ASSERT(r > 0);
@@ -168,6 +176,9 @@ static int maybe_run_test(int argc, char **argv) {
if (strcmp(argv[1], "spawn_helper7") == 0) {
int r;
char *test;
+
+ notify_parent_process();
+
/* Test if the test value from the parent is still set */
test = getenv("ENV_TEST");
ASSERT(test != NULL);
@@ -181,6 +192,8 @@ static int maybe_run_test(int argc, char **argv) {
#ifndef _WIN32
if (strcmp(argv[1], "spawn_helper8") == 0) {
int fd;
+
+ notify_parent_process();
ASSERT(sizeof(fd) == read(0, &fd, sizeof(fd)));
ASSERT(fd > 2);
ASSERT(-1 == write(fd, "x", 1));
@@ -190,6 +203,7 @@ static int maybe_run_test(int argc, char **argv) {
#endif /* !_WIN32 */
if (strcmp(argv[1], "spawn_helper9") == 0) {
+ notify_parent_process();
return spawn_stdin_stdout();
}
@@ -200,6 +214,7 @@ static int maybe_run_test(int argc, char **argv) {
ASSERT(uid == getuid());
ASSERT(gid == getgid());
+ notify_parent_process();
return 1;
}