HomeSort by relevance Sort by last modified time
    Searched refs:fd_notify (Results 1 - 11 of 11) sorted by null

  /external/ltp/testcases/kernel/syscalls/inotify/
inotify04.c 78 int fd_notify, reap_wd_file, reap_wd_dir, wd_dir, wd_file; variable
88 if (reap_wd_dir && myinotify_rm_watch(fd_notify, wd_dir) == -1)
90 "inotify_rm_watch(%d, %d) [1] failed", fd_notify,
93 if (reap_wd_file && myinotify_rm_watch(fd_notify, wd_file) == -1)
95 "inotify_rm_watch(%d, %d) [2] failed", fd_notify,
98 if (fd_notify > 0 && close(fd_notify))
99 tst_resm(TWARN, "close(%d) [1] failed", fd_notify);
119 fd_notify = myinotify_init();
120 if (fd_notify == -1)
    [all...]
inotify03.c 65 static int fd, fd_notify; variable
113 len = read(fd_notify, event_buf, EVENT_BUF_LEN);
116 "read(%d, buf, %zu) failed", fd_notify, EVENT_BUF_LEN);
152 ret = myinotify_rm_watch(fd_notify, wd);
156 fd_notify, wd);
159 fd_notify, wd);
215 fd_notify = myinotify_init();
217 if (fd_notify < 0) {
226 wd = myinotify_add_watch(fd_notify, fname, IN_ALL_EVENTS);
230 fd_notify, fname)
    [all...]
inotify05.c 58 static int fd, fd_notify; variable
93 len = read(fd_notify, event_buf, EVENT_BUF_LEN);
97 fd_notify, EVENT_BUF_LEN);
169 fd_notify = syscall(__NR_inotify_init1, O_NONBLOCK);
170 if (fd_notify < 0) {
180 wd = myinotify_add_watch(fd_notify, fname, IN_ALL_EVENTS);
184 fd_notify, fname);
193 if (fd_notify > 0 && myinotify_rm_watch(fd_notify, wd) == -1) {
195 fd_notify, wd)
    [all...]
inotify01.c 62 static int fd, fd_notify; variable
140 if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) < 0) {
143 fd_notify, EVENT_BUF_LEN);
218 if ((fd_notify = myinotify_init()) < 0) {
228 if ((wd = myinotify_add_watch(fd_notify, fname, IN_ALL_EVENTS)) < 0) {
231 fd_notify, fname);
239 if (reap_wd && myinotify_rm_watch(fd_notify, wd) < 0) {
241 fd_notify, wd);
245 if (fd_notify > 0 && close(fd_notify))
    [all...]
inotify02.c 66 static int fd, fd_notify, reap_wd; variable
186 if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) == -1) {
189 fd_notify, EVENT_BUF_LEN);
290 if ((fd_notify = myinotify_init()) < 0) {
300 if ((wd = myinotify_add_watch(fd_notify, ".", IN_ALL_EVENTS)) < 0) {
303 fd_notify);
311 if (reap_wd && myinotify_rm_watch(fd_notify, wd) < 0) {
313 "inotify_rm_watch (%d, %d) failed,", fd_notify, wd);
317 if (fd_notify > 0 && close(fd_notify))
    [all...]
  /external/ltp/testcases/kernel/syscalls/fanotify/
fanotify01.c 61 static int fd, fd_notify; variable
80 if (fanotify_mark(fd_notify, FAN_MARK_ADD, FAN_ACCESS | FAN_MODIFY |
85 "failed", fd_notify, fname);
107 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf, EVENT_BUF_LEN);
125 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf + len,
134 if (fanotify_mark(fd_notify,
140 "AT_FDCWD, %s) failed", fd_notify, fname);
153 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf + len,
176 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf + len,
184 if (fanotify_mark(fd_notify,
    [all...]
fanotify05.c 56 static int fd, fd_notify; variable
83 len = read(fd_notify, &event, sizeof(event));
141 fd_notify = fanotify_init(FAN_CLASS_NOTIF | FAN_NONBLOCK, O_RDONLY);
142 if (fd_notify < 0) {
152 if (fanotify_mark(fd_notify, FAN_MARK_MOUNT | FAN_MARK_ADD, FAN_OPEN,
157 fd_notify);
163 if (fd_notify > 0 && close(fd_notify))
164 tst_resm(TWARN | TERRNO, "close(%d) failed", fd_notify);
fanotify03.c 64 static volatile int fd_notify; variable
99 close(fd_notify);
100 fd_notify = -1;
119 close(fd_notify);
172 fd_notify_backup = dup(fd_notify);
175 "dup(%d) failed", fd_notify);
196 while (test_num < TST_TOTAL && fd_notify != -1) {
201 ret = read(fd_notify, event_buf + len,
203 if (fd_notify == -1)
208 fd_notify, EVENT_BUF_LEN)
    [all...]
fanotify04.c 63 static int fd_notify; variable
85 if (fanotify_mark(fd_notify, FAN_MARK_ADD | flag, FAN_OPEN, AT_FDCWD,
89 "'%s') %s", fd_notify, flagstr, file, expect_str_fail(expect));
93 "'%s') %s", fd_notify, flagstr, file, expect_str_pass(expect));
102 if (fanotify_mark(fd_notify, FAN_MARK_REMOVE | flag,
107 fd_notify, flagstr, file);
141 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf + len,
179 ret = read(fd_notify, event_buf + len, EVENT_BUF_LEN - len);
189 tst_resm(TFAIL | TERRNO, "read(%d, buf, %zu) failed", fd_notify,
225 if (fanotify_mark(fd_notify, FAN_MARK_ADD
    [all...]
fanotify02.c 61 static int fd, fd_notify; variable
80 if (fanotify_mark(fd_notify, FAN_MARK_ADD, FAN_ACCESS |
88 "failed", fd_notify);
110 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf,
129 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf + len,
136 if (fanotify_mark(fd_notify, FAN_MARK_REMOVE,
141 fd_notify);
162 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf + len,
234 if ((fd_notify = fanotify_init(FAN_CLASS_NOTIF, O_RDONLY)) < 0) {
247 if (fd_notify > 0 && close(fd_notify)
    [all...]
fanotify06.c 80 static int fd_notify[FANOTIFY_PRIORITIES][GROUPS_PER_PRIO]; variable
94 fd_notify[p][i] = fanotify_init(fanotify_prio[p] |
97 if (fd_notify[p][i] < 0) {
108 ret = fanotify_mark(fd_notify[p][i],
116 " '.') failed", fd_notify[p][i]);
121 ret = fanotify_mark(fd_notify[p][i],
132 fd_notify[p][i], fname);
144 if (fd_notify[p][i] && fd_notify[p][i] != -1) {
145 if (close(fd_notify[p][i]) == -1
    [all...]

Completed in 95 milliseconds