Lines Matching refs:fd2
391 int r, fd2; in mfd_assert_shrink() local
401 fd2 = mfd_assert_open(fd, in mfd_assert_shrink()
404 close(fd2); in mfd_assert_shrink()
734 int fd, fd2; in test_share_dup() local
741 fd2 = mfd_assert_dup(fd); in test_share_dup()
742 mfd_assert_has_seals(fd2, 0); in test_share_dup()
746 mfd_assert_has_seals(fd2, F_SEAL_WRITE); in test_share_dup()
748 mfd_assert_add_seals(fd2, F_SEAL_SHRINK); in test_share_dup()
750 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_dup()
754 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_dup()
757 mfd_fail_add_seals(fd2, F_SEAL_GROW); in test_share_dup()
759 mfd_fail_add_seals(fd2, F_SEAL_SEAL); in test_share_dup()
761 close(fd2); in test_share_dup()
806 int fd, fd2; in test_share_open() local
813 fd2 = mfd_assert_open(fd, O_RDWR, 0); in test_share_open()
816 mfd_assert_has_seals(fd2, F_SEAL_WRITE); in test_share_open()
818 mfd_assert_add_seals(fd2, F_SEAL_SHRINK); in test_share_open()
820 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_open()
823 fd = mfd_assert_open(fd2, O_RDONLY, 0); in test_share_open()
827 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_open()
829 close(fd2); in test_share_open()
830 fd2 = mfd_assert_open(fd, O_RDWR, 0); in test_share_open()
832 mfd_assert_add_seals(fd2, F_SEAL_SEAL); in test_share_open()
834 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_open()
836 close(fd2); in test_share_open()