/netbsd-current/external/bsd/atf/dist/tools/ |
H A D | expand_test.cpp | 52 ATF_REQUIRE(!is_glob("")); 53 ATF_REQUIRE(!is_glob("a")); 54 ATF_REQUIRE(!is_glob("foo")); 56 ATF_REQUIRE( is_glob("*")); 57 ATF_REQUIRE( is_glob("a*")); 58 ATF_REQUIRE( is_glob("*a")); 59 ATF_REQUIRE( is_glob("a*b")); 61 ATF_REQUIRE( is_glob("?")); 62 ATF_REQUIRE( is_glob("a?")); 63 ATF_REQUIRE( is_glo [all...] |
H A D | fs_test.cpp | 112 ATF_REQUIRE( path("/").is_absolute()); 113 ATF_REQUIRE( path("////").is_absolute()); 114 ATF_REQUIRE( path("////a").is_absolute()); 115 ATF_REQUIRE( path("//a//").is_absolute()); 116 ATF_REQUIRE(!path("a////").is_absolute()); 117 ATF_REQUIRE(!path("../foo").is_absolute()); 129 ATF_REQUIRE( path("/").is_root()); 130 ATF_REQUIRE( path("////").is_root()); 131 ATF_REQUIRE(!path("////a").is_root()); 132 ATF_REQUIRE(!pat [all...] |
/netbsd-current/tests/lib/libprop/ |
H A D | t_proplib.c | 110 ATF_REQUIRE(dict != NULL); 114 ATF_REQUIRE(num != NULL); 122 ATF_REQUIRE(str != NULL); 134 ATF_REQUIRE(arr != NULL); 138 ATF_REQUIRE(dict_copy != NULL); 149 ATF_REQUIRE(val != NULL); 154 ATF_REQUIRE(val != NULL); 160 ATF_REQUIRE(ext1 != NULL); 168 ATF_REQUIRE(dict2 != NULL); 170 ATF_REQUIRE(ext [all...] |
/netbsd-current/tests/lib/libc/c063/ |
H A D | t_symlinkat.c | 64 ATF_REQUIRE(mkdir(ODIR, 0755) == 0); 65 ATF_REQUIRE(mkdir(NDIR, 0755) == 0); 66 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 67 ATF_REQUIRE(close(fd) != -1); 69 ATF_REQUIRE((dfd = open(NDIR, O_RDONLY, 0)) != -1); 70 ATF_REQUIRE(symlinkat(RELFILE, dfd, BASELINK) == 0); 71 ATF_REQUIRE(close(dfd) == 0); 73 ATF_REQUIRE(stat(FILE, &ost) == 0); 74 ATF_REQUIRE(stat(LINK, &nst) == 0); 75 ATF_REQUIRE(os [all...] |
H A D | t_o_search.c | 81 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 82 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 83 ATF_REQUIRE(close(fd) == 0); 85 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 87 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); 88 ATF_REQUIRE(close(fd) == 0); 90 ATF_REQUIRE(fchmod(dfd, 0644) == 0); 92 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1); 93 ATF_REQUIRE(errno == EACCES); 95 ATF_REQUIRE(clos [all...] |
H A D | t_linkat.c | 66 ATF_REQUIRE(mkdir(ODIR, 0755) == 0); 67 ATF_REQUIRE(mkdir(NDIR, 0755) == 0); 68 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 69 ATF_REQUIRE(close(fd) != -1); 71 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); 72 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); 73 ATF_REQUIRE(linkat(ofd, BASEFILE, nfd, BASETARGET, 0) == 0); 74 ATF_REQUIRE(close(ofd) == 0); 75 ATF_REQUIRE(close(nfd) == 0); 77 ATF_REQUIRE(sta [all...] |
H A D | t_fchmodat.c | 68 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 69 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 70 ATF_REQUIRE(close(fd) == 0); 72 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 73 ATF_REQUIRE(fchmodat(dfd, BASEFILE, 0600, 0) == 0); 74 ATF_REQUIRE(close(dfd) == 0); 76 ATF_REQUIRE(stat(FILE, &st) == 0); 91 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 92 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 93 ATF_REQUIRE(clos [all...] |
H A D | t_fstatat.c | 63 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 64 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 65 ATF_REQUIRE(close(fd) == 0); 67 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 68 ATF_REQUIRE(fstatat(dfd, BASEFILE, &st1, 0) == 0); 69 ATF_REQUIRE(close(dfd) == 0); 71 ATF_REQUIRE(stat(FILE, &st2) == 0); 72 ATF_REQUIRE(memcmp(&st1, &st2, sizeof(st1)) == 0); 86 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 87 ATF_REQUIRE((f [all...] |
H A D | t_renameat.c | 64 ATF_REQUIRE(mkdir(ODIR, 0755) == 0); 65 ATF_REQUIRE(mkdir(NDIR, 0755) == 0); 66 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 67 ATF_REQUIRE(close(fd) != -1); 69 ATF_REQUIRE(stat(FILE, &ost) == 0); 71 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); 72 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); 73 ATF_REQUIRE(renameat(ofd, BASEFILE, nfd, BASETARGET) == 0); 74 ATF_REQUIRE(close(ofd) == 0); 75 ATF_REQUIRE(clos [all...] |
H A D | t_fchownat.c | 83 ATF_REQUIRE(getuser(&uid, &gid) == 0); 84 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 85 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 86 ATF_REQUIRE(close(fd) == 0); 88 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 89 ATF_REQUIRE(fchownat(dfd, BASEFILE, uid, gid, 0) == 0); 90 ATF_REQUIRE(close(dfd) == 0); 92 ATF_REQUIRE(stat(FILE, &st) == 0); 93 ATF_REQUIRE(st.st_uid == uid); 94 ATF_REQUIRE(s [all...] |
H A D | t_unlinkat.c | 60 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 61 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 62 ATF_REQUIRE(close(fd) == 0); 64 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 65 ATF_REQUIRE(unlinkat(dfd, BASEFILE, 0) == 0); 66 ATF_REQUIRE(close(dfd) == 0); 79 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 80 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 81 ATF_REQUIRE(close(fd) == 0); 83 ATF_REQUIRE(chdi [all...] |
H A D | t_faccessat.c | 62 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 63 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 64 ATF_REQUIRE(close(fd) == 0); 66 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 67 ATF_REQUIRE(faccessat(dfd, BASEFILE, F_OK, 0) == 0); 68 ATF_REQUIRE(close(dfd) == 0); 81 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 82 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 83 ATF_REQUIRE(close(fd) == 0); 85 ATF_REQUIRE(chdi [all...] |
H A D | t_openat.c | 60 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 61 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 62 ATF_REQUIRE(close(fd) == 0); 64 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 65 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDONLY, 0)) != -1); 66 ATF_REQUIRE(close(dfd) == 0); 67 ATF_REQUIRE(close(fd) == 0); 80 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 81 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 82 ATF_REQUIRE(clos [all...] |
/netbsd-current/tests/lib/libc/sys/ |
H A D | t_eventfd.c | 67 ATF_REQUIRE(pthread_mutex_init(&ctx->mutex, NULL) == 0); 69 ATF_REQUIRE(pthread_condattr_init(&condattr) == 0); 70 ATF_REQUIRE(pthread_condattr_setclock(&condattr, CLOCK_MONOTONIC) == 0); 71 ATF_REQUIRE(pthread_cond_init(&ctx->cond, &condattr) == 0); 72 ATF_REQUIRE(pthread_condattr_destroy(&condattr) == 0); 74 ATF_REQUIRE(pthread_barrier_init(&ctx->barrier, NULL, 2) == 0); 107 ATF_REQUIRE(clock_gettime(CLOCK_MONOTONIC, &deadline) == 0); 140 ATF_REQUIRE(wait_barrier(ctx)); 143 ATF_REQUIRE(get_state(ctx) == 666); 144 ATF_REQUIRE(eventfd_rea [all...] |
H A D | t_wait.c | 60 ATF_REQUIRE(wait6(P_ALL, 0, &st, 0, &wru, &si) == -1 83 ATF_REQUIRE(pid > 0); 86 ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); 87 ATF_REQUIRE(WIFEXITED(st) && WEXITSTATUS(st) == 0x5a); 88 ATF_REQUIRE(si.si_status == 0x5a5a5a5a); 89 ATF_REQUIRE(si.si_pid == pid); 90 ATF_REQUIRE(si.si_uid == getuid()); 91 ATF_REQUIRE(si.si_code == CLD_EXITED); 117 ATF_REQUIRE(pid > 0); 120 ATF_REQUIRE(kil [all...] |
H A D | t_fsync.c | 62 ATF_REQUIRE(fsync(-i) == -1); 63 ATF_REQUIRE(errno == EBADF); 71 ATF_REQUIRE(pipe(fd) == 0); 75 ATF_REQUIRE(fsync(fd[0]) == -1); 76 ATF_REQUIRE(errno == EINVAL); 80 ATF_REQUIRE(fsync(fd[1]) == -1); 81 ATF_REQUIRE(errno == EINVAL); 83 ATF_REQUIRE(close(fd[0]) == 0); 84 ATF_REQUIRE(close(fd[1]) == 0); 104 ATF_REQUIRE(f [all...] |
H A D | t_socketpair.c | 54 ATF_REQUIRE(getpeername(fd, (struct sockaddr*)(void *)&addr, 64 ATF_REQUIRE(i != -1); 66 ATF_REQUIRE(closefrom(3) != -1); 68 ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0); 70 ATF_REQUIRE(fd[0] == 3); 71 ATF_REQUIRE(fd[1] == 4); 77 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); 78 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0); 80 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0); 81 ATF_REQUIRE((fcnt [all...] |
/netbsd-current/tests/kernel/kqueue/ |
H A D | t_vnode.c | 95 ATF_REQUIRE(init_target() != -1); 96 ATF_REQUIRE(init_kqueue() != -1); 98 ATF_REQUIRE(create_file(file_inside1) != -1); 99 ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, &ts) != -1); 118 ATF_REQUIRE(init_target() != -1); 119 ATF_REQUIRE(create_file(file_inside1) != -1); 120 ATF_REQUIRE(init_kqueue() != -1); 122 ATF_REQUIRE(unlink(file_inside1) != -1); 123 ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, &ts) != -1); 142 ATF_REQUIRE(init_targe [all...] |
/netbsd-current/external/bsd/kyua-testers/dist/ |
H A D | fs_test.c | 91 ATF_REQUIRE(dirp != NULL); 182 ATF_REQUIRE(pid != -1); 186 ATF_REQUIRE(waitpid(pid, &status, 0) != -1); 187 ATF_REQUIRE(WIFEXITED(status)); 199 ATF_REQUIRE(mkdir("test", 0755) != -1); 208 ATF_REQUIRE(lookup(".", "root", DT_REG)); 209 ATF_REQUIRE(!kyua_error_is_set(kyua_fs_cleanup("root"))); 210 ATF_REQUIRE(!lookup(".", "root", DT_REG)); 217 ATF_REQUIRE(mkdir("root", 0755) != -1); 218 ATF_REQUIRE(looku [all...] |
H A D | env_test.c | 40 ATF_REQUIRE(strcmp(getenv("PATH"), "new value") != 0); 42 ATF_REQUIRE(strcmp(getenv("PATH"), "new value") == 0); 49 ATF_REQUIRE(getenv("PATH") != NULL); 51 ATF_REQUIRE(getenv("PATH") == NULL);
|
/netbsd-current/tests/kernel/kqueue/read/ |
H A D | t_fifo.c | 57 ATF_REQUIRE(unlink(fifo_path) == 0); 83 ATF_REQUIRE(mkfifo(fifo_path, 0600) == 0); 84 ATF_REQUIRE((rfd = open(fifo_path, O_RDONLY | O_NONBLOCK)) >= 0); 85 ATF_REQUIRE((wfd = open(fifo_path, O_WRONLY | O_NONBLOCK)) >= 0); 86 ATF_REQUIRE((kq = kqueue()) >= 0); 90 ATF_REQUIRE(pipe_buf > 1); 93 ATF_REQUIRE(buf != NULL); 96 ATF_REQUIRE(kevent(kq, event, 1, NULL, 0, NULL) == 0); 99 ATF_REQUIRE(kevent(kq, NULL, 0, event, 1, &to) == 0); 102 ATF_REQUIRE(writ [all...] |
/netbsd-current/external/bsd/atf/dist/atf-c/detail/ |
H A D | env_test.c | 50 ATF_REQUIRE(atf_env_has("PATH")); 51 ATF_REQUIRE(!atf_env_has("_UNDEFINED_VARIABLE_")); 63 ATF_REQUIRE(atf_env_has("PATH")); 66 ATF_REQUIRE(strlen(val) > 0); 67 ATF_REQUIRE(strchr(val, ':') != NULL); 79 ATF_REQUIRE(atf_env_has("PATH")); 82 ATF_REQUIRE(strcmp(atf_env_get("PATH"), oldval) != 0); 83 ATF_REQUIRE(strcmp(atf_env_get("PATH"), "foo-bar") == 0); 86 ATF_REQUIRE(!atf_env_has("_UNDEFINED_VARIABLE_")); 88 ATF_REQUIRE(strcm [all...] |
/netbsd-current/tests/lib/libm/ |
H A D | t_infinity.c | 52 ATF_REQUIRE(isinf(v)); 53 ATF_REQUIRE(fpclassify(v) == FP_INFINITE); 57 ATF_REQUIRE(isinf(v)); 58 ATF_REQUIRE(fpclassify(v) == FP_INFINITE); 74 ATF_REQUIRE(isinf(v)); 75 ATF_REQUIRE(fpclassify(v) == FP_INFINITE); 79 ATF_REQUIRE(isinf(v)); 80 ATF_REQUIRE(fpclassify(v) == FP_INFINITE); 96 ATF_REQUIRE(isinf(v)); 97 ATF_REQUIRE(fpclassif [all...] |
/netbsd-current/external/bsd/kyua-cli/dist/utils/fs/ |
H A D | path_test.cpp | 90 ATF_REQUIRE(e.invalid_path().empty()); 98 ATF_REQUIRE( path("/").is_absolute()); 99 ATF_REQUIRE( path("////").is_absolute()); 100 ATF_REQUIRE( path("////a").is_absolute()); 101 ATF_REQUIRE( path("//a//").is_absolute()); 102 ATF_REQUIRE(!path("a////").is_absolute()); 103 ATF_REQUIRE(!path("../foo").is_absolute()); 110 ATF_REQUIRE( path("/").is_parent_of(path("/"))); 111 ATF_REQUIRE( path(".").is_parent_of(path("."))); 112 ATF_REQUIRE( pat [all...] |
/netbsd-current/tests/lib/libc/stdlib/ |
H A D | t_mktemp.c | 69 ATF_REQUIRE(mktemp(template) != NULL); 88 ATF_REQUIRE(name_max > 0); 92 ATF_REQUIRE(template != NULL); 94 ATF_REQUIRE(strcpy(template, path) != NULL); 95 ATF_REQUIRE(mktemp(template) != NULL); 96 ATF_REQUIRE(strlen(template) == strlen(path)); 97 ATF_REQUIRE(strcmp(template, path) != 0); 98 ATF_REQUIRE(strncmp(template, "/tmp/mktemp.", 12) == 0); 106 ATF_REQUIRE(mktemp(template) != NULL); 107 ATF_REQUIRE(strle [all...] |