| e3ab0aff | 02-Jun-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: report missing RDMA prereqs as XFAIL
Make the RDMA test return XFAIL rather than skip when RXE is not available, since the RDMA datapath is not run in netdev CI.
Change the three RD
selftests: rds: report missing RDMA prereqs as XFAIL
Make the RDMA test return XFAIL rather than skip when RXE is not available, since the RDMA datapath is not run in netdev CI.
Change the three RDMA-prerequisite checks in check_rdma_conf() and check_rdma_conf_enabled() to exit with KSFT_XFAIL (2) and tag their messages [XFAIL] instead of [SKIP].
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260602050657.26389-5-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| c5eb1376 | 02-Jun-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: support RDS built as loadable modules
Commit 92cc6708f4a2 ("selftests: rds: config: disable modules") set CONFIG_MODULES=n since run.sh required this kconfig. But disabling modules a
selftests: rds: support RDS built as loadable modules
Commit 92cc6708f4a2 ("selftests: rds: config: disable modules") set CONFIG_MODULES=n since run.sh required this kconfig. But disabling modules also forces every =m option to =n rather than =y, which can silently drop unrelated features.
This patch removes CONFIG_MODULES=n from the rds selftest config and updates the check_*conf_enabled() routines to accept a config as either built-in (=y) or modular (=m). A new probe_module() function is added to load the backing module when a component is set to be modular (=m). config.sh no longer forces CONFIG_MODULES=n, so a user who follows the SKIP message to run config.sh does not silently end up with modules disabled again.
rds.ko itself is auto-loaded on socket creation, and rds_rdma.ko is auto-loaded when SO_RDS_TRANSPORT is set with RDS_TRANS_IB, but the TCP transport (rds_tcp.ko) is not auto-loaded on the bind path, so the backing modules are loaded explicitly here.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260602050657.26389-4-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| d2e76c5b | 02-Jun-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: pin RDS sockets to their intended transport
The RDS selftests create AF_RDS sockets but never selects a transport, so the transport is chosen implicitly based on network topology whe
selftests: rds: pin RDS sockets to their intended transport
The RDS selftests create AF_RDS sockets but never selects a transport, so the transport is chosen implicitly based on network topology when the socket is bound. If underlying connection establishment fails, RDS can fall back to another transport (e.g. loopback) and the test still passes, silently bypassing the intended datapath it is meant to exercise.
Set SO_RDS_TRANSPORT to the proper RDS_TRANS_IB or RDS_TRANS_TCP before they are bound, so the test fails loudly if the intended transport is unavailable rather than passing on a different path.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260602050657.26389-3-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 47f079e5 | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Add ROCE support to run.sh
This patch adds support for testing rds rdma over ROCE. A new -r flag is added to config.sh which enables the required kernel configs for rdma. We also a
selftests: rds: Add ROCE support to run.sh
This patch adds support for testing rds rdma over ROCE. A new -r flag is added to config.sh which enables the required kernel configs for rdma. We also add a -T flag to run.sh, which takes a transport option, tcp or rdma. The rdma option will check to ensure the proper configs have been enabled. The flag is then passed to test.py, which will run the test over the specified transport(s)
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-12-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 9d4fc641 | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Add ROCE support to test.py
This patch adds support for testing rds rdma over ROCE in test.py A new -T flag is added, which takes a transport option, tcp or rdma. A new setup_rdma()
selftests: rds: Add ROCE support to test.py
This patch adds support for testing rds rdma over ROCE in test.py A new -T flag is added, which takes a transport option, tcp or rdma. A new setup_rdma() function is added that will configure rdma interfaces and sockets for use in the test case.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-11-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| a8876203 | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Register network teardown via atexit
This patch adds a teardown_tcp() helper that removes net0/net1. The cmd calls here use fail=False so they can be called from completed or partial
selftests: rds: Register network teardown via atexit
This patch adds a teardown_tcp() helper that removes net0/net1. The cmd calls here use fail=False so they can be called from completed or partially-setup states on error. Also call teardown_tcp() at the top of setup_tcp() so a previous interrupted run does not leave net0/net1 lingering and break a subsequent ip netns add. Register teardown_tcp() with atexit before setup_tcp() is invoked.
Likewise, we can simpliy stop_pcaps() handling by registering it with atexit instead of calling it from the signal handler.
atexit handlers run on any exit path - normal completion, raised exception, and sys.exit() from the timeout signal handler. This guarantees cleanup are called without further wrapping the test body in a try/finally blocks.
atexit LIFO ordering keeps stop_pcaps before teardown_tcp so tcpdumps are killed cleanly before their namespaces go away.
This is a preparatory cleanup for the upcoming ROCE patch which will also register a teardown_rdma() alongside teardown_tcp()
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-10-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 0c4d043f | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Handle errors in netns_socket
Sockets created by child processes in netns_socket may raise exceptions that are currently not handled by the parent. If for example a namespace didn't
selftests: rds: Handle errors in netns_socket
Sockets created by child processes in netns_socket may raise exceptions that are currently not handled by the parent. If for example a namespace didn't exist or the rds module didn't load. Because these exceptions occur with in a child thread, the child thread exits, but the parent does not check the return status.
Further, allowing the child processes to quietly raise exceptions will cause problems later if the parent registers clean up functions with atexit. Since the child processes inherit the parents handlers, they may prematurely call the parents cleanup routines without the parent being aware.
Fix this by all catching exceptions raised by the child processes. Child errors surface as a non-zero exit status, which are then properly raised in the parent process.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-9-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 3bd27901 | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Add helper function snd_rcv_packets() in test.py
Hoist the send/recv logic in test.py into a helper function, snd_rcv_packets(). This is a preparatory refactoring for the rds over R
selftests: rds: Add helper function snd_rcv_packets() in test.py
Hoist the send/recv logic in test.py into a helper function, snd_rcv_packets(). This is a preparatory refactoring for the rds over ROCE series which can use the same function to run the test over tcp, rdma, or both. No functional changes are introduced in this patch.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-8-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| f7baddf0 | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Add helper function verify_hashes() in test.py
Hoist the verify hashes logic in test.py into a helper function, verify_hashes(). This is a preparatory refactoring for the rds over R
selftests: rds: Add helper function verify_hashes() in test.py
Hoist the verify hashes logic in test.py into a helper function, verify_hashes(). This is a preparatory refactoring for the rds over ROCE series that helps modularize the send/recv logic. Breaking up the logic now will help avoid large function pylint errors later. No functional changes are introduced in this patch.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-7-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 1c8a70b1 | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Add helper function recv_burst() in test.py
Hoist receive packet logic in test.py into a helper function, recv_burst(). This is a preparatory refactoring for the rds over ROCE serie
selftests: rds: Add helper function recv_burst() in test.py
Hoist receive packet logic in test.py into a helper function, recv_burst(). This is a preparatory refactoring for the rds over ROCE series that helps modularize the send/recv logic. Breaking up the logic now will help avoid large function pylint errors later. No functional changes are introduced in this patch.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-6-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 9996b296 | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Add helper function send_burst() in test.py
Hoist the send packet logic in test.py into a helper function, send_burst(). This is a preparatory refactoring for the rds over ROCE seri
selftests: rds: Add helper function send_burst() in test.py
Hoist the send packet logic in test.py into a helper function, send_burst(). This is a preparatory refactoring for the rds over ROCE series that helps modularize the send/recv logic. Breaking up the logic now will help avoid large function pylint errors later. No functional changes are introduced in this patch.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-5-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 78bcfe6f | 18-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Add helper function check_info() in test.py
Hoist the page info logic in test.py into a helper function, check_info(). This is a preparatory refactoring for the rds over ROCE series
selftests: rds: Add helper function check_info() in test.py
Hoist the page info logic in test.py into a helper function, check_info(). This is a preparatory refactoring for the rds over ROCE series that helps modularize the send/recv logic. Breaking up the logic now will help avoid large function pylint errors later. No functional changes are introduced in this patch.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260518012443.2629206-4-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 08724ab1 | 08-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Disarm signal alarm on test completion
A race in stop_pcaps is possible if the test completes and then times out while waiting for the tcpdump process to exit. The signal handler ma
selftests: rds: Disarm signal alarm on test completion
A race in stop_pcaps is possible if the test completes and then times out while waiting for the tcpdump process to exit. The signal handler may fire again and needlessly call stop_pcap a second time. Fix this by disabling the alarm after normal test completion.
Also if there are no tcpdump processes to wait on, stop_pcaps can just exit. This avoids misleading prints when there are no procs to collect dumps from.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260507233213.556182-4-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 49077883 | 08-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Fix TAP-prefixed prints in check_gcov*
This patch adds the # prefix to info and warning prints in the check_gcov* routines. Since these routines do not exit, as the other check_* ro
selftests: rds: Fix TAP-prefixed prints in check_gcov*
This patch adds the # prefix to info and warning prints in the check_gcov* routines. Since these routines do not exit, as the other check_* routines do, the output here should be kept TAP compliant.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260507233213.556182-3-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 06d5c345 | 04-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Make rds selftests TAP compliant
This patch updates the rds selftests output to be TAP compliant.
Use ksft_pr() to mark debug output with a leading '# ' so that TAP parsers treat it
selftests: rds: Make rds selftests TAP compliant
This patch updates the rds selftests output to be TAP compliant.
Use ksft_pr() to mark debug output with a leading '# ' so that TAP parsers treat it as commentary, and convert all informational print() calls to use ksft_pr(). sys.exit(0) is changed to os._exit(0) to avoid duplicate prints from the buffered TAP output. The console output from the tcpdump subprocess is silenced, and the gcov console output is redirected to a gcovr.log.
Finally adjust the exit path so that the hash check loop sets a return code instead exiting directly. Then print the TAP results and totals lines before exiting.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260504054143.4027538-11-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| c8781c61 | 04-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Fix gcov collection
debugfs is not mounted automatically in a virtme-ng guest, so the gcov data copy from /sys/kernel/debug/gcov/ silently finds nothing depending on whether debugfs
selftests: rds: Fix gcov collection
debugfs is not mounted automatically in a virtme-ng guest, so the gcov data copy from /sys/kernel/debug/gcov/ silently finds nothing depending on whether debugfs is mounted by default on the host OS. Fix this by mounting debugfs in run.sh before copying the gcda files.
Finally when invoked through the kselftest runner, the working directory is the test directory rather than the kernel source root. gcovr defaults --root to the current working directory, which causes it to filter out all coverage data for files under net/rds/ since they are not under the test directory. Fix this by passing --root to gcovr explicitly.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260504054143.4027538-10-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| ec914836 | 04-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Stop tcpdump on timeout
The timeout signal handler for the rds selftests currently just exits when the time limit is exceeded, and forgets to stop the network dumps. Fix this by hoi
selftests: rds: Stop tcpdump on timeout
The timeout signal handler for the rds selftests currently just exits when the time limit is exceeded, and forgets to stop the network dumps. Fix this by hoisting the tcpdump terminate commands into a helper function, and call it from the signal handler before exiting
Bound proc.wait() with a timeout (and fall back to proc.kill()) so an unresponsive tcpdump cannot hang the timeout path itself.
We also pop() tcpdump_procs as we iterate, so stop_pcaps() is safe to call from both the normal cleanup path and the signal handler, since the second invocation simply has nothing to do
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260504054143.4027538-9-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| c726bc68 | 04-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Remove tmp pcaps
This patch removes the initial tmp tcpdumps and instead saves the pcaps directly to the logdir if it is set.
Signed-off-by: Allison Henderson <achender@kernel.org>
selftests: rds: Remove tmp pcaps
This patch removes the initial tmp tcpdumps and instead saves the pcaps directly to the logdir if it is set.
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260504054143.4027538-8-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| d601239d | 04-May-2026 |
Allison Henderson <achender@kernel.org> |
selftests: rds: Add SUDO_USER env variable
This patch modifies rds selftests to use the environment variable SUDO_USER for tcpdumps if it is set. This is needed to avoid chown operations on the vng
selftests: rds: Add SUDO_USER env variable
This patch modifies rds selftests to use the environment variable SUDO_USER for tcpdumps if it is set. This is needed to avoid chown operations on the vng 9pfs which is not supported. Passing a user listed in sudoers avoids the tcpdump privilege drop which may otherwise create empty pcaps
Signed-off-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260504054143.4027538-7-achender@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|