selftests/rdma: Skip rxe_sent_rcvd_bytes when rdma_rxe is missing
Subsystems (4)
PATCH 1/1 selftests/rdma: Skip rxe_sent_rcvd_bytes when rdma_rxe is missing
On a kernel built without CONFIG_RDMA_RXE the test exits 1 instead of skipping:
# modprobe: FATAL: Module rdma_rxe not found in directory ... not ok 467 selftests: rdma: rxe_sent_rcvd_bytes.sh # exit=1
Every other test in this directory probes with modinfo and exits $KSFT_SKIP. Apply the same guard, identical to the one in the otherwise near-identical rxe_socket_with_netns.sh.
--- tools/testing/selftests/rdma/rxe_sent_rcvd_bytes.sh | 6 ++++++ 1 file changed, 6 insertions(+)
tools/testing/selftests/rdma/rxe_sent_rcvd_bytes.sh +6 -0
@@ -4,6 +4,8 @@ PORT=4791 MODS=("tun" "rdma_rxe") +source "$(dirname "$0")/../kselftest/ktap_helpers.sh" + exec > /dev/null # --- Helper: Cleanup Routine ---
@@ -24,6 +26,10 @@ if [[ $EUID -ne 0 ]]; then fi for m in "${MODS[@]}"; do + if ! modinfo "$m" >/dev/null 2>&1; then + echo "SKIP: Kernel module '$m' not found." >&2 + exit $KSFT_SKIP + fi modprobe "$m" || { echo "Error: Failed to load $m"; exit 1; } done
Signature · 1 line
2.50.1
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 6 lines
On a kernel built without
CONFIG_RDMA_RXEthe test exits 1 instead of skipping:# modprobe: FATAL: Module
rdma_rxenot found in directory ... not ok 467 selftests: rdma:rxe_sent_rcvd_bytes.sh# exit=1
Quoted 8 lines
Every other test in this directory probes with modinfo and exits $KSFT_SKIP. Apply the same guard, identical to the one in the otherwise near-identical
rxe_socket_with_netns.sh.Fixes c67bd973695c3 ("selftest/rxe: Add selftests for perf")Assisted-by kiro:claude-opus-5Signed-off-by Bjoern Doebel <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Leon Romanovsky
AppliedQuoted 11 lines · Bjoern Doebel
On a kernel built without
CONFIG_RDMA_RXEthe test exits 1 instead of skipping:# modprobe: FATAL: Module
rdma_rxenot found in directory ... not ok 467 selftests: rdma:rxe_sent_rcvd_bytes.sh# exit=1Every other test in this directory probes with modinfo and exits $KSFT_SKIP. Apply the same guard, identical to the one in the otherwise near-identical
rxe_socket_with_netns.sh.[...]
Applied, thanks!
[1/1] selftests/rdma: Skip rxe_sent_rcvd_bytes when rdma_rxe is missing
https://git.kernel.org/rdma/rdma/c/d2c08575500145
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>