8000 Add support for POSIX O_CLOFORK by ricardobranco777 · Pull Request #1698 · freebsd/freebsd-src · GitHub
[go: up one dir, main page]

Skip to content

Add support for POSIX O_CLOFORK #1698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ricardobranco777
Copy link
Contributor
@ricardobranco777 ricardobranco777 commented May 16, 2025

This PR:

  • Adds support for POSIX O_CLOFORK (close-on-fork) flag.
  • Extends the concept to close_range()

This one looks perhaps deceptively simple to implement but it's passing all 667 tests (except dup3) from a suite adapted from Illumos not included yet.

This may be useful for Golang & Rust:

This interface was called stupid by opinionated Linux folks and perhaps they're right, so I want an informed opinion before going any further. I had my fun anyway. Here are the relevant links with discussion:

DONE

  • Add the adapted CDDL-licensed oclo tests. All 791 PASSED, 0 failed or skipped.
  • Support it in dup3
  • Add it in libsysdecode
  • Update manpages.

NOT NEEDED

  • "f" in fopen. It's not POSIX and not even Solaris/Illumos implement it.

NOTES

  • Except for manpages, this patch applies cleanly on FreeBSD 14

POSIX References:

Illumos references:

Fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286843

To test:

cd /usr/src/tests/oclo
make
sudo make install
/usr/tests/cddl/oclo/oclo
/usr/tests/cddl/oclo/oclo_errors

Copy link
github-actions bot commented May 16, 2025

Thank you for taking the time to contribute to FreeBSD!
There is an issue that needs to be fixed:

@llfw llfw requested review from markjdb and kostikbel May 16, 2025 23:43
@markjdb
Copy link
Member
markjdb commented May 16, 2025

This interface was called stupid by opinionated Linux folks and I want an informed opinion before going any further.

Skimming the thread, the main objection seems to be that the feature adds extra memory accesses to certain hot paths. I think this is not so true in our case, we already pay some of these overheads. We have 7 bits available for per-fd flags (struct filedescent is pretty fat anyway since it stores capsicum rights), and we already have to iterate over fds upon fork since kqueue descriptors implicitly have O_CLOFORK set.

XNU seems to implement this flag as well. I don't have strong feelings on whether it's very useful or not, but at a glance the implementation doesn't look too complex.

@kostikbel
Copy link
Member

I do share the sentiment that the feature is silly. But the implementation should be straighforward, since the main pain point is fdcopy() where we already do the pass over all fds in the parent.

IMO it should be finished if only to have a checkpoint for POSIX compliance.

@ricardobranco777 ricardobranco777 force-pushed the oclofork branch 5 times, most recently from 2a306bf to 267133c Compare May 17, 2025 07:54
@ricardobranco777 ricardobranco777 force-pushed the oclofork branch 3 times, most recently from 6102aa1 to 2fb5caa Compare May 17, 2025 15:44
@markjdb
Copy link
Member
markjdb commented May 17, 2025

CDDL-licensed code from illumos should be placed under cddl/contrib/opensolaris. It's ok for the build outputs to be installed under /usr/tests, but the code should be excluded from the build if WITHOUT_CDDL= is defined in src.conf.

@ricardobranco777 ricardobranco777 force-pushed the oclofork branch 2 times, most recently from 2854c77 to 77c1f74 Compare May 17, 2025 22:03
@ricardobranco777
Copy link
Contributor Author
ricardobranco777 commented May 17, 2025

CDDL-licensed code from illumos should be placed under cddl/contrib/opensolaris. It's ok for the build outputs to be installed under /usr/tests, but the code should be excluded from the build if WITHOUT_CDDL= is defined in src.conf.

The build is not done automatically. To test:

cd /usr/src/cddl/contrib/opensolaris/tests/oclo
make
sudo make install
/usr/tests/bin/oclo

@ricardobranco777 ricardobranco777 force-pushed the oclofork branch 2 times, most recently from a3d476d to 7aeab4f Compare May 18, 2025 09:05
@ricardobranco777
Copy link
Contributor Author
ricardobranco777 commented May 18, 2025

The oclo_errors test shows some failures in socket because we don't check type in kern_socket:
https://github.com/freebsd/freebsd-src/blob/main/sys/kern/uipc_syscalls.c#L139

TEST PASSED: dup3(): O_RDWR: correctly failed with EINVAL
TEST PASSED: dup3(): O_NONBLOCK|O_CLOXEC: correctly failed with EINVAL
TEST PASSED: dup3(): O_CLOFORK|O_WRONLY: correctly failed with EINVAL
TEST PASSED: pipe2(): O_RDWR: correctly failed with EINVAL
TEST PASSED: pipe2(): O_SYNC|O_CLOXEC: correctly failed with EINVAL
TEST PASSED: pipe2(): O_CLOFORK|O_WRONLY: correctly failed with EINVAL
TEST PASSED: pipe2(): INT32_MAX: correctly failed with EINVAL
oclo_errors: TEST FAILED: socket(): INT32_MAX: failed with Protocol wrong type for socket, expected EINVAL
oclo_errors: TEST FAILED: socket(): 3 << 25: failed with Protocol wrong type for socket, expected EINVAL
TEST PASSED: accept4(): INT32_MAX: correctly failed with EINVAL
TEST PASSED: accept4(): 3 << 25: correctly failed with EINVAL

@ricardobranco777
Copy link
Contributor Author

oclo tests results all PASSED:

