This review is a WIP, it is not final! It is request for comments
and request for help.
The plan is to compile two versions of this file into two tests.
Most test pass identically on different kinds of sockets. However,
few edge cases work differently on stream and datagram sockets. We
want to exercise this and document.
The current patch has code under ifdef OLD_UNIX_DGRAM that will make
the test pass on FreeBSD CURRENT. With new implementation 2 edge cases
would behave differently. You are welcome to disagree and prove me
wrong :)
This revision is planned to be committed after the new implementation
and with OLD_UNIX_DGRAM code removed.
The final requirement to get it committed is the make(1) glue. This is
where I'm seeking for a help! I need somehow to modify tests Makefile,
so that it compiles unix_passfd_test.c twice resulting in two different
test binaries, that would be appropriately added to the test list and
installed.