Subject: Re: [Patch bpf-next 18/19] selftests/bpf: add test cases for unix and udp sockmap

From: Jakub Sitnicki <[email-masked]>
Date: Fri, 05 Feb 2021 11:53:15 +0100

On Wed, Feb 03, 2021 at 05:16 AM CET, Cong Wang wrote:
> From: Cong Wang <[email-masked]>
>
> Add two test cases to ensure redirection between two
> AF_UNIX sockets or two UDP sockets work.
>
> Cc: John Fastabend <[email-masked]>
> Cc: Daniel Borkmann <[email-masked]>
> Cc: Jakub Sitnicki <[email-masked]>
> Cc: Lorenz Bauer <[email-masked]>
> Signed-off-by: Cong Wang <[email-masked]>
> ---

If you extract a helper for creating a pair of connected sockets that:

 1) delegates to socketpair() for AF_UNIX,
 2) emulates socketpair() for INET/DGRAM,

then tests for INET and UNIX datagram sockets could share code.

[...]