Lines Matching refs:r

61   int r;  in create_dir()  local
63 r = uv_fs_mkdir(NULL, &req, name, 0755, NULL); in create_dir()
64 ASSERT(r == 0 || r == UV_EEXIST); in create_dir()
69 int r; in create_file() local
73 r = uv_fs_open(NULL, &req, name, UV_FS_O_WRONLY | UV_FS_O_CREAT, in create_file()
76 ASSERT_GE(r, 0); in create_file()
77 file = r; in create_file()
79 r = uv_fs_close(NULL, &req, file, NULL); in create_file()
80 ASSERT_OK(r); in create_file()
85 int r; in delete_dir() local
87 r = uv_fs_rmdir(NULL, &req, name, NULL); in delete_dir()
89 return r; in delete_dir()
93 int r; in delete_file() local
95 r = uv_fs_unlink(NULL, &req, name, NULL); in delete_file()
97 return r; in delete_file()
101 int r; in touch_file() local
106 r = uv_fs_open(NULL, &req, name, UV_FS_O_RDWR, 0, NULL); in touch_file()
107 ASSERT_GE(r, 0); in touch_file()
108 file = r; in touch_file()
112 r = uv_fs_write(NULL, &req, file, &buf, 1, -1, NULL); in touch_file()
113 ASSERT_GE(r, 0); in touch_file()
116 r = uv_fs_close(NULL, &req, file, NULL); in touch_file()
117 ASSERT_OK(r); in touch_file()
185 int r; in fs_event_del_dir() local
187 r = delete_dir("watch_del_dir"); in fs_event_del_dir()
188 ASSERT_OK(r); in fs_event_del_dir()
194 int r; in fs_event_unlink_files() local
201 r = delete_file(fs_event_get_filename(i)); in fs_event_unlink_files()
203 ASSERT_OK(r); in fs_event_unlink_files()
271 int r; in fs_event_unlink_files_in_subdir() local
278 r = delete_file(fs_event_get_filename_in_subdir(i)); in fs_event_unlink_files_in_subdir()
280 ASSERT_OK(r); in fs_event_unlink_files_in_subdir()
398 int r; in timer_cb_exact() local
404 r = uv_fs_event_stop(&fs_event); in timer_cb_exact()
405 ASSERT_OK(r); in timer_cb_exact()
444 int r; in TEST_IMPL() local
453 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
454 ASSERT_OK(r); in TEST_IMPL()
455 r = uv_fs_event_start(&fs_event, fs_event_cb_dir_multi_file, "watch_dir", 0); in TEST_IMPL()
456 ASSERT_OK(r); in TEST_IMPL()
457 r = uv_timer_init(loop, &timer); in TEST_IMPL()
458 ASSERT_OK(r); in TEST_IMPL()
459 r = uv_timer_start(&timer, fs_event_create_files, 100, 0); in TEST_IMPL()
460 ASSERT_OK(r); in TEST_IMPL()
487 int r; in TEST_IMPL() local
494 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
495 ASSERT_OK(r); in TEST_IMPL()
496 r = uv_fs_event_start(&fs_event, fs_event_cb_del_dir, "watch_del_dir", 0); in TEST_IMPL()
497 ASSERT_OK(r); in TEST_IMPL()
498 r = uv_timer_init(loop, &timer); in TEST_IMPL()
499 ASSERT_OK(r); in TEST_IMPL()
500 r = uv_timer_start(&timer, fs_event_del_dir, 100, 0); in TEST_IMPL()
501 ASSERT_OK(r); in TEST_IMPL()
521 int r; in TEST_IMPL()
534 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
535 ASSERT_OK(r); in TEST_IMPL()
536 r = uv_fs_event_start(&fs_event, in TEST_IMPL()
540 ASSERT_OK(r); in TEST_IMPL()
541 r = uv_timer_init(loop, &timer); in TEST_IMPL()
542 ASSERT_OK(r); in TEST_IMPL()
543 r = uv_timer_start(&timer, fs_event_create_files_in_subdir, 100, 0); in TEST_IMPL()
544 ASSERT_OK(r); in TEST_IMPL()
549 r = uv_fs_event_init(loop, &fs_event_root); in TEST_IMPL()
550 ASSERT_OK(r); in TEST_IMPL()
551 r = uv_fs_event_start(&fs_event_root, in TEST_IMPL()
555 ASSERT_OK(r); in TEST_IMPL()
587 int r; in TEST_IMPL() local
602 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
603 ASSERT_OK(r); in TEST_IMPL()
604 r = uv_fs_event_start(&fs_event, fs_event_cb_dir, "watch_~1", 0); in TEST_IMPL()
605 ASSERT_OK(r); in TEST_IMPL()
606 r = uv_timer_init(loop, &timer); in TEST_IMPL()
607 ASSERT_OK(r); in TEST_IMPL()
608 r = uv_timer_start(&timer, timer_cb_file, 100, 0); in TEST_IMPL()
609 ASSERT_OK(r); in TEST_IMPL()
638 int r; in TEST_IMPL() local
648 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
649 ASSERT_OK(r); in TEST_IMPL()
650 r = uv_fs_event_start(&fs_event, fs_event_cb_file, "watch_dir/file2", 0); in TEST_IMPL()
651 ASSERT_OK(r); in TEST_IMPL()
652 r = uv_timer_init(loop, &timer); in TEST_IMPL()
653 ASSERT_OK(r); in TEST_IMPL()
654 r = uv_timer_start(&timer, timer_cb_file, 100, 100); in TEST_IMPL()
655 ASSERT_OK(r); in TEST_IMPL()
683 int r; in TEST_IMPL() local
704 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
705 ASSERT_OK(r); in TEST_IMPL()
706 r = uv_fs_event_start(&fs_event, fs_event_fail, "watch_dir/file.jsx", 0); in TEST_IMPL()
707 ASSERT_OK(r); in TEST_IMPL()
708 r = uv_timer_init(loop, &timer); in TEST_IMPL()
709 ASSERT_OK(r); in TEST_IMPL()
710 r = uv_timer_start(&timer, timer_cb_exact, 100, 100); in TEST_IMPL()
711 ASSERT_OK(r); in TEST_IMPL()
712 r = uv_run(loop, UV_RUN_DEFAULT); in TEST_IMPL()
713 ASSERT_OK(r); in TEST_IMPL()
755 int r; in TEST_IMPL() local
770 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
771 ASSERT_OK(r); in TEST_IMPL()
772 r = uv_fs_event_start(&fs_event, in TEST_IMPL()
776 ASSERT_OK(r); in TEST_IMPL()
779 r = uv_timer_init(loop, &timer); in TEST_IMPL()
780 ASSERT_OK(r); in TEST_IMPL()
783 r = uv_timer_start(&timer, timer_cb_touch, 1100, 0); in TEST_IMPL()
784 ASSERT_OK(r); in TEST_IMPL()
807 int r; in TEST_IMPL() local
817 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
818 ASSERT_OK(r); in TEST_IMPL()
819 r = uv_fs_event_start(&fs_event, fail_cb, path, 0); in TEST_IMPL()
820 if (r == UV_ENOENT) in TEST_IMPL()
822 ASSERT_OK(r); in TEST_IMPL()
837 int r; in TEST_IMPL() local
845 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
846 ASSERT_OK(r); in TEST_IMPL()
847 r = uv_fs_event_start(&fs_event, in TEST_IMPL()
851 ASSERT_OK(r); in TEST_IMPL()
875 int r; in TEST_IMPL() local
883 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
884 ASSERT_OK(r); in TEST_IMPL()
885 r = uv_fs_event_start(&fs_event, in TEST_IMPL()
889 ASSERT_OK(r); in TEST_IMPL()
908 int r; in timer_cb() local
910 r = uv_fs_event_init(handle->loop, &fs_event); in timer_cb()
911 ASSERT_OK(r); in timer_cb()
912 r = uv_fs_event_start(&fs_event, fs_event_fail, ".", 0); in timer_cb()
913 ASSERT_OK(r); in timer_cb()
926 int r; in TEST_IMPL() local
930 r = uv_timer_init(loop, &timer); in TEST_IMPL()
931 ASSERT_OK(r); in TEST_IMPL()
933 r = uv_timer_start(&timer, timer_cb, 1, 0); in TEST_IMPL()
934 ASSERT_OK(r); in TEST_IMPL()
950 int r; in TEST_IMPL() local
957 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
958 ASSERT_OK(r); in TEST_IMPL()
959 r = uv_fs_event_start(&fs_event, fs_event_fail, "watch_dir", 0); in TEST_IMPL()
960 ASSERT_OK(r); in TEST_IMPL()
984 int r; in TEST_IMPL() local
991 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
992 ASSERT_OK(r); in TEST_IMPL()
993 r = uv_fs_event_start(&fs_event, fs_event_fail, "watch_dir/file", 0); in TEST_IMPL()
994 ASSERT_OK(r); in TEST_IMPL()
1026 int r; in TEST_IMPL() local
1033 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
1034 ASSERT_OK(r); in TEST_IMPL()
1035 r = uv_fs_event_start(&fs_event, fs_event_cb_close, "watch_dir", 0); in TEST_IMPL()
1036 ASSERT_OK(r); in TEST_IMPL()
1038 r = uv_timer_init(loop, &timer); in TEST_IMPL()
1039 ASSERT_OK(r); in TEST_IMPL()
1040 r = uv_timer_start(&timer, fs_event_create_files, 100, 0); in TEST_IMPL()
1041 ASSERT_OK(r); in TEST_IMPL()
1067 int r; in TEST_IMPL() local
1073 r = uv_fs_event_init(loop, &fs_event1); in TEST_IMPL()
1074 ASSERT_OK(r); in TEST_IMPL()
1075 r = uv_fs_event_start(&fs_event1, fs_event_cb_dir, "watch_dir", 0); in TEST_IMPL()
1076 ASSERT_OK(r); in TEST_IMPL()
1078 r = uv_fs_event_init(loop, &fs_event2); in TEST_IMPL()
1079 ASSERT_OK(r); in TEST_IMPL()
1080 r = uv_fs_event_start(&fs_event2, fs_event_cb_dir, "watch_dir", 0); in TEST_IMPL()
1081 ASSERT_OK(r); in TEST_IMPL()
1101 int r; in TEST_IMPL() local
1117 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
1118 ASSERT_OK(r); in TEST_IMPL()
1120 r = uv_fs_event_getpath(&fs_event, buf, &len); in TEST_IMPL()
1121 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
1122 r = uv_fs_event_start(&fs_event, fail_cb, watch_dir[i], 0); in TEST_IMPL()
1123 ASSERT_OK(r); in TEST_IMPL()
1125 r = uv_fs_event_getpath(&fs_event, buf, &len); in TEST_IMPL()
1126 ASSERT_EQ(r, UV_ENOBUFS); in TEST_IMPL()
1129 r = uv_fs_event_getpath(&fs_event, buf, &len); in TEST_IMPL()
1130 ASSERT_OK(r); in TEST_IMPL()
1133 r = uv_fs_event_stop(&fs_event); in TEST_IMPL()
1134 ASSERT_OK(r); in TEST_IMPL()
1154 int r; in TEST_IMPL() local
1157 r = uv_fs_event_init(loop, &fs_event); in TEST_IMPL()
1158 ASSERT_OK(r); in TEST_IMPL()
1159 r = uv_fs_event_start(&fs_event, fs_event_cb_file, "<:;", 0); in TEST_IMPL()
1160 ASSERT(r); in TEST_IMPL()
1162 r = uv_fs_event_start(&fs_event, fs_event_cb_file, "", 0); in TEST_IMPL()
1163 ASSERT(r); in TEST_IMPL()