]> git.hungrycats.org Git - linux/commit
selftests: net: rds: add getsockopt() conversion test
authorBreno Leitao <leitao@debian.org>
Mon, 8 Jun 2026 09:44:57 +0000 (02:44 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 11 Jun 2026 10:19:05 +0000 (12:19 +0200)
commitb74360369e13a68337a411efba1fd2bdbb6f1b80
treef7c9dcf1461d81ce856d3afecca9dde526a511f7
parent6b669e6a2a6a2668693bc30907ab64ad1952a359
selftests: net: rds: add getsockopt() conversion test

Add a kselftest that exercises the RDS getsockopt() paths converted to
the getsockopt_iter() / sockopt_t callback:

- RDS_RECVERR and SO_RDS_TRANSPORT, which return their int value through
  copy_to_iter() and report the written length in opt->optlen.

- RDS_INFO_*, which obtains the userspace buffer pages with
  iov_iter_extract_pages() (including a non-zero starting page offset)
  and lets the info producers copy the snapshot in under a spinlock.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/20260608-getsock_more-v3-1-706ecf2ea332@debian.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/rds/.gitignore
tools/testing/selftests/net/rds/Makefile
tools/testing/selftests/net/rds/getsockopt.c [new file with mode: 0644]