UV_SHOULD_SUCCEED
UV_SHOULD_SUCCEED((mkdtemp(uv_dir) == NULL), "mkdtmp");
UV_SHOULD_SUCCEED((unveil("/", "rwxc") == -1), "unveil");
UV_SHOULD_SUCCEED((chdir(uv_dir) == -1), "chdir");
UV_SHOULD_SUCCEED(((fd = open(filename, O_WRONLY|O_CREAT, 0700)) == -1), "open");
UV_SHOULD_SUCCEED((close(fd) == -1), "close");
UV_SHOULD_SUCCEED((unveil(filename, perm) == -1), "unveil");
UV_SHOULD_SUCCEED((fwrite(perm, 1, strlen(perm), log) != strlen(perm)), "fwrite");
UV_SHOULD_SUCCEED((fwrite(":", 1, 1, log) != 1), "fwrite");
UV_SHOULD_SUCCEED((fwrite("R", 1, 1, log) != 1), "fwrite");
UV_SHOULD_SUCCEED((fwrite("W", 1, 1, log) != 1), "fwrite");
UV_SHOULD_SUCCEED((fwrite("X", 1, 1, log) != 1), "fwrite");
UV_SHOULD_SUCCEED((fwrite("F", 1, 1, log) != 1), "fwrite");
UV_SHOULD_SUCCEED((fwrite("\n", 1, 1, log) != 1), "fwrite");
UV_SHOULD_SUCCEED(
UV_SHOULD_SUCCEED(
UV_SHOULD_SUCCEED(
UV_SHOULD_SUCCEED(((dirfd = open("/", O_RDONLY | O_DIRECTORY)) == -1), "open");
UV_SHOULD_SUCCEED(((dirfd2 = open(uv_dir2, O_RDONLY | O_DIRECTORY)) == -1), "open");
UV_SHOULD_SUCCEED((pledge("unveil stdio rpath cpath wpath exec", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDWR) == -1), "open");
UV_SHOULD_SUCCEED((unlink(uv_file1) == -1), "unlink");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDWR) == -1), "open");
UV_SHOULD_SUCCEED((open(filename, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open(filename, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open(filename, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((opendir(uv_dir1) == NULL), "opendir");
UV_SHOULD_SUCCEED((opendir(filename) == NULL), "opendir");
UV_SHOULD_SUCCEED((opendir(filename) == NULL), "opendir");
UV_SHOULD_SUCCEED((opendir(filename) == NULL), "opendir");
UV_SHOULD_SUCCEED((opendir(filename) == NULL), "opendir");
UV_SHOULD_SUCCEED((realpath(uv_dir1, buf) == NULL), "realpath");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDONLY) == -1), "open");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDWR) == -1), "open");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDONLY) == -1), "open");
UV_SHOULD_SUCCEED((pledge("unveil stdio rpath cpath wpath exec", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDWR) == -1), "open");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDWR) == -1), "open");
UV_SHOULD_SUCCEED((pledge("unveil stdio rpath cpath wpath exec", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((pledge("stdio rpath cpath wpath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDWR) == -1), "open");
UV_SHOULD_SUCCEED((open(filename1, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open(filename2, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((pledge("unveil stdio fattr rpath cpath wpath", NULL) == -1),
UV_SHOULD_SUCCEED((unlink(filename1) == -1), "unlink");
UV_SHOULD_SUCCEED((pledge("unveil stdio fattr rpath cpath wpath", NULL) == -1),
UV_SHOULD_SUCCEED((link(uv_file1, filename) == -1), "link");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((chdir(uv_dir1) == -1), "chdir");
UV_SHOULD_SUCCEED((mkdir(filename, 0777) == -1), "mkdir");
UV_SHOULD_SUCCEED((mkdir(filename, 0777) == -1), "mkdir");
UV_SHOULD_SUCCEED((mkdir(filename, 0777) == -1), "mkdir");
UV_SHOULD_SUCCEED((open(filename, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((symlink("../subdir1/poop", filename) == -1), "symlink");
UV_SHOULD_SUCCEED((access(filename, R_OK) == -1), "access");
UV_SHOULD_SUCCEED((access(filename, R_OK) == -1), "access");
UV_SHOULD_SUCCEED((chdir(uv_dir1) == -1), "chdir");
UV_SHOULD_SUCCEED((chdir(filename) == -1), "chdir");
UV_SHOULD_SUCCEED((access("poop", R_OK) == -1), "access");
UV_SHOULD_SUCCEED((chdir("../subdir2") == -1), "chdir");
UV_SHOULD_SUCCEED((chdir("../subdir1") == -1), "chdir");
UV_SHOULD_SUCCEED((chdir(filename) == -1), "chdir");
UV_SHOULD_SUCCEED((chdir("../../doof/subdir2") == -1), "chdir");
UV_SHOULD_SUCCEED((chdir("../../doof/subdir1") == -1), "chdir");
UV_SHOULD_SUCCEED((chdir("../../doof/subdir2") == -1), "chdir");
UV_SHOULD_SUCCEED((chdir("../../doof/subdir1") == -1), "chdir");
UV_SHOULD_SUCCEED((access("poop", R_OK) == -1), "access");
UV_SHOULD_SUCCEED((access("../subdir1/poop", R_OK) == -1), "access");
UV_SHOULD_SUCCEED((open(filename1, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open(filename2, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath wpath cpath", NULL) == -1),
UV_SHOULD_SUCCEED((rename(filename1, rfilename1) == -1), "rename");
UV_SHOULD_SUCCEED((open(filename1, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open(filename1, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open(filename1, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open(filename1, O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((access(uv_file1, R_OK) == -1), "access");
UV_SHOULD_SUCCEED((access(uv_dir1, R_OK) == -1), "access");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((access(uv_file1, R_OK) == -1), "access");
UV_SHOULD_SUCCEED((access(uv_dir1, R_OK) == -1), "access");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((chflags(uv_file1, UF_NODUMP) == -1), "chflags");
UV_SHOULD_SUCCEED(((slashbefore = open("/", O_RDONLY | O_DIRECTORY)) == -1), "open");
UV_SHOULD_SUCCEED(((dirfd1before = open(uv_dir1, O_RDONLY | O_DIRECTORY)) == -1), "open");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((stat(uv_file1, &sb) == -1), "stat");
UV_SHOULD_SUCCEED((stat(uv_dir1, &sb) == -1), "stat");
UV_SHOULD_SUCCEED(((dirfd2before = open(uv_dir2, O_RDONLY | O_DIRECTORY)) == -1), "open");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((statfs("/home", &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((statfs("/", &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((statfs(uv_file1, &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((statfs(uv_file2, &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((statfs(uv_dir1, &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((statfs(uv_dir2, &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((statfs(uv_file1, &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((statfs(uv_file2, &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((statfs(uv_dir1, &sb) == -1), "statfs");
UV_SHOULD_SUCCEED((statfs(uv_dir2, &sb) == -1), "statfs");
UV_SHOULD_SUCCEED(((dirfd1after = open(uv_dir1, O_RDONLY | O_DIRECTORY)) == -1), "open");
UV_SHOULD_SUCCEED((pledge("unveil stdio fattr rpath cpath wpath", NULL) == -1),
UV_SHOULD_SUCCEED((symlink(uv_file1, filename) == -1), "symlink");
UV_SHOULD_SUCCEED((lstat(filename, &sb) == -1), "lstat");
UV_SHOULD_SUCCEED((lstat(uv_file1, &sb) == -1), "lstat");
UV_SHOULD_SUCCEED((readlink(filename, buf, sizeof(buf)) == -1), "readlink");
UV_SHOULD_SUCCEED((symlink(uv_file2, filename) == -1), "symlink");
UV_SHOULD_SUCCEED((lstat(filename, &sb) == -1), "lstat");
UV_SHOULD_SUCCEED((readlink(filename, buf, sizeof(buf)) == -1), "readlink");
UV_SHOULD_SUCCEED((openat(slashbefore, uv_file1, O_RDWR) == -1), "openat");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath unveil", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((chmod(uv_file1, S_IRWXU) == -1), "chmod");
UV_SHOULD_SUCCEED((chmod(uv_dir1, S_IRWXU) == -1), "chmod");
UV_SHOULD_SUCCEED((open(uv_file1, O_RDWR|O_CREAT, 0644) == -1), "open after fork");
UV_SHOULD_SUCCEED((opendir(uv_dir1) == NULL), "opendir after fork");
UV_SHOULD_SUCCEED((openat(dirfd1before, "hooray", O_RDWR|O_CREAT, 0644) == -1), "openat");
UV_SHOULD_SUCCEED((openat(dirfd1before, uv_file1, O_RDWR|O_CREAT, 0644) == -1), "openat");
UV_SHOULD_SUCCEED((pledge("unveil stdio fattr exec", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((execve(argv[0], argv, environ) == -1), "execve");
UV_SHOULD_SUCCEED((pledge("unveil stdio fattr exec", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((openat(dirfd2before, uv_file1, O_RDWR|O_CREAT, 0644) == -1), "openat");
UV_SHOULD_SUCCEED((pledge("stdio tmppath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((mkstemp(filename3) == -1), "mkstemp");
UV_SHOULD_SUCCEED((open("/tmp/hello", O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((openat(dirfd1after, "hooray", O_RDWR|O_CREAT, 0644) == -1), "openat");
UV_SHOULD_SUCCEED((open("./derp", O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((open("derp", O_RDWR|O_CREAT, 0644) == -1), "open");
UV_SHOULD_SUCCEED((openat(dirfd1after, uv_file1, O_RDWR|O_CREAT, 0644) == -1), "openat");
UV_SHOULD_SUCCEED((open("/dev/null", O_RDWR) == -1), "open");
UV_SHOULD_SUCCEED((open("/dev/zero", O_RDONLY) == -1), "open");
UV_SHOULD_SUCCEED((lstat("/usr/share/man", &sb) == -1), "lstat");
UV_SHOULD_SUCCEED((lstat("/usr/share/man/../../share/man", &sb) == -1), "lstat");
UV_SHOULD_SUCCEED((lstat("/usr/share/man/../../local/../share/man", &sb) == -1), "lstat");
UV_SHOULD_SUCCEED(((dirfd2after = openat(dirfd1after, "subdir", O_RDONLY | O_DIRECTORY)) == -1), "openat");
UV_SHOULD_SUCCEED(((fd2 = open(uv_dir2, O_RDONLY | O_DIRECTORY)) == -1), "open");
UV_SHOULD_SUCCEED((openat(dirfd2after, "../derp", O_RDWR|O_CREAT, 0644) == -1), "openat");
UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge");
UV_SHOULD_SUCCEED((chdir(uv_dir1) == -1), "chdir");
UV_SHOULD_SUCCEED((fchdir(fd2) == -1), "fchdir");
UV_SHOULD_SUCCEED((openat(dirfd2after, "hooray", O_RDWR|O_CREAT, 0644) == -1), "openat");
UV_SHOULD_SUCCEED((openat(dirfd2after, uv_file1, O_RDWR|O_CREAT, 0644) == -1), "openat");
UV_SHOULD_SUCCEED((unveil("/", "r") == -1), "unveil");
UV_SHOULD_SUCCEED((unveil("/usr/bin/id", "rx") == -1),
UV_SHOULD_SUCCEED((unveil(NULL, NULL) == -1), "unveil");
UV_SHOULD_SUCCEED((stat("/usr/bin", &st) == -1), "stat");
UV_SHOULD_SUCCEED((unveil("/", "r") == -1), "unveil");
UV_SHOULD_SUCCEED((unveil("/usr/bin/id", "rx") == -1),
UV_SHOULD_SUCCEED((unveil("/usr/bin", "") == -1), "unveil");
UV_SHOULD_SUCCEED((unveil(NULL, NULL) == -1), "unveil");
UV_SHOULD_SUCCEED((mkdtemp(uv_dir1) == NULL), "mkdtmp");
UV_SHOULD_SUCCEED((mkdtemp(uv_dir2) == NULL), "mkdtmp");
UV_SHOULD_SUCCEED(((fd1 = mkstemp(uv_file1)) == -1), "mkstemp");
UV_SHOULD_SUCCEED((chmod(uv_file1, S_IRWXU) == -1), "chmod");
UV_SHOULD_SUCCEED(((fd2 = mkstemp(uv_file2)) == -1), "mkstemp");
UV_SHOULD_SUCCEED((mkdir(filename, 0777) == -1), "mkdir");
UV_SHOULD_SUCCEED((mkdir(filename, 0777) == -1), "mkdir");