Lines Matching refs:fd

25     int fd;
36 static int inotify_add_watch_test(int fd, uint32_t mask)
39 return inotify_add_watch(fd, "/data", mask);
42 static int inotify_rm_watch_test(int fd, int wd)
45 return inotify_rm_watch(fd, wd);
50 int fd = inotify_init_test();
51 EXPECT_NE(msg, fd, ERREXPECT);
52 if (fd == -1) {
57 struct inotify_test data[TEST_DATA_COUNT] = {{.fd = fd, .wd = -1, .mask = IN_ACCESS},
58 {.fd = fd, .wd = -1, .mask = IN_MODIFY},
59 {.fd = fd, .wd = -1, .mask = IN_ATTRIB},
60 {.fd = fd, .wd = -1, .mask = IN_CLOSE_WRITE},
61 {.fd = fd, .wd = -1, .mask = IN_CLOSE_NOWRITE},
62 {.fd = fd, .wd = -1, .mask = IN_OPEN},
63 {.fd = fd, .wd = -1, .mask = IN_MOVED_FROM},
64 {.fd = fd, .wd = -1, .mask = IN_MOVED_TO},
65 {.fd = fd, .wd = -1, .mask = IN_CREATE},
66 {.fd = fd, .wd = -1, .mask = IN_DELETE}};
69 data[i].wd = inotify_add_watch_test(fd, data[i].mask);
76 int ret = inotify_rm_watch_test(fd, data[i].wd);
82 close(fd);
92 int fd = inotify_init_test();
93 EXPECT_NE("inotify_init_0100", fd, ERREXPECT);
95 close(fd);
110 * @tc.desc : Using the wrong fd, add some monitoring events to the inotify instance
116 struct inotify_test data[TEST_DATA_COUNT] = {{.fd = -1, .wd = -1, .mask = IN_ACCESS},
117 {.fd = -1, .wd = -1, .mask = IN_MODIFY},
118 {.fd = -1, .wd = -1, .mask = IN_ATTRIB},
119 {.fd = -1, .wd = -1, .mask = IN_CLOSE_WRITE},
120 {.fd = -1, .wd = -1, .mask = IN_CLOSE_NOWRITE},
121 {.fd = -1, .wd = -1, .mask = IN_OPEN},
122 {.fd = -1, .wd = -1, .mask = IN_MOVED_FROM},
123 {.fd = -1, .wd = -1, .mask = IN_MOVED_TO},
124 {.fd = -1, .wd = -1, .mask = IN_CREATE},
125 {.fd = -1, .wd = -1, .mask = IN_DELETE}};
128 data[i].wd = inotify_add_watch_test(data[i].fd, data[i].mask);
150 int fd = inotify_init_test();
151 if (fd == -1) {
155 int ret = inotify_rm_watch(fd, -1);
157 close(fd);