mbox series

[bpf,0/6] selftest/bpf: Various sockmap-related fixes

Message ID 20240724-sockmap-selftest-fixes-v1-0-46165d224712@rbox.co (mailing list archive)
Headers show
Series selftest/bpf: Various sockmap-related fixes | expand

Message

Michal Luczaj July 24, 2024, 11:32 a.m. UTC
Series takes care of few bugs and missing features with the aim to improve
the test coverage of sockmap/sockhash.

Last patch is a create_pair() rewrite making use of
__attribute__((cleanup)) to handle socket fd lifetime.

v0: https://lore.kernel.org/netdev/027fdb41-ee11-4be0-a493-22f28a1abd7c@rbox.co/
  - No declarations in function body (Jakub)
  - Don't touch output arguments until function succeeds (Jakub)

Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
Michal Luczaj (6):
      selftest/bpf: Support more socket types in create_pair()
      selftest/bpf: Socket pair creation, cleanups
      selftest/bpf: Simplify inet_socketpair() and vsock_unix_redir_connectible()
      selftest/bpf: Respect the sotype of af_unix redir tests
      selftest/bpf: Exercise SOCK_STREAM unix_inet_redir_to_connected()
      selftest/bpf: Introduce __attribute__((cleanup)) in create_pair()

 .../selftests/bpf/prog_tests/sockmap_basic.c       |  28 ++--
 .../selftests/bpf/prog_tests/sockmap_helpers.h     | 145 ++++++++++++++-------
 .../selftests/bpf/prog_tests/sockmap_listen.c      | 117 ++---------------
 3 files changed, 120 insertions(+), 170 deletions(-)
---
base-commit: 13c9b702e6cb8e406d5fa6b2dca422fa42d2f13e
change-id: 20240723-sockmap-selftest-fixes-666769755137

Best regards,

Comments

Jakub Sitnicki July 26, 2024, 5:36 p.m. UTC | #1
On Wed, Jul 24, 2024 at 01:32 PM +02, Michal Luczaj wrote:
> Series takes care of few bugs and missing features with the aim to improve
> the test coverage of sockmap/sockhash.
>
> Last patch is a create_pair() rewrite making use of
> __attribute__((cleanup)) to handle socket fd lifetime.
>
> v0: https://lore.kernel.org/netdev/027fdb41-ee11-4be0-a493-22f28a1abd7c@rbox.co/
>   - No declarations in function body (Jakub)
>   - Don't touch output arguments until function succeeds (Jakub)
>
> Signed-off-by: Michal Luczaj <mhal@rbox.co>
> ---

I see this depends on your previous series that got applied onto bpf
tree, but this seems more like bpf-next material considering it's all
tests, and a mix of improvements and fixups.
Michal Luczaj July 26, 2024, 8:45 p.m. UTC | #2
On 7/26/24 19:36, Jakub Sitnicki wrote:
> On Wed, Jul 24, 2024 at 01:32 PM +02, Michal Luczaj wrote:
>> Series takes care of few bugs and missing features with the aim to improve
>> the test coverage of sockmap/sockhash.
>>
>> Last patch is a create_pair() rewrite making use of
>> __attribute__((cleanup)) to handle socket fd lifetime.
>>
>> v0: https://lore.kernel.org/netdev/027fdb41-ee11-4be0-a493-22f28a1abd7c@rbox.co/
>>   - No declarations in function body (Jakub)
>>   - Don't touch output arguments until function succeeds (Jakub)
>>
>> Signed-off-by: Michal Luczaj <mhal@rbox.co>
>> ---
> 
> I see this depends on your previous series that got applied onto bpf
> tree, but this seems more like bpf-next material considering it's all
> tests, and a mix of improvements and fixups.

Yeah, I guess you're right. I'll just wait for bpf-next to catch up, then
rebase and respin.