Lines Matching refs:open_req1

105 static uv_fs_t open_req1;  variable
392 r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); in ftruncate_cb()
409 r = uv_fs_ftruncate(loop, &ftruncate_req, open_req1.result, 7, in read_cb()
413 r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); in read_cb()
421 ASSERT_PTR_EQ(req, &open_req1); in open_cb()
433 r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, in open_cb()
458 r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); in fsync_cb()
470 r = uv_fs_fsync(loop, &fsync_req, open_req1.result, fsync_cb); in fdatasync_cb()
482 r = uv_fs_fdatasync(loop, &fdatasync_req, open_req1.result, fdatasync_cb); in write_cb()
489 ASSERT_PTR_EQ(req, &open_req1); in create_cb()
926 r = uv_fs_open(loop, &open_req1, "test_file", UV_FS_O_WRONLY | UV_FS_O_CREAT, in TEST_IMPL()
946 r = uv_fs_open(loop, &open_req1, "test_file2", UV_FS_O_RDWR, 0, open_cb); in TEST_IMPL()
958 r = uv_fs_open(loop, &open_req1, "test_file2", UV_FS_O_RDONLY, 0, open_cb); in TEST_IMPL()
989 r = uv_fs_open(loop, &open_req1, "test_file", in fs_file_sync()
993 ASSERT_GE(open_req1.result, 0); in fs_file_sync()
994 uv_fs_req_cleanup(&open_req1); in fs_file_sync()
997 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_sync()
1002 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_sync()
1007 r = uv_fs_open(NULL, &open_req1, "test_file", UV_FS_O_RDWR | add_flags, 0, in fs_file_sync()
1010 ASSERT_GE(open_req1.result, 0); in fs_file_sync()
1011 uv_fs_req_cleanup(&open_req1); in fs_file_sync()
1014 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_sync()
1020 r = uv_fs_ftruncate(NULL, &ftruncate_req, open_req1.result, 7, NULL); in fs_file_sync()
1025 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_sync()
1035 r = uv_fs_open(NULL, &open_req1, "test_file2", UV_FS_O_RDONLY | add_flags, 0, in fs_file_sync()
1038 ASSERT_GE(open_req1.result, 0); in fs_file_sync()
1039 uv_fs_req_cleanup(&open_req1); in fs_file_sync()
1043 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_sync()
1049 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_sync()
1124 r = uv_fs_open(NULL, &open_req1, "test_file", in fs_file_write_null_buffer()
1128 ASSERT_GE(open_req1.result, 0); in fs_file_write_null_buffer()
1129 uv_fs_req_cleanup(&open_req1); in fs_file_write_null_buffer()
1132 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_write_null_buffer()
1137 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_write_null_buffer()
1171 r = uv_fs_open(NULL, &open_req1, "test_dir/file1", in TEST_IMPL()
1175 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
1176 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
1180 r = uv_fs_open(NULL, &open_req1, "test_dir/file2", in TEST_IMPL()
1184 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
1185 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
1272 r = uv_fs_open(NULL, &open_req1, "test_file", UV_FS_O_RDWR, 0, NULL); in test_sendfile()
1274 ASSERT_GE(open_req1.result, 0); in test_sendfile()
1275 uv_fs_req_cleanup(&open_req1); in test_sendfile()
1283 r = uv_fs_sendfile(loop, &sendfile_req, open_req2.result, open_req1.result, in test_sendfile()
1290 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in test_sendfile()
1305 r = uv_fs_open(NULL, &open_req1, "test_file2", UV_FS_O_RDWR, 0, NULL); in test_sendfile()
1307 ASSERT_GE(open_req1.result, 0); in test_sendfile()
1308 uv_fs_req_cleanup(&open_req1); in test_sendfile()
1312 r = uv_fs_read(NULL, &req, open_req1.result, &iov, 1, -1, NULL); in test_sendfile()
2445 r = uv_fs_open(NULL, &open_req1, "test_dir/file1", in test_symlink_dir_impl()
2449 uv_fs_req_cleanup(&open_req1); in test_symlink_dir_impl()
2450 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in test_symlink_dir_impl()
2454 r = uv_fs_open(NULL, &open_req1, "test_dir/file2", in test_symlink_dir_impl()
2458 uv_fs_req_cleanup(&open_req1); in test_symlink_dir_impl()
2459 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in test_symlink_dir_impl()
3092 r = uv_fs_open(NULL, &open_req1, "test_file", in fs_file_open_append()
3096 ASSERT_GE(open_req1.result, 0); in fs_file_open_append()
3097 uv_fs_req_cleanup(&open_req1); in fs_file_open_append()
3100 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_open_append()
3105 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_open_append()
3110 r = uv_fs_open(NULL, &open_req1, "test_file", in fs_file_open_append()
3113 ASSERT_GE(open_req1.result, 0); in fs_file_open_append()
3114 uv_fs_req_cleanup(&open_req1); in fs_file_open_append()
3117 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_open_append()
3122 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_open_append()
3127 r = uv_fs_open(NULL, &open_req1, "test_file", UV_FS_O_RDONLY | add_flags, in fs_file_open_append()
3130 ASSERT_GE(open_req1.result, 0); in fs_file_open_append()
3131 uv_fs_req_cleanup(&open_req1); in fs_file_open_append()
3134 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_open_append()
3143 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_open_append()
3169 r = uv_fs_open(NULL, &open_req1, "test_file", UV_FS_O_WRONLY | UV_FS_O_CREAT, in TEST_IMPL()
3172 ASSERT_GE(open_req1.result, 0); in TEST_IMPL()
3173 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
3176 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in TEST_IMPL()
3181 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
3186 r = uv_fs_open(NULL, &open_req1, "test_file2", UV_FS_O_WRONLY | UV_FS_O_CREAT, in TEST_IMPL()
3189 ASSERT_GE(open_req1.result, 0); in TEST_IMPL()
3190 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
3192 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
3202 r = uv_fs_open(NULL, &open_req1, "test_file2", UV_FS_O_RDONLY, 0, NULL); in TEST_IMPL()
3204 ASSERT_GE(open_req1.result, 0); in TEST_IMPL()
3205 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
3209 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in TEST_IMPL()
3215 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
3233 ASSERT_LE(0, uv_fs_open(NULL, &open_req1, in fs_read_bufs()
3236 ASSERT_GE(open_req1.result, 0); in fs_read_bufs()
3237 uv_fs_req_cleanup(&open_req1); in fs_read_bufs()
3239 ASSERT_EQ(UV_EINVAL, uv_fs_read(NULL, &read_req, open_req1.result, in fs_read_bufs()
3241 ASSERT_EQ(UV_EINVAL, uv_fs_read(NULL, &read_req, open_req1.result, in fs_read_bufs()
3243 ASSERT_EQ(UV_EINVAL, uv_fs_read(NULL, &read_req, open_req1.result, in fs_read_bufs()
3253 open_req1.result, in fs_read_bufs()
3263 open_req1.result, in fs_read_bufs()
3274 ASSERT_OK(uv_fs_close(NULL, &close_req, open_req1.result, NULL)); in fs_read_bufs()
3298 r = uv_fs_open(NULL, &open_req1, "test_file", in fs_read_file_eof()
3302 ASSERT_GE(open_req1.result, 0); in fs_read_file_eof()
3303 uv_fs_req_cleanup(&open_req1); in fs_read_file_eof()
3306 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in fs_read_file_eof()
3311 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_read_file_eof()
3316 r = uv_fs_open(NULL, &open_req1, "test_file", UV_FS_O_RDONLY | add_flags, 0, in fs_read_file_eof()
3319 ASSERT_GE(open_req1.result, 0); in fs_read_file_eof()
3320 uv_fs_req_cleanup(&open_req1); in fs_read_file_eof()
3324 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_read_file_eof()
3331 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, in fs_read_file_eof()
3337 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_read_file_eof()
3363 r = uv_fs_open(NULL, &open_req1, "test_file", in fs_write_multiple_bufs()
3367 ASSERT_GE(open_req1.result, 0); in fs_write_multiple_bufs()
3368 uv_fs_req_cleanup(&open_req1); in fs_write_multiple_bufs()
3372 r = uv_fs_write(NULL, &write_req, open_req1.result, iovs, 2, 0, NULL); in fs_write_multiple_bufs()
3377 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_write_multiple_bufs()
3382 r = uv_fs_open(NULL, &open_req1, "test_file", UV_FS_O_RDONLY | add_flags, 0, in fs_write_multiple_bufs()
3385 ASSERT_GE(open_req1.result, 0); in fs_write_multiple_bufs()
3386 uv_fs_req_cleanup(&open_req1); in fs_write_multiple_bufs()
3393 ASSERT_OK(lseek(open_req1.result, 0, SEEK_CUR)); in fs_write_multiple_bufs()
3394 r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, 2, -1, NULL); in fs_write_multiple_bufs()
3402 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_write_multiple_bufs()
3410 r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, 2, 0, NULL); in fs_write_multiple_bufs()
3415 r = uv_fs_read(NULL, &read_req, open_req1.result, &iovs[1], 1, read_req.result, NULL); in fs_write_multiple_bufs()
3426 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, in fs_write_multiple_bufs()
3432 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_write_multiple_bufs()
3469 &open_req1, in fs_write_alotof_bufs()
3475 ASSERT_GE(open_req1.result, 0); in fs_write_alotof_bufs()
3476 uv_fs_req_cleanup(&open_req1); in fs_write_alotof_bufs()
3483 open_req1.result, in fs_write_alotof_bufs()
3500 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_write_alotof_bufs()
3505 r = uv_fs_open(NULL, &open_req1, "test_file", UV_FS_O_RDONLY | add_flags, 0, in fs_write_alotof_bufs()
3508 ASSERT_GE(open_req1.result, 0); in fs_write_alotof_bufs()
3509 uv_fs_req_cleanup(&open_req1); in fs_write_alotof_bufs()
3511 r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, iovcount, -1, NULL); in fs_write_alotof_bufs()
3525 ASSERT_EQ(lseek(open_req1.result, write_req.result, SEEK_SET), in fs_write_alotof_bufs()
3530 open_req1.result, in fs_write_alotof_bufs()
3539 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_write_alotof_bufs()
3582 &open_req1, in fs_write_alotof_bufs_with_offset()
3588 ASSERT_GE(open_req1.result, 0); in fs_write_alotof_bufs_with_offset()
3589 uv_fs_req_cleanup(&open_req1); in fs_write_alotof_bufs_with_offset()
3592 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in fs_write_alotof_bufs_with_offset()
3603 open_req1.result, in fs_write_alotof_bufs_with_offset()
3620 r = uv_fs_read(NULL, &read_req, open_req1.result, in fs_write_alotof_bufs_with_offset()
3646 open_req1.result, in fs_write_alotof_bufs_with_offset()
3655 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_write_alotof_bufs_with_offset()
3687 &open_req1, in TEST_IMPL()
3693 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
3697 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, 0, NULL); in TEST_IMPL()
3716 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
3970 &open_req1, "test_file", UV_FS_O_RDWR | UV_FS_O_CREAT, in TEST_IMPL()
3974 ASSERT_GE(open_req1.result, 0); in TEST_IMPL()
3975 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
3977 fd = uv_get_osfhandle(open_req1.result); in TEST_IMPL()
3984 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
4007 &open_req1, in TEST_IMPL()
4013 ASSERT_GE(open_req1.result, 0); in TEST_IMPL()
4014 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
4016 handle = uv_get_osfhandle(open_req1.result); in TEST_IMPL()
4027 ASSERT_EQ(fd, open_req1.result); in TEST_IMPL()
4030 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
4050 &open_req1, "test_file", UV_FS_O_RDWR | UV_FS_O_CREAT, in TEST_IMPL()
4054 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
4057 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, 0, NULL); in TEST_IMPL()
4059 ASSERT_OK(lseek(open_req1.result, 0, SEEK_CUR)); in TEST_IMPL()
4063 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, 0, NULL); in TEST_IMPL()
4066 ASSERT_OK(lseek(open_req1.result, 0, SEEK_CUR)); in TEST_IMPL()
4069 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
4085 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_pos_common()
4091 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, 1, NULL); in fs_file_pos_common()
4097 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_pos_common()
4103 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_pos_common()
4108 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_pos_common()
4117 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_pos_close_check()
4122 r = uv_fs_open(NULL, &open_req1, "test_file", UV_FS_O_RDONLY, 0, NULL); in fs_file_pos_close_check()
4124 ASSERT_GE(open_req1.result, 0); in fs_file_pos_close_check()
4125 uv_fs_req_cleanup(&open_req1); in fs_file_pos_close_check()
4128 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_pos_close_check()
4133 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in fs_file_pos_close_check()
4148 &open_req1, in fs_file_pos_write()
4154 uv_fs_req_cleanup(&open_req1); in fs_file_pos_write()
4160 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, 1, NULL); in fs_file_pos_write()
4165 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_pos_write()
4186 &open_req1, in fs_file_pos_append()
4192 uv_fs_req_cleanup(&open_req1); in fs_file_pos_append()
4199 r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, 1, NULL); in fs_file_pos_append()
4204 r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); in fs_file_pos_append()
4333 &open_req1, in TEST_IMPL()
4339 ASSERT_GE(open_req1.result, 0); in TEST_IMPL()
4340 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
4351 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
4392 &open_req1, in TEST_IMPL()
4398 ASSERT_GE(open_req1.result, 0); in TEST_IMPL()
4399 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
4401 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
4463 &open_req1, in TEST_IMPL()
4469 ASSERT_GE(open_req1.result, 0); in TEST_IMPL()
4470 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
4471 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()
4488 r = uv_fs_open(NULL, &open_req1, "test_file_icacls", UV_FS_O_RDONLY, 0, in TEST_IMPL()
4493 uv_fs_req_cleanup(&open_req1); in TEST_IMPL()
4494 r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); in TEST_IMPL()