TEST PASSED: open(2), no flags (pre-fork): fd 3 discovered flags match (0x0)
TEST PASSED: open(2), O_CLOEXEC (pre-fork): fd 4 discovered flags match (0x1)
TEST PASSED: open(2), O_CLOFORK (pre-fork): fd 5 discovered flags match (0x2)
TEST PASSED: open(2), O_CLOEXEC|O_CLOFORK (pre-fork): fd 6 discovered flags match (0x3)
TEST PASSED: fcntl(F_SETFD) no flags->no flags (pre-fork): fd 7 discovered flags match (0x0)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK|O_CLOEXEC->no flags (pre-fork): fd 8 discovered flags match (0x0)
TEST PASSED: fcntl(F_SETFD) O_CLOEXEC->no flags (pre-fork): fd 9 discovered flags match (0x0)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK->no flags (pre-fork): fd 10 discovered flags match (0x0)
TEST PASSED: fcntl(F_SETFD) no flags->O_CLOEXEC (pre-fork): fd 11 discovered flags match (0x1)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK|O_CLOEXEC->O_CLOEXEC (pre-fork): fd 12 discovered flags match (0x1)
TEST PASSED: fcntl(F_SETFD) O_CLOEXEC->O_CLOEXEC (pre-fork): fd 13 discovered flags match (0x1)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK->O_CLOEXEC (pre-fork): fd 14 discovered flags match (0x1)
TEST PASSED: fcntl(F_SETFD) no flags->O_CLOFORK (pre-fork): fd 15 discovered flags match (0x2)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK|O_CLOEXEC->O_CLOFORK (pre-fork): fd 16 discovered flags match (0x2)
TEST PASSED: fcntl(F_SETFD) O_CLOEXEC->O_CLOFORK (pre-fork): fd 17 discovered flags match (0x2)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK->O_CLOFORK (pre-fork): fd 18 discovered flags match (0x2)
TEST PASSED: fcntl(F_SETFD) no flags->O_CLOFORK|O_CLOEXEC (pre-fork): fd 19 discovered flags match (0x3)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK|O_CLOEXEC->O_CLOFORK|O_CLOEXEC (pre-fork): fd 20 discovered flags match (0x3)
TEST PASSED: fcntl(F_SETFD) O_CLOEXEC->O_CLOFORK|O_CLOEXEC (pre-fork): fd 21 discovered flags match (0x3)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK->O_CLOFORK|O_CLOEXEC (pre-fork): fd 22 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUPFD) none->none (pre-fork): fd 23 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD) none->none (pre-fork): fd 24 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD) FD_CLOEXEC->none (pre-fork): fd 25 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD) FD_CLOEXEC->none (pre-fork): fd 26 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD) FD_CLOFORK->none (pre-fork): fd 27 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUPFD) FD_CLOFORK->none (pre-fork): fd 28 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD) FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 29 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUPFD) FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 30 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) none (pre-fork): fd 31 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) none (pre-fork): fd 32 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOEXEC (pre-fork): fd 33 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOEXEC (pre-fork): fd 34 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOFORK (pre-fork): fd 35 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOFORK (pre-fork): fd 36 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOEXEC|FD_CLOFORK (pre-fork): fd 37 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOEXEC|FD_CLOFORK (pre-fork): fd 38 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) none (pre-fork): fd 39 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) none (pre-fork): fd 40 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOEXEC (pre-fork): fd 41 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOEXEC (pre-fork): fd 42 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOFORK (pre-fork): fd 43 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOFORK (pre-fork): fd 44 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOEXEC|FD_CLOFORK (pre-fork): fd 45 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOEXEC|FD_CLOFORK (pre-fork): fd 46 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD) none->none (pre-fork): fd 47 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD) none->none (pre-fork): fd 48 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOEXEC->none (pre-fork): fd 49 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOEXEC->none (pre-fork): fd 50 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOFORK->none (pre-fork): fd 51 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOFORK->none (pre-fork): fd 52 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 53 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 54 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) none (pre-fork): fd 55 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) none (pre-fork): fd 56 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOEXEC (pre-fork): fd 57 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOEXEC (pre-fork): fd 58 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOFORK (pre-fork): fd 59 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOFORK (pre-fork): fd 60 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOEXEC|FD_CLOFORK (pre-fork): fd 61 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOEXEC|FD_CLOFORK (pre-fork): fd 62 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) none (pre-fork): fd 63 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) none (pre-fork): fd 64 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOEXEC (pre-fork): fd 65 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOEXEC (pre-fork): fd 66 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOFORK (pre-fork): fd 67 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOFORK (pre-fork): fd 68 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOEXEC|FD_CLOFORK (pre-fork): fd 69 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOEXEC|FD_CLOFORK (pre-fork): fd 70 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) none->none (pre-fork): fd 71 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->none (pre-fork): fd 72 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->none (pre-fork): fd 73 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->none (pre-fork): fd 74 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->none (pre-fork): fd 75 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->none (pre-fork): fd 76 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 77 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 78 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOEXEC (pre-fork): fd 79 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOEXEC (pre-fork): fd 80 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOEXEC (pre-fork): fd 81 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOEXEC (pre-fork): fd 82 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOEXEC (pre-fork): fd 83 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOEXEC (pre-fork): fd 84 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOEXEC (pre-fork): fd 85 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOEXEC (pre-fork): fd 86 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 87 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 88 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 89 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 90 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 91 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 92 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 93 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 94 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOFORK (pre-fork): fd 95 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOFORK (pre-fork): fd 96 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOFORK (pre-fork): fd 97 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOFORK (pre-fork): fd 98 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOFORK (pre-fork): fd 99 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOFORK (pre-fork): fd 100 discovered flags match (0x2)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK (pre-fork): fd 101 discovered flags match (0x3)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK (pre-fork): fd 102 discovered flags match (0x2)
TEST PASSED: dup2() none->none (pre-fork): fd 103 discovered flags match (0x0)
TEST PASSED: dup2() none->none (pre-fork): fd 104 discovered flags match (0x0)
TEST PASSED: dup2() FD_CLOEXEC->none (pre-fork): fd 105 discovered flags match (0x1)
TEST PASSED: dup2() FD_CLOEXEC->none (pre-fork): fd 106 discovered flags match (0x0)
TEST PASSED: dup2() FD_CLOFORK->none (pre-fork): fd 107 discovered flags match (0x2)
TEST PASSED: dup2() FD_CLOFORK->none (pre-fork): fd 108 discovered flags match (0x0)
TEST PASSED: dup2() FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 109 discovered flags match (0x3)
TEST PASSED: dup2() FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 110 discovered flags match (0x0)
TEST PASSED: dup3() none->none (pre-fork): fd 111 discovered flags match (0x0)
TEST PASSED: dup3() none->none (pre-fork): fd 112 discovered flags match (0x0)
TEST PASSED: dup3() FD_CLOEXEC->none (pre-fork): fd 113 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->none (pre-fork): fd 114 discovered flags match (0x0)
TEST PASSED: dup3() FD_CLOFORK->none (pre-fork): fd 115 discovered flags match (0x2)
TEST PASSED: dup3() FD_CLOFORK->none (pre-fork): fd 116 discovered flags match (0x0)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 117 discovered flags match (0x3)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 118 discovered flags match (0x0)
TEST PASSED: dup3() none->FD_CLOEXEC (pre-fork): fd 119 discovered flags match (0x0)
TEST PASSED: dup3() none->FD_CLOEXEC (pre-fork): fd 120 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOEXEC (pre-fork): fd 121 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOEXEC (pre-fork): fd 122 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOFORK->FD_CLOEXEC (pre-fork): fd 123 discovered flags match (0x2)
TEST PASSED: dup3() FD_CLOFORK->FD_CLOEXEC (pre-fork): fd 124 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOEXEC (pre-fork): fd 125 discovered flags match (0x3)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOEXEC (pre-fork): fd 126 discovered flags match (0x1)
TEST PASSED: dup3() none->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 127 discovered flags match (0x0)
TEST PASSED: dup3() none->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 128 discovered flags match (0x3)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 129 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 130 discovered flags match (0x3)
TEST PASSED: dup3() FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 131 discovered flags match (0x2)
TEST PASSED: dup3() FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 132 discovered flags match (0x3)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 133 discovered flags match (0x3)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (pre-fork): fd 134 discovered flags match (0x3)
TEST PASSED: dup3() none->FD_CLOFORK (pre-fork): fd 135 discovered flags match (0x0)
TEST PASSED: dup3() none->FD_CLOFORK (pre-fork): fd 136 discovered flags match (0x2)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOFORK (pre-fork): fd 137 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOFORK (pre-fork): fd 138 discovered flags match (0x2)
TEST PASSED: dup3() FD_CLOFORK->FD_CLOFORK (pre-fork): fd 139 discovered flags match (0x2)
TEST PASSED: dup3() FD_CLOFORK->FD_CLOFORK (pre-fork): fd 140 discovered flags match (0x2)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK (pre-fork): fd 141 discovered flags match (0x3)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK (pre-fork): fd 142 discovered flags match (0x2)
TEST PASSED: pipe(2), no flags (pre-fork): fd 143 discovered flags match (0x0)
TEST PASSED: pipe(2), no flags (pre-fork): fd 144 discovered flags match (0x0)
TEST PASSED: pipe(2), O_CLOEXEC (pre-fork): fd 145 discovered flags match (0x1)
TEST PASSED: pipe(2), O_CLOEXEC (pre-fork): fd 146 discovered flags match (0x1)
TEST PASSED: pipe(2), O_CLOFORK (pre-fork): fd 147 discovered flags match (0x2)
TEST PASSED: pipe(2), O_CLOFORK (pre-fork): fd 148 discovered flags match (0x2)
TEST PASSED: pipe(2), O_CLOEXEC|O_CLOFORK (pre-fork): fd 149 discovered flags match (0x3)
TEST PASSED: pipe(2), O_CLOEXEC|O_CLOFORK (pre-fork): fd 150 discovered flags match (0x3)
TEST PASSED: socket(2), no flags (pre-fork): fd 151 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC (pre-fork): fd 152 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOFORK (pre-fork): fd 153 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK (pre-fork): fd 154 discovered flags match (0x3)
TEST PASSED: socket(2), no flags->accept() none (pre-fork): fd 155 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept() none (pre-fork): fd 156 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept() none (pre-fork): fd 157 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept() none (pre-fork): fd 158 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept() none (pre-fork): fd 159 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept() none (pre-fork): fd 160 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept() none (pre-fork): fd 161 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOFORK->accept() none (pre-fork): fd 162 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept() none (pre-fork): fd 163 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept() none (pre-fork): fd 164 discovered flags match (0x3)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept() none (pre-fork): fd 165 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept() none (pre-fork): fd 166 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() none (pre-fork): fd 167 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() none (pre-fork): fd 168 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() none (pre-fork): fd 169 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() none (pre-fork): fd 170 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() none (pre-fork): fd 171 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() none (pre-fork): fd 172 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() none (pre-fork): fd 173 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOFORK->accept4() none (pre-fork): fd 174 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() none (pre-fork): fd 175 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() none (pre-fork): fd 176 discovered flags match (0x3)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() none (pre-fork): fd 177 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() none (pre-fork): fd 178 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 179 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 180 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 181 discovered flags match (0x3)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 182 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 183 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 184 discovered flags match (0x3)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 185 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 186 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 187 discovered flags match (0x3)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 188 discovered flags match (0x3)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (pre-fork): fd 189 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_
6D40
CLOFORK|SOCK_CLOEXEC (pre-fork): fd 190 discovered flags match (0x3)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK (pre-fork): fd 191 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK (pre-fork): fd 192 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK (pre-fork): fd 193 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK (pre-fork): fd 194 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK (pre-fork): fd 195 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK (pre-fork): fd 196 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK (pre-fork): fd 197 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK (pre-fork): fd 198 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK (pre-fork): fd 199 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK (pre-fork): fd 200 discovered flags match (0x3)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK (pre-fork): fd 201 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK (pre-fork): fd 202 discovered flags match (0x2)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOEXEC (pre-fork): fd 203 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOEXEC (pre-fork): fd 204 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOEXEC (pre-fork): fd 205 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOEXEC (pre-fork): fd 206 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOEXEC (pre-fork): fd 207 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOEXEC (pre-fork): fd 208 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOEXEC (pre-fork): fd 209 discovered flags match (0x2)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOEXEC (pre-fork): fd 210 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOEXEC (pre-fork): fd 211 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOEXEC (pre-fork): fd 212 discovered flags match (0x3)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOEXEC (pre-fork): fd 213 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOEXEC (pre-fork): fd 214 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS none->none (pre-fork): fd 215 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->none (pre-fork): fd 216 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->none (pre-fork): fd 217 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->none (pre-fork): fd 218 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->none (pre-fork): fd 219 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->none (pre-fork): fd 220 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->none (pre-fork): fd 221 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->none (pre-fork): fd 222 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->none (pre-fork): fd 223 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->none (pre-fork): fd 224 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->none (pre-fork): fd 225 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->none (pre-fork): fd 226 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 227 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 228 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 229 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->none (pre-fork): fd 230 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC (pre-fork): fd 231 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC (pre-fork): fd 232 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC (pre-fork): fd 233 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC (pre-fork): fd 234 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC (pre-fork): fd 235 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC (pre-fork): fd 236 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC (pre-fork): fd 237 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC (pre-fork): fd 238 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC (pre-fork): fd 239 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC (pre-fork): fd 240 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC (pre-fork): fd 241 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC (pre-fork): fd 242 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC (pre-fork): fd 243 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC (pre-fork): fd 244 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC (pre-fork): fd 245 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC (pre-fork): fd 246 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS MSG_CMSG_CLOFORK->nMSG_CMSG_CLOFORK (pre-fork): fd 247 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS MSG_CMSG_CLOFORK->nMSG_CMSG_CLOFORK (pre-fork): fd 248 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS MSG_CMSG_CLOFORK->nMSG_CMSG_CLOFORK (pre-fork): fd 249 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS MSG_CMSG_CLOFORK->nMSG_CMSG_CLOFORK (pre-fork): fd 250 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOFORK (pre-fork): fd 251 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOFORK (pre-fork): fd 252 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOFORK (pre-fork): fd 253 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOFORK (pre-fork): fd 254 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOFORK (pre-fork): fd 255 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOFORK (pre-fork): fd 256 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOFORK (pre-fork): fd 257 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOFORK (pre-fork): fd 258 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOFORK (pre-fork): fd 259 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOFORK (pre-fork): fd 260 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOFORK (pre-fork): fd 261 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOFORK (pre-fork): fd 262 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 263 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 264 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 265 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 266 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 267 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 268 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 269 discovered flags match (0x2)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 270 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 271 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 272 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 273 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 274 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 275 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 276 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 277 discovered flags match (0x3)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (pre-fork): fd 278 discovered flags match (0x3)
TEST PASSED: open(2), no flags (post-fork): fd 3 discovered flags match (0x0)
TEST PASSED: open(2), O_CLOEXEC (post-fork): fd 4 discovered flags match (0x1)
TEST PASSED: open(2), O_CLOFORK (post-fork): fd 5: correctly closed
TEST PASSED: open(2), O_CLOEXEC|O_CLOFORK (post-fork): fd 6: correctly closed
TEST PASSED: fcntl(F_SETFD) no flags->no flags (post-fork): fd 7 discovered flags match (0x0)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK|O_CLOEXEC->no flags (post-fork): fd 8 discovered flags match (0x0)
TEST PASSED: fcntl(F_SETFD) O_CLOEXEC->no flags (post-fork): fd 9 discovered flags match (0x0)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK->no flags (post-fork): fd 10 discovered flags match (0x0)
TEST PASSED: fcntl(F_SETFD) no flags->O_CLOEXEC (post-fork): fd 11 discovered flags match (0x1)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK|O_CLOEXEC->O_CLOEXEC (post-fork): fd 12 discovered flags match (0x1)
TEST PASSED: fcntl(F_SETFD) O_CLOEXEC->O_CLOEXEC (post-fork): fd 13 discovered flags match (0x1)
TEST PASSED: fcntl(F_SETFD) O_CLOFORK->O_CLOEXEC (post-fork): fd 14 discovered flags match (0x1)
TEST PASSED: fcntl(F_SETFD) no flags->O_CLOFORK (post-fork): fd 15: correctly closed
TEST PASSED: fcntl(F_SETFD) O_CLOFORK|O_CLOEXEC->O_CLOFORK (post-fork): fd 16: correctly closed
TEST PASSED: fcntl(F_SETFD) O_CLOEXEC->O_CLOFORK (post-fork): fd 17: correctly closed
TEST PASSED: fcntl(F_SETFD) O_CLOFORK->O_CLOFORK (post-fork): fd 18: correctly closed
TEST PASSED: fcntl(F_SETFD) no flags->O_CLOFORK|O_CLOEXEC (post-fork): fd 19: correctly closed
TEST PASSED: fcntl(F_SETFD) O_CLOFORK|O_CLOEXEC->O_CLOFORK|O_CLOEXEC (post-fork): fd 20: correctly closed
TEST PASSED: fcntl(F_SETFD) O_CLOEXEC->O_CLOFORK|O_CLOEXEC (post-fork): fd 21: correctly closed
TEST PASSED: fcntl(F_SETFD) O_CLOFORK->O_CLOFORK|O_CLOEXEC (post-fork): fd 22: correctly closed
TEST PASSED: fcntl(F_DUPFD) none->none (post-fork): fd 23 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD) none->none (post-fork): fd 24 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD) FD_CLOEXEC->none (post-fork): fd 25 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD) FD_CLOEXEC->none (post-fork): fd 26 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD) FD_CLOFORK->none (post-fork): fd 27: correctly closed
TEST PASSED: fcntl(F_DUPFD) FD_CLOFORK->none (post-fork): fd 28 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD) FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 29: correctly closed
TEST PASSED: fcntl(F_DUPFD) FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 30 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) none (post-fork): fd 31 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) none (post-fork): fd 32: correctly closed
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOEXEC (post-fork): fd 33 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOEXEC (post-fork): fd 34: correctly closed
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOFORK (post-fork): fd 35: correctly closed
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOFORK (post-fork): fd 36: correctly closed
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOEXEC|FD_CLOFORK (post-fork): fd 37: correctly closed
TEST PASSED: fcntl(F_DUPFD_CLOFORK) FD_CLOEXEC|FD_CLOFORK (post-fork): fd 38: correctly closed
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) none (post-fork): fd 39 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) none (post-fork): fd 40 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOEXEC (post-fork): fd 41 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOEXEC (post-fork): fd 42 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOFORK (post-fork): fd 43: correctly closed
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOFORK (post-fork): fd 44 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOEXEC|FD_CLOFORK (post-fork): fd 45: correctly closed
TEST PASSED: fcntl(F_DUPFD_CLOEXEC) FD_CLOEXEC|FD_CLOFORK (post-fork): fd 46 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD) none->none (post-fork): fd 47 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD) none->none (post-fork): fd 48 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOEXEC->none (post-fork): fd 49 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOEXEC->none (post-fork): fd 50 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOFORK->none (post-fork): fd 51: correctly closed
TEST PASSED: fcntl(F_DUP2FD) FD_CLOFORK->none (post-fork): fd 52 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD) FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 53: correctly closed
TEST PASSED: fcntl(F_DUP2FD) FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 54 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) none (post-fork): fd 55 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) none (post-fork): fd 56: correctly closed
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOEXEC (post-fork): fd 57 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOEXEC (post-fork): fd 58: correctly closed
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOFORK (post-fork): fd 59: correctly closed
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOFORK (post-fork): fd 60: correctly closed
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOEXEC|FD_CLOFORK (post-fork): fd 61: correctly closed
TEST PASSED: fcntl(F_DUP2FD_CLOFORK) FD_CLOEXEC|FD_CLOFORK (post-fork): fd 62: correctly closed
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) none (post-fork): fd 63 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) none (post-fork): fd 64 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOEXEC (post-fork): fd 65 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOEXEC (post-fork): fd 66 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOFORK (post-fork): fd 67: correctly closed
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOFORK (post-fork): fd 68 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOEXEC|FD_CLOFORK (post-fork): fd 69: correctly closed
TEST PASSED: fcntl(F_DUP2FD_CLOEXEC) FD_CLOEXEC|FD_CLOFORK (post-fork): fd 70 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) none->none (post-fork): fd 71 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->none (post-fork): fd 72 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->none (post-fork): fd 73 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->none (post-fork): fd 74 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->none (post-fork): fd 75: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->none (post-fork): fd 76 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 77: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 78 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOEXEC (post-fork): fd 79 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOEXEC (post-fork): fd 80 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOEXEC (post-fork): fd 81 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOEXEC (post-fork): fd 82 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOEXEC (post-fork): fd 83: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOEXEC (post-fork): fd 84 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOEXEC (post-fork): fd 85: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOEXEC (post-fork): fd 86 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 87 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 88: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 89 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 90: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 91: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 92: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 93: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 94: correctly closed
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOFORK (post-fork): fd 95 discovered flags match (0x0)
TEST PASSED: fcntl(F_DUP3FD) none->FD_CLOFORK (post-fork): fd 96: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOFORK (post-fork): fd 97 discovered flags match (0x1)
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC->FD_CLOFORK (post-fork): fd 98: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOFORK (post-fork): fd 99: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOFORK->FD_CLOFORK (post-fork): fd 100: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK (post-fork): fd 101: correctly closed
TEST PASSED: fcntl(F_DUP3FD) FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK (post-fork): fd 102: correctly closed
TEST PASSED: dup2() none->none (post-fork): fd 103 discovered flags match (0x0)
TEST PASSED: dup2() none->none (post-fork): fd 104 discovered flags match (0x0)
TEST PASSED: dup2() FD_CLOEXEC->none (post-fork): fd 105 discovered flags match (0x1)
TEST PASSED: dup2() FD_CLOEXEC->none (post-fork): fd 106 discovered flags match (0x0)
TEST PASSED: dup2() FD_CLOFORK->none (post-fork): fd 107: correctly closed
TEST PASSED: dup2() FD_CLOFORK->none (post-fork): fd 108 discovered flags match (0x0)
TEST PASSED: dup2() FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 109: correctly closed
TEST PASSED: dup2() FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 110 discovered flags match (0x0)
TEST PASSED: dup3() none->none (post-fork): fd 111 discovered flags match (0x0)
TEST PASSED: dup3() none->none (post-fork): fd 112 discovered flags match (0x0)
TEST PASSED: dup3() FD_CLOEXEC->none (post-fork): fd 113 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->none (post-fork): fd 114 discovered flags match (0x0)
TEST PASSED: dup3() FD_CLOFORK->none (post-fork): fd 115: correctly closed
TEST PASSED: dup3() FD_CLOFORK->none (post-fork): fd 116 discovered flags match (0x0)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 117: correctly closed
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 118 discovered flags match (0x0)
TEST PASSED: dup3() none->FD_CLOEXEC (post-fork): fd 119 discovered flags match (0x0)
TEST PASSED: dup3() none->FD_CLOEXEC (post-fork): fd 120 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOEXEC (post-fork): fd 121 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOEXEC (post-fork): fd 122 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOFORK->FD_CLOEXEC (post-fork): fd 123: correctly closed
TEST PASSED: dup3() FD_CLOFORK->FD_CLOEXEC (post-fork): fd 124 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOEXEC (post-fork): fd 125: correctly closed
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOEXEC (post-fork): fd 126 discovered flags match (0x1)
TEST PASSED: dup3() none->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 127 discovered flags match (0x0)
TEST PASSED: dup3() none->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 128: correctly closed
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 129 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 130: correctly closed
TEST PASSED: dup3() FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 131: correctly closed
TEST PASSED: dup3() FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 132: correctly closed
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 133: correctly closed
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK|FD_CLOEXEC (post-fork): fd 134: correctly closed
TEST PASSED: dup3() none->FD_CLOFORK (post-fork): fd 135 discovered flags match (0x0)
TEST PASSED: dup3() none->FD_CLOFORK (post-fork): fd 136: correctly closed
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOFORK (post-fork): fd 137 discovered flags match (0x1)
TEST PASSED: dup3() FD_CLOEXEC->FD_CLOFORK (post-fork): fd 138: correctly closed
TEST PASSED: dup3() FD_CLOFORK->FD_CLOFORK (post-fork): fd 139: correctly closed
TEST PASSED: dup3() FD_CLOFORK->FD_CLOFORK (post-fork): fd 140: correctly closed
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK (post-fork): fd 141: correctly closed
TEST PASSED: dup3() FD_CLOEXEC|FD_CLOFORK->FD_CLOFORK (post-fork): fd 142: correctly closed
TEST PASSED: pipe(2), no flags (post-fork): fd 143 discovered flags match (0x0)
TEST PASSED: pipe(2), no flags (post-fork): fd 144 discovered flags match (0x0)
TEST PASSED: pipe(2), O_CLOEXEC (post-fork): fd 145 discovered flags match (0x1)
TEST PASSED: pipe(2), O_CLOEXEC (post-fork): fd 146 discovered flags match (0x1)
TEST PASSED: pipe(2), O_CLOFORK (post-fork): fd 147: correctly closed
TEST PASSED: pipe(2), O_CLOFORK (post-fork): fd 148: correctly closed
TEST PASSED: pipe(2), O_CLOEXEC|O_CLOFORK (post-fork): fd 149: correctly closed
TEST PASSED: pipe(2), O_CLOEXEC|O_CLOFORK (post-fork): fd 150: correctly closed
TEST PASSED: socket(2), no flags (post-fork): fd 151 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC (post-fork): fd 152 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOFORK (post-fork): fd 153: correctly closed
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK (post-fork): fd 154: correctly closed
TEST PASSED: socket(2), no flags->accept() none (post-fork): fd 155 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept() none (post-fork): fd 156 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept() none (post-fork): fd 157 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept() none (post-fork): fd 158 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept() none (post-fork): fd 159 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept() none (post-fork): fd 160 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept() none (post-fork): fd 161: correctly closed
TEST PASSED: socket(2), O_CLOFORK->accept() none (post-fork): fd 162 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept() none (post-fork): fd 163 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept() none (post-fork): fd 164: correctly closed
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept() none (post-fork): fd 165 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept() none (post-fork): fd 166 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() none (post-fork): fd 167 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() none (post-fork): fd 168 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() none (post-fork): fd 169 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() none (post-fork): fd 170 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() none (post-fork): fd 171 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() none (post-fork): fd 172 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() none (post-fork): fd 173: correctly closed
TEST PASSED: socket(2), O_CLOFORK->accept4() none (post-fork): fd 174 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() none (post-fork): fd 175 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() none (post-fork): fd 176: correctly closed
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() none (post-fork): fd 177 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() none (post-fork): fd 178 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 179 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 180 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 181: correctly closed
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 182 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 183 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 184: correctly closed
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 185: correctly closed
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 186 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 187: correctly closed
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 188: correctly closed
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 189 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK|SOCK_CLOEXEC (post-fork): fd 190: correctly closed
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK (post-fork): fd 191 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK (post-fork): fd 192 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOFORK (post-fork): fd 193: correctly closed
TEST PASSED: socket(2), O_CLOEXEC->accept4() SO
9E88
CK_CLOFORK (post-fork): fd 194 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK (post-fork): fd 195 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOFORK (post-fork): fd 196: correctly closed
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK (post-fork): fd 197: correctly closed
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK (post-fork): fd 198 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOFORK (post-fork): fd 199: correctly closed
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK (post-fork): fd 200: correctly closed
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK (post-fork): fd 201 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOFORK (post-fork): fd 202: correctly closed
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOEXEC (post-fork): fd 203 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOEXEC (post-fork): fd 204 discovered flags match (0x0)
TEST PASSED: socket(2), no flags->accept4() SOCK_CLOEXEC (post-fork): fd 205 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOEXEC (post-fork): fd 206 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOEXEC (post-fork): fd 207 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC->accept4() SOCK_CLOEXEC (post-fork): fd 208 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOEXEC (post-fork): fd 209: correctly closed
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOEXEC (post-fork): fd 210 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOFORK->accept4() SOCK_CLOEXEC (post-fork): fd 211 discovered flags match (0x1)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOEXEC (post-fork): fd 212: correctly closed
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOEXEC (post-fork): fd 213 discovered flags match (0x0)
TEST PASSED: socket(2), O_CLOEXEC|O_CLOFORK->accept4() SOCK_CLOEXEC (post-fork): fd 214 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS none->none (post-fork): fd 215 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->none (post-fork): fd 216 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->none (post-fork): fd 217 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->none (post-fork): fd 218 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->none (post-fork): fd 219: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->none (post-fork): fd 220: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->none (post-fork): fd 221: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->none (post-fork): fd 222 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->none (post-fork): fd 223 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->none (post-fork): fd 224 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->none (post-fork): fd 225 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->none (post-fork): fd 226 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 227: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 228: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 229: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->none (post-fork): fd 230 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC (post-fork): fd 231 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC (post-fork): fd 232 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC (post-fork): fd 233 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC (post-fork): fd 234 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC (post-fork): fd 235: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC (post-fork): fd 236: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC (post-fork): fd 237: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC (post-fork): fd 238 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC (post-fork): fd 239 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC (post-fork): fd 240 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC (post-fork): fd 241 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC (post-fork): fd 242 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC (post-fork): fd 243: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC (post-fork): fd 244: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC (post-fork): fd 245: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC (post-fork): fd 246 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS MSG_CMSG_CLOFORK->nMSG_CMSG_CLOFORK (post-fork): fd 247 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS MSG_CMSG_CLOFORK->nMSG_CMSG_CLOFORK (post-fork): fd 248 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS MSG_CMSG_CLOFORK->nMSG_CMSG_CLOFORK (post-fork): fd 249 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS MSG_CMSG_CLOFORK->nMSG_CMSG_CLOFORK (post-fork): fd 250: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOFORK (post-fork): fd 251: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOFORK (post-fork): fd 252: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOFORK (post-fork): fd 253: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOFORK (post-fork): fd 254: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOFORK (post-fork): fd 255 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOFORK (post-fork): fd 256 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOFORK (post-fork): fd 257 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOFORK (post-fork): fd 258: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOFORK (post-fork): fd 259: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOFORK (post-fork): fd 260: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOFORK (post-fork): fd 261: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOFORK (post-fork): fd 262: correctly closed
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 263 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 264 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 265 discovered flags match (0x0)
TEST PASSED: SCM_RIGHTS none->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 266: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 267: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 268: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 269: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 270: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 271 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 272 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 273 discovered flags match (0x1)
TEST PASSED: SCM_RIGHTS FD_CLOEXEC->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 274: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 275: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 276: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 277: correctly closed
TEST PASSED: SCM_RIGHTS FD_CLOEXEC|FD_CLOFORK->MSG_CMSG_CLOEXEC|MSG_CMSG_CLOFORK (post-fork): fd 278: correctly closed
TEST PASSED: post-exec fd 3: flags 0x0: successfully matched
TEST PASSED: post-exec fd 4: flags 0x1: correctly closed
TEST PASSED: post-exec fd 5: flags 0x2: successfully matched
TEST PASSED: post-exec fd 6: flags 0x3: correctly closed
TEST PASSED: post-exec fd 7: flags 0x0: successfully matched
TEST PASSED: post-exec fd 8: flags 0x0: successfully matched
TEST PASSED: post-exec fd 9: flags 0x0: successfully matched
TEST PASSED: post-exec fd 10: flags 0x0: successfully matched
TEST PASSED: post-exec fd 11: flags 0x1: correctly closed
TEST PASSED: post-exec fd 12: flags 0x1: correctly closed
TEST PASSED: post-exec fd 13: flags 0x1: correctly closed
TEST PASSED: post-exec fd 14: flags 0x1: correctly closed
TEST PASSED: post-exec fd 15: flags 0x2: successfully matched
TEST PASSED: post-exec fd 16: flags 0x2: successfully matched
TEST PASSED: post-exec fd 17: flags 0x2: successfully matched
TEST PASSED: post-exec fd 18: flags 0x2: successfully matched
TEST PASSED: post-exec fd 19: flags 0x3: correctly closed
TEST PASSED: post-exec fd 20: flags 0x3: correctly closed
TEST PASSED: post-exec fd 21: flags 0x3: correctly closed
TEST PASSED: post-exec fd 22: flags 0x3: correctly closed
TEST PASSED: post-exec fd 23: flags 0x0: successfully matched
TEST PASSED: post-exec fd 24: flags 0x0: successfully matched
TEST PASSED: post-exec fd 25: flags 0x1: correctly closed
TEST PASSED: post-exec fd 26: flags 0x0: successfully matched
TEST PASSED: post-exec fd 27: flags 0x2: successfully matched
TEST PASSED: post-exec fd 28: flags 0x0: successfully matched
TEST PASSED: post-exec fd 29: flags 0x3: correctly closed
TEST PASSED: post-exec fd 30: flags 0x0: successfully matched
TEST PASSED: post-exec fd 31: flags 0x0: successfully matched
TEST PASSED: post-exec fd 32: flags 0x2: successfully matched
TEST PASSED: post-exec fd 33: flags 0x1: correctly closed
TEST PASSED: post-exec fd 34: flags 0x2: successfully matched
TEST PASSED: post-exec fd 35: flags 0x2: successfully matched
TEST PASSED: post-exec fd 36: flags 0x2: successfully matched
TEST PASSED: post-exec fd 37: flags 0x3: correctly closed
TEST PASSED: post-exec fd 38: flags 0x2: successfully matched
TEST PASSED: post-exec fd 39: flags 0x0: successfully matched
TEST PASSED: post-exec fd 40: flags 0x1: correctly closed
TEST PASSED: post-exec fd 41: flags 0x1: correctly closed
TEST PASSED: post-exec fd 42: flags 0x1: correctly closed
TEST PASSED: post-exec fd 43: flags 0x2: successfully matched
TEST PASSED: post-exec fd 44: flags 0x1: correctly closed
TEST PASSED: post-exec fd 45: flags 0x3: correctly closed
TEST PASSED: post-exec fd 46: flags 0x1: correctly closed
TEST PASSED: post-exec fd 47: flags 0x0: successfully matched
TEST PASSED: post-exec fd 48: flags 0x0: successfully matched
TEST PASSED: post-exec fd 49: flags 0x1: correctly closed
TEST PASSED: post-exec fd 50: flags 0x0: successfully matched
TEST PASSED: post-exec fd 51: flags 0x2: successfully matched
TEST PASSED: post-exec fd 52: flags 0x0: successfully matched
TEST PASSED: post-exec fd 53: flags 0x3: correctly closed
TEST PASSED: post-exec fd 54: flags 0x0: successfully matched
TEST PASSED: post-exec fd 55: flags 0x0: successfully matched
TEST PASSED: post-exec fd 56: flags 0x2: successfully matched
TEST PASSED: post-exec fd 57: flags 0x1: correctly closed
TEST PASSED: post-exec fd 58: flags 0x2: successfully matched
TEST PASSED: post-exec fd 59: flags 0x2: successfully matched
TEST PASSED: post-exec fd 60: flags 0x2: successfully matched
TEST PASSED: post-exec fd 61: flags 0x3: correctly closed
TEST PASSED: post-exec fd 62: flags 0x2: successfully matched
TEST PASSED: post-exec fd 63: flags 0x0: successfully matched
TEST PASSED: post-exec fd 64: flags 0x1: correctly closed
TEST PASSED: post-exec fd 65: flags 0x1: correctly closed
TEST PASSED: post-exec fd 66: flags 0x1: correctly closed
TEST PASSED: post-exec fd 67: flags 0x2: successfully matched
TEST PASSED: post-exec fd 68: flags 0x1: correctly closed
TEST PASSED: post-exec fd 69: flags 0x3: correctly closed
TEST PASSED: post-exec fd 70: flags 0x1: correctly closed
TEST PASSED: post-exec fd 71: flags 0x0: successfully matched
TEST PASSED: post-exec fd 72: flags 0x0: successfully matched
TEST PASSED: post-exec fd 73: flags 0x1: correctly closed
TEST PASSED: post-exec fd 74: flags 0x0: successfully matched
TEST PASSED: post-exec fd 75: flags 0x2: successfully matched
TEST PASSED: post-exec fd 76: flags 0x0: successfully matched
TEST PASSED: post-exec fd 77: flags 0x3: correctly closed
TEST PASSED: post-exec fd 78: flags 0x0: successfully matched
TEST PASSED: post-exec fd 79: flags 0x0: successfully matched
TEST PASSED: post-exec fd 80: flags 0x1: correctly closed
TEST PASSED: post-exec fd 81: flags 0x1: correctly closed
TEST PASSED: post-exec fd 82: flags 0x1: correctly closed
TEST PASSED: post-exec fd 83: flags 0x2: successfully matched
TEST PASSED: post-exec fd 84: flags 0x1: correctly closed
TEST PASSED: post-exec fd 85: flags 0x3: correctly closed
TEST PASSED: post-exec fd 86: flags 0x1: correctly closed
TEST PASSED: post-exec fd 87: flags 0x0: successfully matched
TEST PASSED: post-exec fd 88: flags 0x3: correctly closed
TEST PASSED: post-exec fd 89: flags 0x1: correctly closed
TEST PASSED: post-exec fd 90: flags 0x3: correctly closed
TEST PASSED: post-exec fd 91: flags 0x2: successfully matched
TEST PASSED: post-exec fd 92: flags 0x3: correctly closed
TEST PASSED: post-exec fd 93: flags 0x3: correctly closed
TEST PASSED: post-exec fd 94: flags 0x3: correctly closed
TEST PASSED: post-exec fd 95: flags 0x0: successfully matched
TEST PASSED: post-exec fd 96: flags 0x2: successfully matched
TEST PASSED: post-exec fd 97: flags 0x1: correctly closed
TEST PASSED: post-exec fd 98: flags 0x2: successfully matched
TEST PASSED: post-exec fd 99: flags 0x2: successfully matched
TEST PASSED: post-exec fd 100: flags 0x2: successfully matched
TEST PASSED: post-exec fd 101: flags 0x3: correctly closed
TEST PASSED: post-exec fd 102: flags 0x2: successfully matched
TEST PASSED: post-exec fd 103: flags 0x0: successfully matched
TEST PASSED: post-exec fd 104: flags 0x0: successfully matched
TEST PASSED: post-exec fd 105: flags 0x1: correctly closed
TEST PASSED: post-exec fd 106: flags 0x0: successfully matched
TEST PASSED: post-exec fd 107: flags 0x2: successfully matched
TEST PASSED: post-exec fd 108: flags 0x0: successfully matched
TEST PASSED: post-exec fd 109: flags 0x3: correctly closed
TEST PASSED: post-exec fd 110: flags 0x0: successfully matched
TEST PASSED: post-exec fd 111: flags 0x0: successfully matched
TEST PASSED: post-exec fd 112: flags 0x0: successfully matched
TEST PASSED: post-exec fd 113: flags 0x1: correctly closed
TEST PASSED: post-exec fd 114: flags 0x0: successfully matched
TEST PASSED: post-exec fd 115: flags 0x2: successfully matched
TEST PASSED: post-exec fd 116: flags 0x0: successfully matched
TEST PASSED: post-exec fd 117: flags 0x3: correctly closed
TEST PASSED: post-exec fd 118: flags 0x0: successfully matched
TEST PASSED: post-exec fd 119: flags 0x0: successfully matched
TEST PASSED: post-exec fd 120: flags 0x1: correctly closed
TEST PASSED: post-exec fd 121: flags 0x1: correctly closed
TEST PASSED: post-exec fd 122: flags 0x1: correctly closed
TEST PASSED: post-exec fd 123: flags 0x2: successfully matched
TEST PASSED: post-exec fd 124: flags 0x1: correctly closed
TEST PASSED: post-exec fd 125: flags 0x3: correctly closed
TEST PASSED: post-exec fd 126: flags 0x1: correctly closed
TEST PASSED: post-exec fd 127: flags 0x0: successfully matched
TEST PASSED: post-exec fd 128: flags 0x3: correctly closed
TEST PASSED: post-exec fd 129: flags 0x1: correctly closed
TEST PASSED: post-exec fd 130: flags 0x3: correctly closed
TEST PASSED: post-exec fd 131: flags 0x2: successfully matched
TEST PASSED: post-exec fd 132: flags 0x3: correctly closed
TEST PASSED: post-exec fd 133: flags 0x3: correctly closed
TEST PASSED: post-exec fd 134: flags 0x3: correctly closed
TEST PASSED: post-exec fd 135: flags 0x0: successfully matched
TEST PASSED: post-exec fd 136: flags 0x2: successfully matched
TEST PASSED: post-exec fd 137: flags 0x1: correctly closed
TEST PASSED: post-exec fd 138: flags 0x2: successfully matched
TEST PASSED: post-exec fd 139: flags 0x2: successfully matched
TEST PASSED: post-exec fd 140: flags 0x2: successfully matched
TEST PASSED: post-exec fd 141: flags 0x3: correctly closed
TEST PASSED: post-exec fd 142: flags 0x2: successfully matched
TEST PASSED: post-exec fd 143: flags 0x0: successfully matched
TEST PASSED: post-exec fd 144: flags 0x0: successfully matched
TEST PASSED: post-exec fd 145: flags 0x1: correctly closed
TEST PASSED: post-exec fd 146: flags 0x1: correctly closed
TEST PASSED: post-exec fd 147: flags 0x2: successfully matched
TEST PASSED: post-exec fd 148: flags 0x2: successfully matched
TEST PASSED: post-exec fd 149: flags 0x3: correctly closed
TEST PASSED: post-exec fd 150: flags 0x3: correctly closed
TEST PASSED: post-exec fd 151: flags 0x0: successfully matched
TEST PASSED: post-exec fd 152: flags 0x1: correctly closed
TEST PASSED: post-exec fd 153: flags 0x2: successfully matched
TEST PASSED: post-exec fd 154: flags 0x3: correctly closed
TEST PASSED: post-exec fd 155: flags 0x0: successfully matched
TEST PASSED: post-exec fd 156: flags 0x0: successfully matched
TEST PASSED: post-exec fd 157: flags 0x0: successfully matched
TEST PASSED: post-exec fd 158: flags 0x1: correctly closed
TEST PASSED: post-exec fd 159: flags 0x0: successfully matched
TEST PASSED: post-exec fd 160: flags 0x0: successfully matched
TEST PASSED: post-exec fd 161: flags 0x2: successfully matched
TEST PASSED: post-exec fd 162: flags 0x0: successfully matched
TEST PASSED: post-exec fd 163: flags 0x0: successfully matched
TEST PASSED: post-exec fd 164: flags 0x3: correctly closed
TEST PASSED: post-exec fd 165: flags 0x0: successfully matched
TEST PASSED: post-exec fd 166: flags 0x0: successfully matched
TEST PASSED: post-exec fd 167: flags 0x0: successfully matched
TEST PASSED: post-exec fd 168: flags 0x0: successfully matched
TEST PASSED: post-exec fd 169: flags 0x0: successfully matched
TEST PASSED: post-exec fd 170: flags 0x1: correctly closed
TEST PASSED: post-exec fd 171: flags 0x0: successfully matched
TEST PASSED: post-exec fd 172: flags 0x0: successfully matched
TEST PASSED: post-exec fd 173: flags 0x2: successfully matched
TEST PASSED: post-exec fd 174: flags 0x0: successfully matched
TEST PASSED: post-exec fd 175: flags 0x0: successfully matched
TEST PASSED: post-exec fd 176: flags 0x3: correctly closed
TEST PASSED: post-exec fd 177: flags 0x0: successfully matched
TEST PASSED: post-exec fd 178: flags 0x0: successfully matched
TEST PASSED: post-exec fd 179: flags 0x0: successfully matched
TEST PASSED: post-exec fd 180: flags 0x0: successfully matched
TEST PASSED: post-exec fd 181: flags 0x3: correctly closed
TEST PASSED: post-exec fd 182: flags 0x1: correctly closed
TEST PASSED: post-exec fd 183: flags 0x0: successfully matched
TEST PASSED: post-exec fd 184: flags 0x3: correctly closed
TEST PASSED: post-exec fd 185: flags 0x2: successfully matched
TEST PASSED: post-exec fd 186: flags 0x0: successfully matched
TEST PASSED: post-exec fd 187: flags 0x3: correctly closed
TEST PASSED: post-exec fd 188: flags 0x3: correctly closed
TEST PASSED: post-exec fd 189: flags 0x0: successfully matched
TEST PASSED: post-exec fd 190: flags 0x3: correctly closed
TEST PASSED: post-exec fd 191: flags 0x0: successfully matched
TEST PASSED: post-exec fd 192: flags 0x0: successfully matched
TEST PASSED: post-exec fd 193: flags 0x2: successfully matched
TEST PASSED: post-exec fd 194: flags 0x1: correctly closed
TEST PASSED: post-exec fd 195: flags 0x0: successfully matched
TEST PASSED: post-exec fd 196: flags 0x2: successfully matched
TEST PASSED: post-exec fd 197: flags 0x2: successfully matched
TEST PASSED: post-exec fd 198: flags 0x0: successfully matched
TEST PASSED: post-exec fd 199: flags 0x2: successfully matched
TEST PASSED: post-exec fd 200: flags 0x3: correctly closed
TEST PASSED: post-exec fd 201: flags 0x0: successfully matched
TEST PASSED: post-exec fd 202: flags 0x2: successfully matched
TEST PASSED: post-exec fd 203: flags 0x0: successfully matched
TEST PASSED: post-exec fd 204: flags 0x0: successfully matched
TEST PASSED: post-exec fd 205: flags 0x1: correctly closed
TEST PASSED: post-exec fd 206: flags 0x1: correctly closed
TEST PASSED: post-exec fd 207: flags 0x0: successfully matched
TEST PASSED: post-exec fd 208: flags 0x1: correctly closed
TEST PASSED: post-exec fd 209: flags 0x2: successfully matched
TEST PASSED: post-exec fd 210: flags 0x0: successfully matched
TEST PASSED: post-exec fd 211: flags 0x1: correctly closed
TEST PASSED: post-exec fd 212: flags 0x3: correctly closed
TEST PASSED: post-exec fd 213: flags 0x0: successfully matched
TEST PASSED: post-exec fd 214: flags 0x1: correctly closed
TEST PASSED: post-exec fd 215: flags 0x0: successfully matched
TEST PASSED: post-exec fd 216: flags 0x0: successfully matched
TEST PASSED: post-exec fd 217: flags 0x0: successfully matched
TEST PASSED: post-exec fd 218: flags 0x0: successfully matched
TEST PASSED: post-exec fd 219: flags 0x2: successfully matched
TEST PASSED: post-exec fd 220: flags 0x2: successfully matched
TEST PASSED: post-exec fd 221: flags 0x2: successfully matched
TEST PASSED: post-exec fd 222: flags 0x0: successfully matched
TEST PASSED: post-exec fd 223: flags 0x1: correctly closed
TEST PASSED: post-exec fd 224: flags 0x1: correctly closed
TEST PASSED: post-exec fd 225: flags 0x1: correctly closed
TEST PASSED: post-exec fd 226: flags 0x0: successfully matched
TEST PASSED: post-exec fd 227: flags 0x3: correctly closed
TEST PASSED: post-exec fd 228: flags 0x3: correctly closed
TEST PASSED: post-exec fd 229: flags 0x3: correctly closed
TEST PASSED: post-exec fd 230: flags 0x0: successfully matched
TEST PASSED: post-exec fd 231: flags 0x0: successfully matched
TEST PASSED: post-exec fd 232: flags 0x0: successfully matched
TEST PASSED: post-exec fd 233: flags 0x0: successfully matched
TEST PASSED: post-exec fd 234: flags 0x1: correctly closed
TEST PASSED: post-exec fd 235: flags 0x2: successfully matched
TEST PASSED: post-exec fd 236: flags 0x2: successfully matched
TEST PASSED: post-exec fd 237: flags 0x2: successfully matched
TEST PASSED: post-exec fd 238: flags 0x1: correctly closed
TEST PASSED: post-exec fd 239: flags 0x1: correctly closed
TEST PASSED: post-exec fd 240: flags 0x1: correctly closed
TEST PASSED: post-exec fd 241: flags 0x1: correctly closed
TEST PASSED: post-exec fd 242: flags 0x1: correctly closed
TEST PASSED: post-exec fd 243: flags 0x3: correctly closed
TEST PASSED: post-exec fd 244: flags 0x3: correctly closed
TEST PASSED: post-exec fd 245: flags 0x3: correctly closed
TEST PASSED: post-exec fd 246: flags 0x1: correctly closed
TEST PASSED: post-exec fd 247: flags 0x0: successfully matched
TEST PASSED: post-exec fd 248: flags 0x0: successfully matched
TEST PASSED: post-exec fd 249: flags 0x0: successfully matched
TEST PASSED: post-exec fd 250: flags 0x2: successfully matched
TEST PASSED: post-exec fd 251: flags 0x2: successfully matched
TEST PASSED: post-exec fd 252: flags 0x2: successfully matched
TEST PASSED: post-exec fd 253: flags 0x2: successfully matched
TEST PASSED: post-exec fd 254: flags 0x2: successfully matched
TEST PASSED: post-exec fd 255: flags 0x1: correctly closed
TEST PASSED: post-exec fd 256: flags 0x1: correctly closed
TEST PASSED: post-exec fd 257: flags 0x1: correctly closed
TEST PASSED: post-exec fd 258: flags 0x2: successfully matched
TEST PASSED: post-exec fd 259: flags 0x3: correctly closed
TEST PASSED: post-exec fd 260: flags 0x3: correctly closed
TEST PASSED: post-exec fd 261: flags 0x3: correctly closed
TEST PASSED: post-exec fd 262: flags 0x2: successfully matched
TEST PASSED: post-exec fd 263: flags 0x0: successfully matched
TEST PASSED: post-exec fd 264: flags 0x0: successfully matched
TEST PASSED: post-exec fd 265: flags 0x0: successfully matched
TEST PASSED: post-exec fd 266: flags 0x3: correctly closed
TEST PASSED: post-exec fd 267: flags 0x2: successfully matched
TEST PASSED: post-exec fd 268: flags 0x2: successfully matched
TEST PASSED: post-exec fd 269: flags 0x2: successfully matched
TEST PASSED: post-exec fd 270: flags 0x3: correctly closed
TEST PASSED: post-exec fd 271: flags 0x1: correctly closed
TEST PASSED: post-exec fd 272: flags 0x1: correctly closed
TEST PASSED: post-exec fd 273: flags 0x1: correctly closed
TEST PASSED: post-exec fd 274: flags 0x3: correctly closed
TEST PASSED: post-exec fd 275: flags 0x3: correctly closed
TEST PASSED: post-exec fd 276: flags 0x3: correctly closed
TEST PASSED: post-exec fd 277: flags 0x3: correctly closed
TEST PASSED: post-exec fd 278: flags 0x3: correctly closed
All tests passed successfully

