Lines Matching refs:root_fd
530 int root_fd = open(mount_path, O_RDONLY | O_DIRECTORY); in CreateTestFile() local
531 ASSERT_GE(root_fd, 0); in CreateTestFile()
532 fd = openat(root_fd, file_name, O_CREAT | O_RDWR); in CreateTestFile()
537 ASSERT_EQ(close(root_fd), 0); in CreateTestFile()
558 int root_fd = open(mount_path, O_RDONLY | O_DIRECTORY); in MountReadonly() local
559 ASSERT_GE(root_fd, 0); in MountReadonly()
560 fd = openat(root_fd, file_name, O_CREAT | O_RDWR); in MountReadonly()
566 fd = openat(root_fd, file_name, O_RDONLY); in MountReadonly()
573 ASSERT_LT(renameat(root_fd, file_name, root_fd, "new_file"), 0); in MountReadonly()
574 ASSERT_LT(unlinkat(root_fd, file_name, 0), 0); in MountReadonly()
577 ASSERT_EQ(close(root_fd), 0); in MountReadonly()
607 int root_fd = open(mount_path, O_RDONLY | O_DIRECTORY); in MountBlockReadonly() local
608 ASSERT_GE(root_fd, 0); in MountBlockReadonly()
609 fd = openat(root_fd, file_name, O_CREAT | O_RDWR); in MountBlockReadonly()
613 fd = openat(root_fd, file_name, O_RDONLY); in MountBlockReadonly()
616 ASSERT_EQ(close(root_fd), 0); in MountBlockReadonly()