Page MenuHomeFreeBSD

tests/netlink: add netlink socket buffer test
ClosedPublic

Authored by glebius on Nov 9 2023, 6:31 AM.
Tags
None
Referenced Files
F97699631: D42525.diff
Mon, Sep 30, 8:19 PM
Unknown Object (File)
Mon, Sep 30, 2:41 AM
Unknown Object (File)
Sun, Sep 29, 5:19 AM
Unknown Object (File)
Sun, Sep 29, 5:19 AM
Unknown Object (File)
Sat, Sep 28, 1:46 PM
Unknown Object (File)
Wed, Sep 25, 10:53 PM
Unknown Object (File)
Wed, Sep 25, 11:54 AM
Unknown Object (File)
Tue, Sep 24, 2:23 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