@markjdb
Copy link
Member
markjdb commented May 18, 2025

CDDL-licensed code from illumos should be placed under cddl/contrib/opensolaris. It's ok for the build outputs to be installed under /usr/tests, but the code should be excluded from the build if WITHOUT_CDDL= is defined in src.conf.

The build is not done automatically. To test:

cd /usr/src/cddl/contrib/opensolaris/tests/oclo
make
sudo make install
/usr/tests/bin/oclo

Why not build it automatically? If it's not connected to the build, we won't catch regressions easily.

@ricardobranco777
Copy link
Contributor Author

CDDL-licensed code from illumos should be placed under cddl/contrib/opensolaris. It's ok for the build outputs to be installed under /usr/tests, but the code should be excluded from the build if WITHOUT_CDDL= is defined in src.conf.

The build is not done automatically. To test:

cd /usr/src/cddl/contrib/opensolaris/tests/oclo
make
sudo make install
/usr/tests/bin/oclo

Why not build it automatically? If it's not connected to the build, we won't catch regressions easily.

It now builds but doesn't run automatically because oclo_errors fails for the reason stated above.

@ricardobranco777
Copy link
Contributor Author

CDDL-licensed code from illumos should be placed under cddl/contrib/opensolaris. It's ok for the build outputs to be installed under /usr/tests, but the code should be excluded from the build if WITHOUT_CDDL= is defined in src.conf.

