/src/tests/lib/librumpclient/ |
t_fd.c | 69 RL(system("rump_server " RUMPSERV)); 70 RL(setenv("RUMP_SERVER", RUMPSERV, 1)); 72 RL(dup2(0, 10)); 73 RL(dup2(1, 11)); 74 RL(dup2(2, 12)); 76 RL(close(0)); 77 RL(close(1)); 78 RL(close(2)); 80 RL(rumpclient_init()); 81 RL(rump_sys_getpid()) [all...] |
/src/tests/kernel/kqueue/read/ |
t_file2.c | 59 RL(fd1 = open("afile", O_RDONLY|O_CREAT, 0644)); 60 RL(fd2 = open("bfile", O_RDONLY|O_CREAT, 0644)); 63 RL(lseek(fd1, 0, SEEK_END)); 66 RL(kq = kqueue()); 69 RL(kevent(kq, event, 1, NULL, 0, NULL)); 71 RL(dup2(fd2, fd1));
|
t_pipe.c | 58 RL(pipe(fds)); 59 RL(kq = kqueue()); 62 RL(kevent(kq, event, 1, NULL, 0, NULL)); 65 RL(write(fds[1], "foo", 3)); 68 RL(n = kevent(kq, NULL, 0, event, 1, NULL)); 72 RL(n = read(fds[0], buffer, event[0].data));
|
t_ttypty.c | 66 RL(openpty(&amaster, &aslave, slavetty, NULL, NULL)); 72 RL(child = fork()); 83 RL(tcgetattr(acurrent, &tio)); 85 RL(tcsetattr(acurrent, TCSADRAIN, &tio)); 90 RL(poll(&pfd, 1, INFTIM)); 99 RL(kq = kqueue()); 102 RL(kevent(kq, event, 1, NULL, 0, NULL)); 104 RL(n = kevent(kq, NULL, 0, event, 1, NULL)); 112 RL(n = read(acurrent, buffer, 128)); 153 RL(openpty(&amaster, &aslave, slavetty, NULL, NULL)) [all...] |
t_file.c | 92 RL(pid = fork()); 98 RL(fd = open(FILENAME, O_RDONLY|O_CREAT, 0644)); 101 RL(lseek(fd, 0, SEEK_END)); 104 RL(kq = kqueue()); 107 RL(kevent(kq, event, 1, NULL, 0, NULL)); 110 RL(n = kevent(kq, NULL, 0, event, 1, NULL)); 119 RL(lseek(fd, 0, SEEK_END)); 121 RL(lseek(fd, event[0].data, SEEK_END)); 124 RL(n = read(fd, buffer, 128));
|
/src/tests/fs/vfs/ |
t_union.c | 35 RL(fd = rump_sys_open(pathb, O_CREAT | O_RDWR, 0777)); 38 RL(rump_sys_close(fd)); 57 RL(rump_sys_close(fd)); 100 RL(rump_sys_mount(MOUNT_RUMPFS, "/", status | MNT_UPDATE, NULL, 0)); 136 RL(rump_sys_unlink(TFILE)); 141 RL(fd = rump_sys_open(mp, O_RDONLY)); 142 RL(dsize = rump_sys_getdents(fd, dbuf, sizeof(dbuf))); 149 RL(rump_sys_close(fd)); 151 RL(rump_sys_unmount(mp, 0)); 165 RL(ffs_fstest_newfs(tc, &fsarg, "daimage", 1024*1024*5, NULL)) [all...] |
t_io.c | 57 RL(fd = rump_sys_open("file", O_RDWR|O_CREAT|O_TRUNC, 0666)); 60 RL(rump_sys_pwrite(fd, buf, 1, getpagesize())); 63 RL(rump_sys_pwrite(fd, buf, 2, getpagesize()-1)); 68 RL(rump_sys_pread(fd, b2, therange, 0)); 87 RL(fd = rump_sys_open("testfile", 89 RL(rump_sys_ftruncate(fd, seekcnt)); 90 RL(rump_sys_fstat(fd, &sb)); 97 RL(rump_sys_fstat(fd, &sb)); 99 RL(rump_sys_close(fd)); 125 RL(fd = rump_sys_open("testi", O_CREAT | O_RDWR, 0666)) [all...] |
t_rwtoro.c | 72 RL(rump_sys_statvfs1(mp, &sbuf, ST_WAIT)); 97 RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777)); 98 RL(rump_sys_close(file_fd)); 99 RL(file_fd = rump_sys_open(file_path, O_RDONLY)); 107 RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777)); 108 RL(rump_sys_close(file_fd)); 109 RL(file_fd = rump_sys_open(file_path, O_RDONLY)); 110 RL(rump_sys_unlink(file_path)); 118 RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777)); 125 RL(rump_sys_close(file_fd)) [all...] |
/src/tests/lib/libc/c063/ |
t_utimensat.c | 96 RL(mkdir(DIR, 0755)); 97 RL(fd = open(FILE, O_CREAT|O_RDWR, 0644)); 98 RL(close(fd)); 100 RL(dfd = open(DIR, O_RDONLY, 0)); 101 RL(utimensat(dfd, BASEFILE, tptr, 0)); 102 RL(close(dfd)); 104 RL(stat(FILE, &st)); 105 RL(statvfs(FILE, &fs)); 121 RL(mkdir(DIR, 0755)); 122 RL(fd = open(FILE, O_CREAT|O_RDWR, 0644)) [all...] |
/src/tests/kernel/kqueue/write/ |
t_pipe.c | 62 RL(pipe(fds)); 63 RL(kq = kqueue()); 64 RL(close(fds[0])); 88 RL(pipe(fds)); 89 RL(kq = kqueue()); 92 RL(kevent(kq, event, 1, NULL, 0, NULL)); 95 RL(child = fork()); 103 RL(n = kevent(kq, NULL, 0, event, 1, NULL)); 108 RL(n = write(fds[1], "foo", 3)); 109 RL(close(fds[1])) [all...] |
t_ttypty.c | 63 RL(openpty(&amaster, &aslave, slavetty, NULL, NULL)); 68 RL(child = fork()); 81 RL(poll(&pfd, 1, INFTIM)); 84 RL(kq = kqueue()); 87 RL(kevent(kq, event, 1, NULL, 0, NULL)); 89 RL(n = kevent(kq, NULL, 0, event, 1, NULL)); 97 RL(n = write(acurrent, "f00\n", 4));
|
/src/tests/lib/libpthread/ |
t_compat_cancel.c | 73 RL(kq = kqueue()); 74 RL(__kevent50(kq, &ev, 1, NULL, 1, &(const struct timespec){0,0})); 76 RL(__kevent50(kq, NULL, 0, &ev, 1, NULL)); 86 RL(fd = open("file", O_RDWR|O_CREAT, 0666)); 87 RL(ftruncate(fd, pagesize)); 92 RL(msync(map, pagesize)); 102 RL(__sigfillset14(&mask)); 103 RL(__sigprocmask14(SIG_BLOCK, &mask, &omask)); 105 RL(__sigtimedwait(&omask, &info, &t)); 121 RL(pipe(fd)) [all...] |
t_cancellation.c | 128 RL(msgctl(*msgidp, IPC_RMID, NULL)); 144 RL(sock = socket(PF_LOCAL, SOCK_STREAM, 0)); 145 RL(bind(sock, (const struct sockaddr *)&sun, sizeof(sun))); 146 RL(listen(sock, 1)); 157 RL(accept(sock, NULL, NULL)); 166 RL(accept4(sock, NULL, NULL, O_CLOEXEC)); 182 RL(pipe(fd)); 184 RL(aio_read(&aio)); 186 RL(aio_suspend(aiolist, __arraycount(aiolist), NULL)); 196 RL(clock_nanosleep(CLOCK_MONOTONIC, 0, &t, NULL)) [all...] |
/src/tests/fs/hfs/ |
t_pathconvert.c | 45 RL(system(thecmd)); 48 RL(system(thecmd)); 54 RL(rump_sys_mkdir("/mp", 0777)); 56 RL(rump_sys_mount(MOUNT_HFS, "/mp", 0, &args, sizeof args)); 58 RL(dirfd = rump_sys_open("/mp", O_RDONLY)); 60 RL(nbytes = rump_sys_getdents(dirfd, buf, sizeof buf)); 73 RL(rump_sys_close(dirfd)); 74 RL(fd = rump_sys_open("/mp/" FUNNY_FILENAME, O_RDONLY)); 75 RL(rump_sys_close(fd)); 76 RL(rump_sys_unmount("/mp", 0)) [all...] |
/src/tests/lib/librefuse/ |
t_refuse_opt.c | 50 RL(fuse_opt_add_arg(&args, "foo")); 51 RL(fuse_opt_add_arg(&args, "bar")); 69 RL(fuse_opt_insert_arg(&args, 0, "foo")); 70 RL(fuse_opt_insert_arg(&args, 0, "bar")); 88 RL(fuse_opt_add_opt(&opt, "fo\\o")); 91 RL(fuse_opt_add_opt(&opt, "ba,r")); 105 RL(fuse_opt_add_opt_escaped(&opt, "fo\\o")); 108 RL(fuse_opt_add_opt_escaped(&opt, "ba,r")); 210 RL(fuse_opt_add_arg(&args, "foofs")); 211 RL(fuse_opt_add_arg(&args, "-o")) [all...] |
/src/tests/lib/libc/sys/ |
t_pipe.c | 84 RL(sigemptyset(&emptysigset)); 85 RL(sigemptyset(&asigset)); 86 RL(sigaddset(&asigset, SIGINFO)); 95 RL(pipe(pp)); 97 RL(pid = fork()); 100 RL(close(pp[1])); 106 RL(done = read(pp[0], f, 128 * 1024)); 109 RL(sigprocmask(SIG_BLOCK, &asigset, &osigset)); 115 RL(sigprocmask(SIG_SETMASK, &osigset, NULL)); 132 RL(close(pp[0])) [all...] |
t_ptrace.c | 122 RL(sysctlbyname("kern.securelevel", &level, &len, NULL, 0)); 166 RL(mkdir(buf, 0500)); 167 RL(chdir(buf)); 169 RL(pipe(fds_toparent)); 170 RL(pipe(fds_fromparent)); 196 RL(close(fds_toparent[1])); 197 RL(close(fds_fromparent[0])); 200 RL(rv = read(fds_toparent[0], &msg, sizeof(msg))); 204 RL(rv = write(fds_fromparent[1], &msg, sizeof(msg))); 208 RL(close(fds_fromparent[1])) [all...] |
/src/tests/kernel/ |
t_cloexec.c | 69 RL(slisten = socket(PF_LOCAL, SOCK_STREAM, 0)); 70 RL(bind(slisten, &name.sa, sizeof(name))); 71 RL(listen(slisten, SOMAXCONN)); 79 RL(c = socket(PF_LOCAL, SOCK_STREAM|SOCK_NONBLOCK, 0)); 88 RL(saccept = accept4(slisten, /*addr*/NULL, /*addrlen*/NULL, 98 RL(fd = open("/dev/drvctl", O_RDONLY|O_CLOEXEC)); 108 RL(fd3 = dup3(STDIN_FILENO, 3, O_CLOEXEC)); 120 RL(fd = fcntl(STDIN_FILENO, F_DUPFD_CLOEXEC, 0)); 130 RL(fd = kqueue1(O_CLOEXEC)); 140 RL(fd = open("file", O_RDWR|O_CREAT|O_CLOEXEC, 0644)) [all...] |
t_clofork.c | 70 RL(slisten = socket(PF_LOCAL, SOCK_STREAM, 0)); 71 RL(bind(slisten, &name.sa, sizeof(name))); 72 RL(listen(slisten, SOMAXCONN)); 80 RL(c = socket(PF_LOCAL, SOCK_STREAM|SOCK_NONBLOCK, 0)); 89 RL(saccept = accept4(slisten, /*addr*/NULL, /*addrlen*/NULL, 99 RL(fd = open("/dev/drvctl", O_RDONLY|O_CLOFORK)); 109 RL(fd3 = dup3(STDIN_FILENO, 3, O_CLOFORK)); 121 RL(fd = fcntl(STDIN_FILENO, F_DUPFD_CLOFORK, 0)); 131 RL(fd = kqueue1(O_CLOFORK)); 141 RL(fd = open("file", O_RDWR|O_CREAT|O_CLOFORK, 0644)) [all...] |
t_memfd_create.c | 98 RL(fd = memfd_create(name_buf, 0)); 115 RL(fd = memfd_create("", 0)); 119 RL(write(fd, write_buf, rwbuf_size)); 125 RL(lseek(fd, 0, SEEK_SET)); 127 RL(read(fd, read_buf, rwbuf_size)); 152 RL(fd = memfd_create("", 0)); 157 RL(write(fd, write_buf, rwbuf_size)); 159 RL(fstat(fd, &st)); 164 RL(ftruncate(fd, rwbuf_size/2)); 165 RL(fstat(fd, &st)) [all...] |
/src/tests/dev/scsipi/ |
t_cd.c | 57 RL(part = getrawpartition()); 66 RL(fd = rump_sys_open(fname, O_RDWR)); 67 RL(rump_sys_ioctl(fd, DIOCEJECT, &arg)); 70 RL(rump_sys_close(fd));
|
/src/tests/modules/ |
t_builtin.c | 61 RL(rump_sys_close(fd)); 78 RL(rump_sys_mkdir(MYMP, 0777)); 79 RL(rump_sys_mount(MOUNT_KERNFS, MYMP, 0, NULL, 0)); 81 RL(rump_sys_unmount(MYMP, 0)); 82 RL(rump_sys_modctl(MODCTL_UNLOAD, kernfs)); 96 RL(rump_sys_mkdir(MYMP, 0777)); 98 RL(rump_sys_modctl(MODCTL_UNLOAD, kernfs)); 116 RL(rump_sys_mkdir(MYMP, 0777)); 118 RL(rump_sys_modctl(MODCTL_UNLOAD, kernfs)); 126 RL(rump_sys_modctl(MODCTL_LOAD, &mod)) [all...] |
/src/tests/kernel/kqueue/ |
t_proc3.c | 64 RL(kq = kqueue()); 68 RL(kevent(kq, &ke, 1, NULL, 0, NULL)); 70 RL(pid = fork()); 76 RL(waitpid(pid, &status, 0)); 86 RL(kevent(kq, NULL, 0, &ke, 1, &timeout)); 87 RL(close(kq));
|
t_proc2.c | 97 RL(kq = kqueue()); 102 RL(pid = fork()); 112 RL(kevent(kq, &ke, 1, NULL, 0, &timeout)); 120 RL(kevent(kq, NULL, 0, &ke, 1, &timeout)); 121 RL(close(kq)); 123 RL(waitpid(pid, &status, 0));
|
/src/tests/lib/libc/gen/posix_spawn/ |
t_spawnattr.c | 63 RL(sched = sched_getscheduler(0)); 82 RL(max = sched_get_priority_max(scheduler)); 83 RL(min = sched_get_priority_min(scheduler)); 85 RL(sched_getparam(0, ¶m)); 119 RL(pipe(pfd)); 129 RL(sigemptyset(&sig)); 130 RL(sigaddset(&sig, SIGUSR1)); 147 RL(child_scheduler = sched_getscheduler(pid)); 152 RL(sched_getparam(pid, &child_sp)); 161 RL(write(pfd[1], "q", 1)) [all...] |