* [PATCH] selftests/rdma: Skip rxe_sent_rcvd_bytes when rdma_rxe is missing
@ 2026-09-30 13:55 Bjoern Doebel
0 siblings, 0 replies; only message in thread
From: Bjoern Doebel @ 2026-09-30 13:55 UTC (permalink / raw)
To: Zhu Yanjun, Leon Romanovsky, Jason Gunthorpe, Shuah Khan
Cc: linux-rdma, linux-kselftest, linux-kernel, doebel, stable
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.
Fixes: c67bd973695c3 ("selftest/rxe: Add selftests for perf")
Assisted-by: kiro:claude-opus-5
Cc: stable@vger.kernel.org
Signed-off-by: Bjoern Doebel <doebel@amazon.de>
---
tools/testing/selftests/rdma/rxe_sent_rcvd_bytes.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/rdma/rxe_sent_rcvd_bytes.sh b/tools/testing/selftests/rdma/rxe_sent_rcvd_bytes.sh
index 0e4fbfeebd228..89218ccfba4c1 100755
--- a/tools/testing/selftests/rdma/rxe_sent_rcvd_bytes.sh
+++ b/tools/testing/selftests/rdma/rxe_sent_rcvd_bytes.sh
@@ -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
--
2.50.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-30 13:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 13:55 [PATCH] selftests/rdma: Skip rxe_sent_rcvd_bytes when rdma_rxe is missing Bjoern Doebel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®