The build is not done automatically. To test:

cd /usr/src/cddl/contrib/opensolaris/tests/oclo
make
sudo make install
/usr/tests/bin/oclo

Why not build it automatically? If it's not connected to the build, we won't catch regressions easily.

It now builds but doesn't run automatically because oclo_errors fails for the reason stated above.

It's ok to modify the test code to add or exclude checks, typically with #ifdef __FreeBSD__.

I just used #if 0 since the adaptation to FreeBSD was done on a separate commit and people can quickly check the changes.

I see the checkworld target uses kyua but this test is different. What do you suggest here?

@markjdb
Copy link
Member
markjdb commented May 22, 2025

CDDL-licensed code from illumos should be placed under cddl/contrib/opensolaris. It's ok for the build outputs to be installed under /usr/tests, but the code should be excluded from the build if WITHOUT_CDDL= is defined in src.conf.

The build is not done automatically. To test:

cd /usr/src/cddl/contrib/opensolaris/tests/oclo
make
sudo make install
/usr/tests/bin/oclo

Why not build it automatically? If it's not connected to the build, we won't catch regressions easily.

It now builds but doesn't run automatically because oclo_errors fails for the reason stated above.

It's ok to modify the test code to add or exclude checks, typically with #ifdef __FreeBSD__.

I just used #if 0 since the adaptation to FreeBSD was done on a separate commit and people can quickly check the changes.

