HomeFreeBSD

tests: fix unix_passfd_dgram:rights_creds_payload after be1f485d7d6b

Description

tests: fix unix_passfd_dgram:rights_creds_payload after be1f485d7d6b

The test was failing due to the assert on lack of MSG_TRUNC flag in the
output flags of recvmsg().
The code passed MSG_TRUNC, along with sufficient-size buffer to hold the
message to-be-received to the recvmsg(), and expected MSG_TRUNC to be
returned as well.

This is not exactly correct as a) MSG_TRUNC was not even a supported
recvmsg() flag before be1f485d7d6b and b) it violates POSIX, as
POSIX states it should be set only "If a message is too long to fit in
the supplied buffers,".
The test was working before as the kernel copied input flags to the
output flags. be1f485d7d6b changed that behaviour to clear MSG_TRUNC
if it was present on the input.

Fix the test by checking POSIX-defined behaviour.

Discussed with: glebius

Details

Provenance
melifaroAuthored on Aug 1 2022, 9:20 AM
Parents
rG5c23343b8c0c: routing: convert remnants of DPRINTF to FIB_CTL_LOG().
Branches
Unknown
Tags
Unknown