Page MenuHomeFreeBSD

tests/netlink: add netlink socket buffer test
ClosedPublic

Authored by glebius on Nov 9 2023, 6:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 5:47 AM
Unknown Object (File)
Mon, Nov 25, 4:59 PM
Unknown Object (File)
Sun, Nov 24, 4:48 PM
Unknown Object (File)
Sun, Nov 24, 6:07 AM
Unknown Object (File)
Fri, Nov 22, 1:10 PM
Unknown Object (File)
Thu, Nov 21, 7:39 AM
Unknown Object (File)
Wed, Nov 20, 11:46 AM
Unknown Object (File)
Tue, Nov 19, 3:20 PM

Details

Summary

With upcoming protocol specific socket buffer for Netlink we need some
additional tests that cover basic socket operations, w/o much of actual
Netlink knowledge. Following tests are performed:

  1. Overflow. If an application keeps sending messages to the kernel,

but doesn't read out the replies, then first the receive buffer shall
fill and after that further messages from applications will be queued
on the send buffer until it is filled. After that socket operations
should block. However, reading from the receive buffer some data should
wake up the taskqueue and the send buffer should start draining again.

  1. Peek & trunc. Check that socket correctly reports amount of readable

data with MSG_PEEK & MSG_TRUNC. This typical pattern of Netlink apps.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Add CMSG testing to the size test.

This revision is now accepted and ready to land.Dec 26 2023, 7:40 PM