Lines Matching refs:open

421 	 * Mixing error codes from close(2) and open(2) should not lead to any
471 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
474 ruleset_fd = open(dir_s1d1, O_PATH | O_DIRECTORY | O_CLOEXEC);
482 ruleset_fd = open(dir_s1d1, O_DIRECTORY | O_CLOEXEC);
499 path_beneath.parent_fd = open(dir_s1d2, O_DIRECTORY | O_CLOEXEC);
513 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
595 path_beneath_file.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC);
600 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
653 open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC);
680 path_beneath.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC);
709 path_beneath.parent_fd = open(path, O_PATH | O_CLOEXEC);
712 TH_LOG("Failed to open directory \"%s\": %s", path,
817 path_beneath.parent_fd = open("/proc/self/ns/mnt", O_PATH | O_CLOEXEC);
890 reg_fd = open(file1_s2d2, O_RDWR | O_CLOEXEC);
899 reg_fd = open(file1_s2d2, O_RDONLY | O_CLOEXEC);
1409 * Same tests and results as above, except for open(dir_s1d3) which is
1879 dirfd = open(dir_s1d2, O_DIRECTORY);
1967 dst_fd = open(dst_path, O_WRONLY | O_TRUNC | O_CLOEXEC);
1970 TH_LOG("Failed to open \"%s\": %s", dst_path, strerror(errno));
1972 src_fd = open(BINARY_PATH, O_RDONLY | O_CLOEXEC);
1975 TH_LOG("Failed to open \"" BINARY_PATH "\": %s",
3359 return open(procfd_path, open_flags);
3383 reg_fd = open(file1_s1d2, O_RDONLY | O_CLOEXEC);
3523 * Checks read right: truncate and open with O_TRUNC work, unless the
3532 * Checks write right: truncate and open with O_TRUNC work, unless the
3541 * Checks "no rights" case: truncate works but all open attempts fail,
3618 * Note: Files can get truncated using open() even with O_RDONLY.
3624 /* Checks truncate right: truncate works, but can't open file. */
3705 fd_layer0 = open(path, O_WRONLY);
3713 fd_layer1 = open(path, O_WRONLY);
3722 fd_layer2 = open(path, O_WRONLY);
3732 fd_layer3 = open(path, O_WRONLY);
3830 fd = open(path, O_WRONLY);
3851 * Enables Landlock in the child process, open a file descriptor
3870 fd = open(path, O_WRONLY);
3930 * created in ways other than open(2).
3963 * ftruncate(2) yield EBADF, as it is documented in open(2) for the
3966 fd = open(dir_s1d1, O_PATH | O_CLOEXEC);
3985 fd = open(dir_s1d1, O_PATH | O_CLOEXEC);
4063 fd = open("/dev/null", O_RDWR | O_CLOEXEC);
4133 fd = open(path, O_WRONLY);
4138 fd = open(path, O_RDONLY);
4266 file_fd = open("/dev/zero", variant->open_mode);
4302 * Ignore variant->open_mode for this test, as we intend to open a
4306 dir_fd = open("/dev", O_RDONLY);
4346 file_fd = open("/dev/zero", variant->open_mode);
4349 TH_LOG("Failed to open /dev/zero: %s", strerror(errno));