I see the checkworld target uses kyua but this test is different. What do you suggest here?

kyua is a test runner that can ingest outputs from different testing protocols (TAP, ATF, googletest, ...).

It looks like oclo just prints results to stdout and uses its exit status to indicate whether all tests passed or not? If so, I think you can try building it with PLAIN_TESTS_C and kyua will simply run the executable and look at its exit status.

@ricardobranco777
Copy link
Contributor Author

kyua is a test runner that can ingest outputs from different testing protocols (TAP, ATF, googletest, ...).

It looks like oclo just prints results to stdout and uses its exit status to indicate whether all tests passed or not? If so, I think you can try building it with PLAIN_TESTS_C and kyua will simply run the executable and look at its exit status.

That worked out beautifully. I'm beginning to like kyua.

Copy link
Member
@kostikbel kostikbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically the thing that I very much hate about dup3(), you get 2^n ops when you start adding flags.
I do not think this part is sustainable. Some scalable design is needed there.

A possible solution is to define some new fcntl op with a code, say F_DUP3 23. Then, if none of the direct comparision of fcntl op with existing ops succeeds, we mask out top 16 bits from ops and see if result is eq to F_DUP3. If it is, then top 16 bits are interpreted as flags, and we put there CLOEXEC, your new CLOFORK, and have 14 more bits to tweak fd flags if any are grown.

