diff options
author | isaacs <i@izs.me> | 2013-06-26 10:48:10 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-06-26 10:48:23 -0700 |
commit | 4bc024ddecf4e0daaa5d28155d3ad5977b98a68e (patch) | |
tree | eba928832aeb353981a5197998721d61c9748dc5 /deps/uv/test | |
parent | 4ae96c885bd3118a1f19972b90aabbc83cf5b20b (diff) | |
download | android-node-v8-4bc024ddecf4e0daaa5d28155d3ad5977b98a68e.tar.gz android-node-v8-4bc024ddecf4e0daaa5d28155d3ad5977b98a68e.tar.bz2 android-node-v8-4bc024ddecf4e0daaa5d28155d3ad5977b98a68e.zip |
uv: Upgrade to v0.11.5
Diffstat (limited to 'deps/uv/test')
-rw-r--r-- | deps/uv/test/task.h | 10 | ||||
-rw-r--r-- | deps/uv/test/test-fs-event.c | 2 | ||||
-rw-r--r-- | deps/uv/test/test-fs.c | 40 | ||||
-rw-r--r-- | deps/uv/test/test-spawn.c | 2 |
4 files changed, 32 insertions, 22 deletions
diff --git a/deps/uv/test/task.h b/deps/uv/test/task.h index 308201e579..1e3f8df804 100644 --- a/deps/uv/test/task.h +++ b/deps/uv/test/task.h @@ -43,6 +43,16 @@ # define TEST_PIPENAME_2 "/tmp/uv-test-sock2" #endif +#ifdef _WIN32 +# include <io.h> +# ifndef S_IRUSR +# define S_IRUSR _S_IREAD +# endif +# ifndef S_IWUSR +# define S_IWUSR _S_IWRITE +# endif +#endif + #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define container_of(ptr, type, member) \ diff --git a/deps/uv/test/test-fs-event.c b/deps/uv/test/test-fs-event.c index 37f9cf2e31..e989511582 100644 --- a/deps/uv/test/test-fs-event.c +++ b/deps/uv/test/test-fs-event.c @@ -56,7 +56,7 @@ static void create_file(uv_loop_t* loop, const char* name) { uv_fs_t req; r = uv_fs_open(loop, &req, name, O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); file = r; uv_fs_req_cleanup(&req); diff --git a/deps/uv/test/test-fs.c b/deps/uv/test/test-fs.c index 6459d125cf..1ab958f1e9 100644 --- a/deps/uv/test/test-fs.c +++ b/deps/uv/test/test-fs.c @@ -600,7 +600,7 @@ TEST_IMPL(fs_file_async) { loop = uv_default_loop(); r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IREAD | S_IWRITE, create_cb); + S_IRUSR | S_IWUSR, create_cb); ASSERT(r == 0); uv_run(loop, UV_RUN_DEFAULT); @@ -663,7 +663,7 @@ TEST_IMPL(fs_file_sync) { loop = uv_default_loop(); r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(open_req1.result != -1); uv_fs_req_cleanup(&open_req1); @@ -756,7 +756,7 @@ TEST_IMPL(fs_async_dir) { /* Create 2 files synchronously. */ r = uv_fs_open(loop, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(loop, &close_req, open_req1.result, NULL); @@ -764,7 +764,7 @@ TEST_IMPL(fs_async_dir) { uv_fs_req_cleanup(&close_req); r = uv_fs_open(loop, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(loop, &close_req, open_req1.result, NULL); @@ -840,7 +840,7 @@ TEST_IMPL(fs_async_sendfile) { unlink("test_file"); unlink("test_file2"); - f = open("test_file", O_WRONLY | O_CREAT, S_IWRITE | S_IREAD); + f = open("test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR); ASSERT(f != -1); r = write(f, "begin\n", 6); @@ -862,7 +862,7 @@ TEST_IMPL(fs_async_sendfile) { uv_fs_req_cleanup(&open_req1); r = uv_fs_open(loop, &open_req2, "test_file2", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(open_req2.result != -1); uv_fs_req_cleanup(&open_req2); @@ -909,7 +909,7 @@ TEST_IMPL(fs_fstat) { loop = uv_default_loop(); r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(req.result != -1); file = req.result; @@ -1003,7 +1003,7 @@ TEST_IMPL(fs_chmod) { loop = uv_default_loop(); r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(req.result != -1); file = req.result; @@ -1100,7 +1100,7 @@ TEST_IMPL(fs_chown) { loop = uv_default_loop(); r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(req.result != -1); file = req.result; @@ -1166,7 +1166,7 @@ TEST_IMPL(fs_link) { loop = uv_default_loop(); r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(req.result != -1); file = req.result; @@ -1274,7 +1274,7 @@ TEST_IMPL(fs_symlink) { loop = uv_default_loop(); r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(req.result != -1); file = req.result; @@ -1439,7 +1439,7 @@ TEST_IMPL(fs_symlink_dir) { uv_fs_req_cleanup(&req); r = uv_fs_open(loop, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(loop, &close_req, open_req1.result, NULL); @@ -1447,7 +1447,7 @@ TEST_IMPL(fs_symlink_dir) { uv_fs_req_cleanup(&close_req); r = uv_fs_open(loop, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(loop, &close_req, open_req1.result, NULL); @@ -1504,7 +1504,7 @@ TEST_IMPL(fs_utime) { loop = uv_default_loop(); unlink(path); r = uv_fs_open(loop, &req, path, O_RDWR | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(req.result != -1); uv_fs_req_cleanup(&req); @@ -1589,7 +1589,7 @@ TEST_IMPL(fs_futime) { loop = uv_default_loop(); unlink(path); r = uv_fs_open(loop, &req, path, O_RDWR | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(req.result != -1); uv_fs_req_cleanup(&req); @@ -1747,7 +1747,7 @@ TEST_IMPL(fs_file_open_append) { loop = uv_default_loop(); r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(open_req1.result != -1); uv_fs_req_cleanup(&open_req1); @@ -1779,7 +1779,7 @@ TEST_IMPL(fs_file_open_append) { ASSERT(close_req.result != -1); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_file", O_RDONLY, S_IREAD, NULL); + r = uv_fs_open(loop, &open_req1, "test_file", O_RDONLY, S_IRUSR, NULL); ASSERT(r != -1); ASSERT(open_req1.result != -1); uv_fs_req_cleanup(&open_req1); @@ -1817,7 +1817,7 @@ TEST_IMPL(fs_rename_to_existing_file) { loop = uv_default_loop(); r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(open_req1.result != -1); uv_fs_req_cleanup(&open_req1); @@ -1834,7 +1834,7 @@ TEST_IMPL(fs_rename_to_existing_file) { uv_fs_req_cleanup(&close_req); r = uv_fs_open(loop, &open_req1, "test_file2", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(open_req1.result != -1); uv_fs_req_cleanup(&open_req1); @@ -1885,7 +1885,7 @@ TEST_IMPL(fs_read_file_eof) { loop = uv_default_loop(); r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, - S_IWRITE | S_IREAD, NULL); + S_IWUSR | S_IRUSR, NULL); ASSERT(r != -1); ASSERT(open_req1.result != -1); uv_fs_req_cleanup(&open_req1); diff --git a/deps/uv/test/test-spawn.c b/deps/uv/test/test-spawn.c index 56eca9c58c..afa8d918b3 100644 --- a/deps/uv/test/test-spawn.c +++ b/deps/uv/test/test-spawn.c @@ -222,7 +222,7 @@ TEST_IMPL(spawn_stdout_to_file) { init_process_options("spawn_helper2", exit_cb); r = uv_fs_open(uv_default_loop(), &fs_req, "stdout_file", O_CREAT | O_RDWR, - S_IREAD | S_IWRITE, NULL); + S_IRUSR | S_IWUSR, NULL); ASSERT(r != -1); uv_fs_req_cleanup(&fs_req); |