Os: add ReceiveDatagram
Add a wrapper for recv(), which reads one datagram
from a socket. Add unit tests for the same.
While there:
- add NONNULL annotation to the |buf| argument of
Os::Write()
- add some more tests for Os::Write()
- replace an instance of EBADFD with EBADF
(the two errors are not necessarily the same,
and the documentation for write() talks about
EBADF, not EBADFD.)
- remove unnecessary ON_CALL in a test
(in WriteWithOverlyLargeBufferCausesDeath,
we expect to abort before calling RawOs::Write())
Bug: 32447384
Test: ./runtests.sh (on angler)
Change-Id: I1a8b7e94d415d5f63a2ccc842d292c6c65b85b09
7 files changed