@ricardobranco777 ricardobranco777 force-pushed the oclofork branch 11 times, most recently from aa83673 to 3b9c824 Compare May 27, 2025 21:17
@ricardobranco777
Copy link
Contributor Author
ricardobranco777 commented May 27, 2025

This is basically the thing that I very much hate about dup3(), you get 2^n ops when you start adding flags. I do not think this part is sustainable. Some scalable design is needed there.

A possible solution is to define some new fcntl op with a code, say F_DUP3 23. Then, if none of the direct comparision of fcntl op with existing ops succeeds, we mask out top 16 bits from ops and see if result is eq to F_DUP3. If it is, then top 16 bits are interpreted as flags, and we put there CLOEXEC, your new CLOFORK, and have 14 more bits to tweak fd flags if any are grown.

I implemented your proposal, which is better than using CLOBOTH. All the tests are passing.

The only downside is that the semantics of F_DUP3FD are not fully compatible with Illumos' since we have to do fcntl(old, F_DUP3FD, | (flags << 16), new) instead of fcntl(old, F_DUP3FD, new, flags). But this flag is not POSIX anyway.

@ricardobranco777
Copy link
Contributor Author

Our own tests also pass:

$ /usr/tests/sys/file/dup_test
1..32
ok 1 - dup(2) works
ok 2 - dup2(2) works
ok 3 - dup2(2) returned a correct fd
ok 4 - dup2(2) cleared close-on-exec
ok 5 - dup2(2) to itself works
ok 6 - dup2(2) to itself returned a correct fd
ok 7 - dup2(2) didn't clear close-on-exec
ok 8 - fcntl(F_DUPFD) works
ok 9 - fcntl(F_DUPFD) cleared close-on-exec
ok 10 - dup2(2) didn't bypass NOFILE limit
ok 11 - fcntl(F_DUP2FD) works
ok 12 - fcntl(F_DUP2FD) returned a correct fd
ok 13 - fcntl(F_DUP2FD) cleared close-on-exec
ok 14 - fcntl(F_DUP2FD) to itself works
ok 15 - fcntl(F_DUP2FD) to itself returned a correct fd
ok 16 - fcntl(F_DUP2FD) didn't clear close-on-exec
ok 17 - fcntl(F_DUP2FD) didn't bypass NOFILE limit
ok 18 - fcntl(F_DUPFD_CLOEXEC) works
ok 19 - fcntl(F_DUPFD_CLOEXEC) set close-on-exec
ok 20 - fcntl(F_DUP2FD_CLOEXEC) works
ok 21 - fcntl(F_DUP2FD_CLOEXEC) returned a correct fd
ok 22 - fcntl(F_DUP2FD_CLOEXEC) set close-on-exec
ok 23 - fcntl(F_DUP2FD_CLOEXEC) didn't bypass NOFILE limit
ok 24 - dup3(O_CLOEXEC) works
ok 25 - dup3(O_CLOEXEC) returned a correct fd
ok 26 - dup3(O_CLOEXEC) set close-on-exec
ok 27 - dup3(0) works
ok 28 - dup3(0) returned a correct fd
ok 29 - dup3(0) cleared close-on-exec
ok 30 - dup3(fd1, fd1, O_CLOEXEC) failed
ok 31 - dup3(fd1, fd1, 0) failed
ok 32 - dup3(O_CLOEXEC) didn't bypass NOFILE limit
$ cd /usr/tests/lib/libc/sys
$ kyua test dup_test
dup_test:dup2_basic  ->  passed  [0.003s]
dup_test:dup2_err  ->  passed  [0.002s]
dup_test:dup2_max  ->  passed  [0.002s]
dup_test:dup2_mode  ->  passed  [0.003s]
dup_test:dup3_err  ->  passed  [0.002s]
dup_test:dup3_max  ->  passed  [0.002s]
dup_test:dup3_mode  ->  passed  [0.003s]
dup_test:dup_err  ->  passed  [0.002s]
dup_test:dup_max  ->  passed  [0.002s]
dup_test:dup_mode  ->  passed  [0.002s]

@@ -280,6 +280,7 @@ typedef __pid_t pid_t;
#endif
#if __BSD_VISIBLE
#define F_DUP2FD_CLOFORK 24 /* Like F_DUP2FD, but FD_CLOFORK is set */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we still need this command?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we still need this command?

To have the close-on-fork equivalent of F_DUP2FD_CLOEXEC, as Illumos does.

@ricardobranco777
Copy link
Contributor Author

Rebased to take uexterr_gettext into account. Can we merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0