]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tests/unix_seqpacket: remove EMSGSIZE tests
authorGleb Smirnoff <glebius@FreeBSD.org>
Wed, 28 Feb 2024 22:32:46 +0000 (14:32 -0800)
committerGleb Smirnoff <glebius@FreeBSD.org>
Wed, 28 Feb 2024 22:32:46 +0000 (14:32 -0800)
commitd6ef9649dd924f12974d66a0c29a4ede71407e7d
tree87a30f9febe61a0198ac706adaeabae99cd07c4b
parent152a6d410e47a818fae905f6f4bd43f422146802
tests/unix_seqpacket: remove EMSGSIZE tests

These tests were not testing conformance to the specification, rather than
the limitation of our implementation.  The specification doesn't say that
a SOCK_SEQPACKET shall ever return EMSGSIZE.  It says:

  The SOCK_SEQPACKET socket type is similar to the SOCK_STREAM type,
  and is also connection-oriented. The only difference between these
  types is that record boundaries are maintained using the
  SOCK_SEQPACKET type. A record can be sent using one or more output
  operations and received using one or more input operations, but a
  single operation never transfers parts of more than one record.
  Record boundaries are visible to the receiver via the MSG_EOR flag
  in the received message flags returned by the recvmsg() function. It
  is protocol-specific whether a maximum record size is imposed.

The EMSGSIZE is specified as 'message is too large to be sent all at once,
as the socket requires'.  Indeed existing implementation that has
unix/seqpacket marked as PR_ATOMIC has such a limitation.  But future
implementation won't have, thus remove the tests.

Reviewed by: tuexen, asomers
Differential Revision: https://reviews.freebsd.org/D43756
tests/sys/kern/unix_seqpacket_test.c