Lines Matching refs:fd2
473 int r, fd2; in mfd_assert_shrink() local
483 fd2 = mfd_assert_open(fd, in mfd_assert_shrink()
486 close(fd2); in mfd_assert_shrink()
770 int fd, fd2; in test_seal_future_write() local
791 fd2 = mfd_assert_reopen_fd(fd); in test_seal_future_write()
793 mfd_assert_read(fd2); in test_seal_future_write()
794 mfd_assert_read_shared(fd2); in test_seal_future_write()
795 mfd_fail_write(fd2); in test_seal_future_write()
800 close(fd2); in test_seal_future_write()
888 int fd, fd2; in test_share_dup() local
897 fd2 = mfd_assert_dup(fd); in test_share_dup()
898 mfd_assert_has_seals(fd2, 0); in test_share_dup()
902 mfd_assert_has_seals(fd2, F_SEAL_WRITE); in test_share_dup()
904 mfd_assert_add_seals(fd2, F_SEAL_SHRINK); in test_share_dup()
906 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_dup()
910 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_dup()
913 mfd_fail_add_seals(fd2, F_SEAL_GROW); in test_share_dup()
915 mfd_fail_add_seals(fd2, F_SEAL_SEAL); in test_share_dup()
917 close(fd2); in test_share_dup()
964 int fd, fd2; in test_share_open() local
973 fd2 = mfd_assert_open(fd, O_RDWR, 0); in test_share_open()
976 mfd_assert_has_seals(fd2, F_SEAL_WRITE); in test_share_open()
978 mfd_assert_add_seals(fd2, F_SEAL_SHRINK); in test_share_open()
980 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_open()
983 fd = mfd_assert_open(fd2, O_RDONLY, 0); in test_share_open()
987 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_open()
989 close(fd2); in test_share_open()
990 fd2 = mfd_assert_open(fd, O_RDWR, 0); in test_share_open()
992 mfd_assert_add_seals(fd2, F_SEAL_SEAL); in test_share_open()
994 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_open()
996 close(fd2); in test_share_open()