Searched refs:ATF_REQUIRE_ERRNO (Results 1 - 25 of 83) sorted by relevance

1234

/freebsd-current/contrib/netbsd-tests/fs/vfs/
H A Dt_ro.c82 ATF_REQUIRE_ERRNO(EROFS, rump_sys_open(AFILE, O_CREAT|O_RDONLY) == -1);
91 ATF_REQUIRE_ERRNO(EROFS, rump_sys_unlink(AFILE) == -1);
114 ATF_REQUIRE_ERRNO(expected, rump_sys_open(AFILE, O_WRONLY) == -1);
115 ATF_REQUIRE_ERRNO(expected, rump_sys_open(AFILE, O_RDWR) == -1);
130 ATF_REQUIRE_ERRNO(EROFS, rump_sys_chmod(AFILE, 0775) == -1);
132 ATF_REQUIRE_ERRNO(EROFS, rump_sys_chown(AFILE, 1, 1) == -1);
133 ATF_REQUIRE_ERRNO(EROFS, rump_sys_utimes(AFILE, sometvs) == -1);
136 ATF_REQUIRE_ERRNO(EROFS, rump_sys_fchmod(fd, 0775) == -1);
138 ATF_REQUIRE_ERRNO(EROFS, rump_sys_fchown(fd, 1, 1) == -1);
139 ATF_REQUIRE_ERRNO(EROF
[all...]
H A Dt_union.c137 ATF_REQUIRE_ERRNO(ENOENT, rump_sys_stat(TFILE, &sb) == -1);
180 ATF_REQUIRE_ERRNO(ENOTEMPTY, rump_sys_rmdir(TDIR) == -1);
183 ATF_REQUIRE_ERRNO(ENOENT, rump_sys_stat(TDFILE, &sb) == -1);
184 ATF_REQUIRE_ERRNO(ENOENT, rump_sys_stat(TDIR, &sb) == -1);
188 ATF_REQUIRE_ERRNO(ENOENT, rump_sys_stat(TDFILE, &sb) == -1);
/freebsd-current/tests/sys/file/
H A Dpath_test.c119 ATF_REQUIRE_ERRNO(EBADF, fchmod(pathfd, 0666) == -1);
120 ATF_REQUIRE_ERRNO(EBADF, fchown(pathfd, getuid(), getgid()) == -1);
121 ATF_REQUIRE_ERRNO(EBADF, fchflags(pathfd, UF_NODUMP) == -1);
123 ATF_REQUIRE_ERRNO(EBADF, futimes(pathfd, tv) == -1);
125 ATF_REQUIRE_ERRNO(EBADF, futimens(pathfd, ts) == -1);
154 ATF_REQUIRE_ERRNO(EBADF, aio_read(&aio) == -1);
155 ATF_REQUIRE_ERRNO(EBADF, aio_write(&aio) == -1);
156 ATF_REQUIRE_ERRNO(EBADF, aio_fsync(O_SYNC, &aio) == -1);
157 ATF_REQUIRE_ERRNO(EBADF, aio_fsync(O_DSYNC, &aio) == -1);
250 ATF_REQUIRE_ERRNO(ENOTCAPABL
[all...]
/freebsd-current/contrib/netbsd-tests/lib/libc/sys/
H A Dt_unlink.c66 ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1);
89 ATF_REQUIRE_ERRNO(EISDIR, unlink("/") == -1);
91 ATF_REQUIRE_ERRNO(EBUSY, unlink("/") == -1);
95 ATF_REQUIRE_ERRNO(ENAMETOOLONG, unlink(buf) == -1);
98 ATF_REQUIRE_ERRNO(ENOENT, unlink("/a/b/c/d/e/f/g/h/i/j/k/l/m") == -1);
119 ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1);
145 ATF_REQUIRE_ERRNO(EACCES, unlink("/root/.profile") == -1);
H A Dt_truncate.c99 ATF_REQUIRE_ERRNO(EBADF, ftruncate(-1, 999) == -1);
102 ATF_REQUIRE_ERRNO(EINVAL, ftruncate(fd, 999) == -1);
156 ATF_REQUIRE_ERRNO(EFAULT, truncate((void *)-1, 999) == -1);
159 ATF_REQUIRE_ERRNO(EISDIR, truncate("/etc", 999) == -1);
162 ATF_REQUIRE_ERRNO(ENOENT, truncate("/a/b/c/d/e/f/g", 999) == -1);
167 ATF_REQUIRE_ERRNO(EACCES, truncate(buf, 999) == -1);
H A Dt_link.c124 ATF_REQUIRE_ERRNO(EEXIST, link(path, pathl) == -1);
127 ATF_REQUIRE_ERRNO(ENAMETOOLONG, link(buf, "xxx") == -1);
130 ATF_REQUIRE_ERRNO(ENOENT, link(path, "/d/c/b/a") == -1);
133 ATF_REQUIRE_ERRNO(ENOENT, link("/a/b/c/d", path) == -1);
136 ATF_REQUIRE_ERRNO(ENOENT, link("/a/b/c/d", "/d/c/b/a") == -1);
139 ATF_REQUIRE_ERRNO(EFAULT, link(path, (const char *)-1) == -1);
142 ATF_REQUIRE_ERRNO(EFAULT, link((const char *)-1, "xxx") == -1);
173 ATF_REQUIRE_ERRNO(EACCES,
H A Dt_mkfifo.c131 ATF_REQUIRE_ERRNO(EFAULT, mkfifo((char *)-1, 0600) == -1);
134 ATF_REQUIRE_ERRNO(EEXIST, mkfifo("/etc/passwd", 0600) == -1);
137 ATF_REQUIRE_ERRNO(EEXIST, mkfifo(path, 0600) == -1);
140 ATF_REQUIRE_ERRNO(ENAMETOOLONG, mkfifo(buf, 0600) == -1);
143 ATF_REQUIRE_ERRNO(ENOENT, mkfifo("/a/b/c/d/e/f/g", 0600) == -1);
190 ATF_REQUIRE_ERRNO(ENXIO, open(path, O_WRONLY | O_NONBLOCK) == -1);
220 ATF_REQUIRE_ERRNO(EACCES, mkfifo("/root/fifo", 0600) == -1);
228 ATF_REQUIRE_ERRNO(EFTYPE, chmod(path, 1777) == -1);
H A Dt_mknod.c68 ATF_REQUIRE_ERRNO(EINVAL, mknod(path, S_IFCHR, -1) == -1);
72 ATF_REQUIRE_ERRNO(ENAMETOOLONG, mknod(buf, S_IFCHR, 0) == -1);
75 ATF_REQUIRE_ERRNO(EFAULT, mknod((char *)-1, S_IFCHR, 0) == -1);
78 ATF_REQUIRE_ERRNO(ENOENT, mknod("/a/b/c/d/e/f/g", S_IFCHR, 0) == -1);
104 ATF_REQUIRE_ERRNO(EEXIST,
111 ATF_REQUIRE_ERRNO(EEXIST, mknod(path, S_IFCHR, 0) == -1);
132 ATF_REQUIRE_ERRNO(EPERM, mknod(path, S_IFCHR, 0) == -1);
135 ATF_REQUIRE_ERRNO(EPERM, mknod(path, S_IFBLK, 0) == -1);
H A Dt_mlock.c121 ATF_REQUIRE_ERRNO(ENOMEM, mlock(NULL, page) == -1);
125 ATF_REQUIRE_ERRNO(ENOMEM, mlock((char *)0, page) == -1);
128 ATF_REQUIRE_ERRNO(ENOMEM, munlock(NULL, page) == -1);
131 ATF_REQUIRE_ERRNO(ENOMEM, munlock((char *)0, page) == -1);
136 ATF_REQUIRE_ERRNO(EINVAL, mlock((char *)-1, page) == -1);
138 ATF_REQUIRE_ERRNO(EINVAL, munlock((char *)-1, page) == -1);
141 ATF_REQUIRE_ERRNO(ENOMEM, mlock((char *)-1, page) == -1);
143 ATF_REQUIRE_ERRNO(ENOMEM, munlock((char *)-1, page) == -1);
151 ATF_REQUIRE_ERRNO(EINVAL, mlock(buf, -page) == -1);
153 ATF_REQUIRE_ERRNO(EINVA
[all...]
H A Dt_dup.c148 ATF_REQUIRE_ERRNO(EBADF, dup2(-1, -1) == -1);
151 ATF_REQUIRE_ERRNO(EBADF, dup2(fd, -1) == -1);
154 ATF_REQUIRE_ERRNO(EBADF, dup2(-1, fd) == -1);
178 ATF_REQUIRE_ERRNO(EBADF, dup2(STDERR_FILENO, res.rlim_cur + 1) == -1);
226 ATF_REQUIRE_ERRNO(EINVAL, dup3(-1, -1, O_CLOEXEC) == -1);
227 ATF_REQUIRE_ERRNO(EBADF, dup3(fd, -1, O_CLOEXEC) == -1);
229 ATF_REQUIRE_ERRNO(EBADF, dup3(-1, -1, O_CLOEXEC) == -1);
233 ATF_REQUIRE_ERRNO(EBADF, dup3(fd, -1, O_CLOEXEC) == -1);
236 ATF_REQUIRE_ERRNO(EBADF, dup3(-1, fd, O_CLOEXEC) == -1);
239 ATF_REQUIRE_ERRNO(EINVA
[all...]
H A Dt_mkdir.c70 ATF_REQUIRE_ERRNO(EEXIST, mkdir("/etc", 0500) == -1);
74 ATF_REQUIRE_ERRNO(EFAULT, mkdir((void *)-1, 0500) == -1);
77 ATF_REQUIRE_ERRNO(ENAMETOOLONG, mkdir(buf, 0500) == -1);
80 ATF_REQUIRE_ERRNO(ENOENT, mkdir("/a/b/c/d/e/f/g/h/i/j/k", 0500) == -1);
93 ATF_REQUIRE_ERRNO(EACCES, mkdir("/usr/__nonexistent__", 0500) == -1);
H A Dt_wait_noproc.c54 ATF_REQUIRE_ERRNO(ECHILD, wait(NULL) == -1);
68 ATF_REQUIRE_ERRNO(ECHILD, waitpid(WAIT_ANY, NULL, TWAIT_OPTION) == -1);
81 ATF_REQUIRE_ERRNO(ECHILD,
95 ATF_REQUIRE_ERRNO(ECHILD, wait3(NULL, TWAIT_OPTION, NULL) == -1);
108 ATF_REQUIRE_ERRNO(ECHILD,
122 ATF_REQUIRE_ERRNO(ECHILD,
234 ATF_REQUIRE_ERRNO(ECHILD,
256 ATF_REQUIRE_ERRNO(ECHILD,
276 ATF_REQUIRE_ERRNO(ECHILD,
297 ATF_REQUIRE_ERRNO(ECHIL
[all...]
H A Dt_clone.c105 ATF_REQUIRE_ERRNO(errno, allocstack != MAP_FAILED);
121 ATF_REQUIRE_ERRNO(errno, sigprocmask(SIG_BLOCK, &mask, NULL) != -1);
161 ATF_REQUIRE_ERRNO(errno, munmap(allocstack, STACKSIZE) != -1);
198 ATF_REQUIRE_ERRNO(errno, allocstack != MAP_FAILED);
211 ATF_REQUIRE_ERRNO(errno, munmap(allocstack, STACKSIZE) != -1);
228 ATF_REQUIRE_ERRNO(errno, getrlimit(RLIMIT_NPROC, &rl) != -1);
233 ATF_REQUIRE_ERRNO(errno, setrlimit(RLIMIT_NPROC, &rl) != -1);
H A Dt_getitimer.c103 ATF_REQUIRE_ERRNO(EINVAL, getitimer(-1, &it) == -1);
106 ATF_REQUIRE_ERRNO(EINVAL, getitimer(INT_MAX, &it) == -1);
109 ATF_REQUIRE_ERRNO(EFAULT, getitimer(ITIMER_REAL, (void *)-1) == -1);
158 ATF_REQUIRE_ERRNO(EINVAL, setitimer(-1, &it, &ot) == -1);
161 ATF_REQUIRE_ERRNO(EINVAL, setitimer(INT_MAX, &it, &ot) == -1);
164 ATF_REQUIRE_ERRNO(EFAULT, setitimer(ITIMER_REAL,(void*)-1, &ot) == -1);
H A Dt_stat.c169 ATF_REQUIRE_ERRNO(EBADF, fstat(-1, &st) == -1);
172 ATF_REQUIRE_ERRNO(ENAMETOOLONG, stat(buf, &st) == -1);
175 ATF_REQUIRE_ERRNO(ENAMETOOLONG, lstat(buf, &st) == -1);
178 ATF_REQUIRE_ERRNO(EFAULT, stat((void *)-1, &st) == -1);
181 ATF_REQUIRE_ERRNO(EFAULT, lstat((void *)-1, &st) == -1);
184 ATF_REQUIRE_ERRNO(EFAULT, stat("/etc/passwd", (void *)-1) == -1);
187 ATF_REQUIRE_ERRNO(EFAULT, lstat("/etc/passwd", (void *)-1) == -1);
190 ATF_REQUIRE_ERRNO(ENOENT, stat("/a/b/c/d/e/f/g/h/i/j/k", &st) == -1);
193 ATF_REQUIRE_ERRNO(ENOENT, lstat("/a/b/c/d/e/f/g/h/i/j/k", &st) == -1);
/freebsd-current/lib/libkvm/tests/
H A Dkvm_close_test.c45 ATF_REQUIRE_ERRNO(EINVAL, kvm_close(NULL) == -1);
/freebsd-current/tests/sys/vfs/
H A Dlookup_cap_dotdot.c169 ATF_REQUIRE_ERRNO(ENOENT,
171 ATF_REQUIRE_ERRNO(ENOENT,
191 ATF_REQUIRE_ERRNO(ECAPMODE, open("testdir", O_RDONLY) < 0);
194 ATF_REQUIRE_ERRNO(ECAPMODE, openat(AT_FDCWD, "d1/f1", O_RDONLY) < 0);
197 ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0);
199 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
203 ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, abspath, O_RDONLY) < 0);
206 ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "lup/f1", O_RDONLY) < 0);
228 ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0);
229 ATF_REQUIRE_ERRNO(ENOTCAPABL
[all...]
/freebsd-current/lib/libcasper/services/cap_dns/tests/
H A Ddns_test.c405 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
407 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
433 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
436 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
464 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
467 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
497 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
500 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
528 ATF_REQUIRE_ERRNO(ENOTCAPABLE,
531 ATF_REQUIRE_ERRNO(ENOTCAPABL
[all...]
/freebsd-current/contrib/netbsd-tests/lib/librt/
H A Dt_sem.c258 ATF_REQUIRE_ERRNO(ETIMEDOUT, sem_timedwait(&sem, &ts));
260 ATF_REQUIRE_ERRNO(ETIMEDOUT, sem_timedwait(&sem, &ts));
266 ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts));
268 ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts));
274 ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts));
276 ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts));
291 ATF_REQUIRE_ERRNO(EINTR, sem_timedwait(&sem, &ts));
317 ATF_REQUIRE_ERRNO(ETIMEDOUT,
340 ATF_REQUIRE_ERRNO(ETIMEDOUT,
371 ATF_REQUIRE_ERRNO(EINT
[all...]
/freebsd-current/contrib/atf/atf-c++/
H A Dmacros_hpp_test.cpp90 // Check that ATF_REQUIRE_ERRNO does not contain a semicolon that would
92 ATF_REQUIRE_ERRNO(1, 1 == 1);
93 ATF_REQUIRE_ERRNO(2, 2 == 2);
/freebsd-current/contrib/atf/atf-c/
H A Dmacros_h_test.c71 /* Check that ATF_REQUIRE_ERRNO does not contain a semicolon that would
73 ATF_REQUIRE_ERRNO(1, 1 == 1);
74 ATF_REQUIRE_ERRNO(2, 2 == 2);
/freebsd-current/contrib/netbsd-tests/kernel/
H A Dt_ptrace.c79 ATF_REQUIRE_ERRNO(EPERM, ptrace(PT_ATTACH, 0, NULL, 0) == -1);
93 ATF_REQUIRE_ERRNO(EPERM, ptrace(PT_ATTACH, 1, NULL, 0) == -1);
118 ATF_REQUIRE_ERRNO(EPERM, ptrace(PT_ATTACH, 1, NULL, 0) == -1);
130 ATF_REQUIRE_ERRNO(EINVAL, ptrace(PT_ATTACH, getpid(), NULL, 0) == -1);
171 ATF_REQUIRE_ERRNO(EPERM,
/freebsd-current/sbin/pfctl/tests/
H A Dpfctl_test.c100 ATF_REQUIRE_ERRNO(0, count == 0 && "Should have reached EOF");
115 ATF_REQUIRE_ERRNO(0, fd > 0);
117 ATF_REQUIRE_ERRNO(0, close(fd) == 0);
139 ATF_REQUIRE_ERRNO(0, chdir(input_files_path) == 0);
141 ATF_REQUIRE_ERRNO(0, pipe(pipefds) == 0);
/freebsd-current/contrib/netbsd-tests/lib/libc/stdio/
H A Dt_fopen.c92 ATF_REQUIRE_ERRNO(EINVAL, fdopen(fd, "w") == NULL);
95 ATF_REQUIRE_ERRNO(EINVAL, fdopen(fd, "a") == NULL);
100 ATF_REQUIRE_ERRNO(EBADF, fdopen(fd, "r") == NULL);
103 ATF_REQUIRE_ERRNO(EBADF, fdopen(-1, "w+") == NULL);
191 ATF_REQUIRE_ERRNO(EISDIR, fopen("/usr/bin", "w") == NULL);
194 ATF_REQUIRE_ERRNO(ENOENT, fopen("/a/b/c/d/e/f", "r") == NULL);
197 ATF_REQUIRE_ERRNO(ENAMETOOLONG, fopen(buf, "r+") == NULL);
300 ATF_REQUIRE_ERRNO(EACCES, fopen("/bin/ls", "a+") == NULL);
303 ATF_REQUIRE_ERRNO(EACCES, fopen("/bin/ls", "w+") == NULL);
H A Dt_fflush.c70 ATF_REQUIRE_ERRNO(EBADF, fflush(f) == EOF);
75 ATF_REQUIRE_ERRNO(EBADF, fflush(f) == EOF);
157 ATF_REQUIRE_ERRNO(EBADF, fpurge(f) == EOF);

Completed in 167 milliseconds

1234