Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] selftests: rds: ROCE support follow ups
@ 2026-05-27  2:34 Allison Henderson
  2026-05-27  2:34 ` [PATCH net-next v2 1/4] selftests: rds: Rename run.sh to rds_run.sh Allison Henderson
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Allison Henderson @ 2026-05-27  2:34 UTC (permalink / raw)
  To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender,
	linux-kselftest, shuah

Hi all,

This is a follow up series to the "Add ROCE support to rds selftests"
series.  The first patch renames run.sh to rds_run.sh, which provides
a self-describing name that appears on the netdev CI dashboard.

The second patch addresses a sashiko complaint that I thought was
worth circling back for.  In the patch "pin RDS sockets to their
intended transport," sockets are pinned to the specific transport they
are meant to test.  By default, socket transports are implicitly
selected based on the network topology, but it is possible that they
can fail back to other transports if the underlying connection could
not be established.  So the patch pins them to the intended transport
to avoid false positives.

The third patch "support RDS built as loadable modules," lifts the
CONFIG_MODULES=n requirement, and updates the check_*conf_enabled()
to allow modules set to "=m" and further load the backing modules for
any component set as such.

The fourth patch converts the rdma-prerequisite checks to return XFAIL
rather than SKIP, since the RDMA datapath is not run in netdev CI.

Questions, comments and feedback appreciated!

Thanks everyone!
Allison

Change log:
v2:
   [PATCH net-next v1 1/3] selftests: rds: add per-transport run wrappers
   - Renamed to "selftests: rds: Rename run.sh to rds_run.sh"
   - Removed rds_*_run.sh wrappers

   [PATCH net-next v1 3/3] selftests: rds: support RDS built as loadable modules
   - Fixed long line length warning

   [PATCH net-next v2 4/4] selftests: rds: report missing RDMA prereqs as XFAIL
   - NEW

Allison Henderson (4):
  selftests: rds: Rename run.sh to rds_run.sh
  selftests: rds: pin RDS sockets to their intended transport
  selftests: rds: support RDS built as loadable modules
  selftests: rds: report missing RDMA prereqs as XFAIL

 tools/testing/selftests/net/rds/Makefile      |  2 +-
 tools/testing/selftests/net/rds/README.txt    |  8 +--
 tools/testing/selftests/net/rds/config        |  1 -
 .../selftests/net/rds/{run.sh => rds_run.sh}  | 72 ++++++++++++-------
 tools/testing/selftests/net/rds/test.py       | 18 +++++
 5 files changed, 69 insertions(+), 32 deletions(-)
 rename tools/testing/selftests/net/rds/{run.sh => rds_run.sh} (78%)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH net-next v2 1/4] selftests: rds: Rename run.sh to rds_run.sh
  2026-05-27  2:34 [PATCH net-next v2 0/4] selftests: rds: ROCE support follow ups Allison Henderson
@ 2026-05-27  2:34 ` Allison Henderson
  2026-05-27  2:34 ` [PATCH net-next v2 2/4] selftests: rds: pin RDS sockets to their intended transport Allison Henderson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Allison Henderson @ 2026-05-27  2:34 UTC (permalink / raw)
  To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender,
	linux-kselftest, shuah

This patch renames run.sh to rds_run.sh. This gives the test a
self-describing name that appears in the netdev CI dashboard.

Suggested-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Allison Henderson <achender@kernel.org>
---
 tools/testing/selftests/net/rds/Makefile               | 2 +-
 tools/testing/selftests/net/rds/README.txt             | 8 ++++----
 tools/testing/selftests/net/rds/{run.sh => rds_run.sh} | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/testing/selftests/net/rds/Makefile b/tools/testing/selftests/net/rds/Makefile
index fe363be8e3586..ec10ae24e4cf1 100644
--- a/tools/testing/selftests/net/rds/Makefile
+++ b/tools/testing/selftests/net/rds/Makefile
@@ -3,7 +3,7 @@
 all:
 	@echo mk_build_dir="$(shell pwd)" > include.sh
 
-TEST_PROGS := run.sh
+TEST_PROGS := rds_run.sh
 
 TEST_FILES := \
 	include.sh \
diff --git a/tools/testing/selftests/net/rds/README.txt b/tools/testing/selftests/net/rds/README.txt
index bac6f15a80d52..8aa41148b1b5c 100644
--- a/tools/testing/selftests/net/rds/README.txt
+++ b/tools/testing/selftests/net/rds/README.txt
@@ -14,9 +14,9 @@ configs required for the RDMA transport.  The kernel may optionally be
 configured to omit the coverage report as well.
 
 USAGE:
-	run.sh [-d logdir] [-l packet_loss] [-c packet_corruption]
-	       [-u packet_duplicate] [-t timeout]
-	       [-T tcp|rdma|tcp,rdma]
+	rds_run.sh [-d logdir] [-l packet_loss] [-c packet_corruption]
+	           [-u packet_duplicate] [-t timeout]
+	           [-T tcp|rdma|tcp,rdma]
 
 OPTIONS:
 	-d	Log directory.  If set, logs will be stored in the
@@ -73,5 +73,5 @@ EXAMPLE:
         "export PYTHONPATH=tools/testing/selftests/net/; \
          export SUDO_USER=example_user; \
          export RDS_LOG_DIR=tools/testing/selftests/net/rds/rds_logs; \
-         tools/testing/selftests/net/rds/run.sh -T tcp,rdma"
+         tools/testing/selftests/net/rds/rds_run.sh -T tcp,rdma"
 
diff --git a/tools/testing/selftests/net/rds/run.sh b/tools/testing/selftests/net/rds/rds_run.sh
similarity index 98%
rename from tools/testing/selftests/net/rds/run.sh
rename to tools/testing/selftests/net/rds/rds_run.sh
index 07af2f927a2a7..ef16039be1ae5 100755
--- a/tools/testing/selftests/net/rds/run.sh
+++ b/tools/testing/selftests/net/rds/rds_run.sh
@@ -209,7 +209,7 @@ while getopts "d:l:c:u:t:T:" opt; do
       TRANSPORT=${OPTARG}
       ;;
     :)
-      echo "USAGE: run.sh [-d logdir] [-l packet_loss] [-c packet_corruption]" \
+      echo "USAGE: rds_run.sh [-d logdir] [-l packet_loss] [-c packet_corruption]" \
            "[-u packet_duplicate] [-t timeout] [-T tcp|rdma|tcp,rdma]"
       exit 1
       ;;
@@ -224,7 +224,7 @@ done
 IFS=',' read -ra transports <<< "$TRANSPORT"
 for t in "${transports[@]}"; do
     if [ "$t" != "tcp" ] && [ "$t" != "rdma" ]; then
-        echo "run.sh: unknown transport '$t' (expected tcp or rdma)"
+        echo "rds_run.sh: unknown transport '$t' (expected tcp or rdma)"
         exit 1
     fi
 done
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net-next v2 2/4] selftests: rds: pin RDS sockets to their intended transport
  2026-05-27  2:34 [PATCH net-next v2 0/4] selftests: rds: ROCE support follow ups Allison Henderson
  2026-05-27  2:34 ` [PATCH net-next v2 1/4] selftests: rds: Rename run.sh to rds_run.sh Allison Henderson
@ 2026-05-27  2:34 ` Allison Henderson
  2026-05-27  2:34 ` [PATCH net-next v2 3/4] selftests: rds: support RDS built as loadable modules Allison Henderson
  2026-05-27  2:34 ` [PATCH net-next v2 4/4] selftests: rds: report missing RDMA prereqs as XFAIL Allison Henderson
  3 siblings, 0 replies; 8+ messages in thread
From: Allison Henderson @ 2026-05-27  2:34 UTC (permalink / raw)
  To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender,
	linux-kselftest, shuah

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>
---
 tools/testing/selftests/net/rds/test.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py
index 08f2a846a8ab5..9e4df01cb0d4b 100755
--- a/tools/testing/selftests/net/rds/test.py
+++ b/tools/testing/selftests/net/rds/test.py
@@ -59,6 +59,14 @@ rdma_addrs = [
 OP_FLAG_TCP     = 0x1
 OP_FLAG_RDMA    = 0x2
 
+# from include/uapi/linux/rds.h: SO_RDS_TRANSPORT pins a socket to a
+# specific RDS transport so connection setup cannot silently fall back
+# to another (e.g. loopback) transport.
+SOL_RDS          = 276
+SO_RDS_TRANSPORT = 8
+RDS_TRANS_TCP    = 2
+RDS_TRANS_IB     = 0
+
 signal_handler_label = ""
 
 tap_idx = 0
@@ -214,11 +222,21 @@ def snd_rcv_packets(env):
             netns_socket(netns_list[0], socket.AF_RDS, socket.SOCK_SEQPACKET),
             netns_socket(netns_list[1], socket.AF_RDS, socket.SOCK_SEQPACKET),
         ]
+
+        # Pin the sockets to the TCP transport so it doesn't fail over to a
+        # different transport during this test
+        for s in sockets:
+            s.setsockopt(SOL_RDS, SO_RDS_TRANSPORT, RDS_TRANS_TCP)
     elif flags & OP_FLAG_RDMA:
         sockets = [
             socket.socket(socket.AF_RDS, socket.SOCK_SEQPACKET),
             socket.socket(socket.AF_RDS, socket.SOCK_SEQPACKET),
         ]
+
+        # Pin the sockets to the RDMA transport so it doesn't fail over to a
+        # different transport during this test
+        for s in sockets:
+            s.setsockopt(SOL_RDS, SO_RDS_TRANSPORT, RDS_TRANS_IB)
     else:
         raise RuntimeError(f"Invalid transport flag sets no transports: {flags}")
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net-next v2 3/4] selftests: rds: support RDS built as loadable modules
  2026-05-27  2:34 [PATCH net-next v2 0/4] selftests: rds: ROCE support follow ups Allison Henderson
  2026-05-27  2:34 ` [PATCH net-next v2 1/4] selftests: rds: Rename run.sh to rds_run.sh Allison Henderson
  2026-05-27  2:34 ` [PATCH net-next v2 2/4] selftests: rds: pin RDS sockets to their intended transport Allison Henderson
@ 2026-05-27  2:34 ` Allison Henderson
  2026-06-02  2:24   ` Jakub Kicinski
  2026-05-27  2:34 ` [PATCH net-next v2 4/4] selftests: rds: report missing RDMA prereqs as XFAIL Allison Henderson
  3 siblings, 1 reply; 8+ messages in thread
From: Allison Henderson @ 2026-05-27  2:34 UTC (permalink / raw)
  To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender,
	linux-kselftest, shuah

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).

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>
---
 tools/testing/selftests/net/rds/config     |  1 -
 tools/testing/selftests/net/rds/rds_run.sh | 60 ++++++++++++++--------
 2 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/tools/testing/selftests/net/rds/config b/tools/testing/selftests/net/rds/config
index 3d62d0c750a80..97db7ecb892aa 100644
--- a/tools/testing/selftests/net/rds/config
+++ b/tools/testing/selftests/net/rds/config
@@ -1,4 +1,3 @@
-CONFIG_MODULES=n
 CONFIG_NET_NS=y
 CONFIG_NET_SCH_NETEM=y
 CONFIG_RDS=y
diff --git a/tools/testing/selftests/net/rds/rds_run.sh b/tools/testing/selftests/net/rds/rds_run.sh
index ef16039be1ae5..c16b30dbdd169 100755
--- a/tools/testing/selftests/net/rds/rds_run.sh
+++ b/tools/testing/selftests/net/rds/rds_run.sh
@@ -93,38 +93,58 @@ check_gcov_conf()
 	fi
 }
 
+# Checks if a kconfig is enabled (set to =y or =m)
+# $1: kconfig symbol to check
+# $2: (optional) module name backing $1
+#     Ex: check_conf_enabled CONFIG_RDS_TCP rds_tcp
+#     Modules for configs set to  =m will be probed
+#     If omitted, only a built-in (=y) config is accepted.
+# Returns on success.  exits 4 on failure
 # Kselftest framework requirement - SKIP code is 4.
 check_conf_enabled() {
-	if ! grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then
-		echo "selftests: [SKIP] This test requires $1 enabled"
-		echo "Please run tools/testing/selftests/net/rds/config.sh and rebuild the kernel"
-		exit 4
+	if grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then
+		return
 	fi
+	if [ -n "${2:-}" ] && grep -x "$1=m" "$kconfig" > /dev/null 2>&1; then
+		probe_module "$2"
+		return
+	fi
+	echo "selftests: [SKIP] This test requires $1 enabled"
+	echo "Please run" \
+	     "tools/testing/selftests/net/rds/config.sh and rebuild the kernel"
+	exit 4
 }
 
 check_rdma_conf_enabled() {
-	if ! grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then
-		echo "selftests: [SKIP] rdma transport requires $1 enabled"
-		echo "To enable, run " \
-		     "tools/testing/selftests/net/rds/config.sh -r and rebuild"
-		exit 4
+	if grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then
+		return
+	fi
+	if [ -n "${2:-}" ] && grep -x "$1=m" "$kconfig" > /dev/null 2>&1; then
+		probe_module "$2"
+		return
 	fi
+	echo "selftests: [SKIP] rdma transport requires $1 enabled"
+	echo "To enable, run" \
+	     "tools/testing/selftests/net/rds/config.sh -r and rebuild"
+	exit 4
 }
 
-check_conf_disabled() {
-	if grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then
-		echo "selftests: [SKIP] This test requires $1 disabled"
-		echo "Please run tools/testing/selftests/net/rds/config.sh and rebuild the kernel"
+# Load the module backing a config that is built as a loadable module
+# (=m).  Built-in (=y) configs are already available and don't reach
+# here.  Exits with the SKIP code if a required module cannot be loaded.
+probe_module() {
+	if ! modprobe -q "$1"; then
+		echo "selftests: [SKIP] could not load required module $1"
 		exit 4
 	fi
 }
+
 check_conf() {
-	check_conf_enabled CONFIG_NET_SCH_NETEM
-	check_conf_enabled CONFIG_VETH
+	check_conf_enabled CONFIG_NET_SCH_NETEM sch_netem
+	check_conf_enabled CONFIG_VETH veth
 	check_conf_enabled CONFIG_NET_NS
-	check_conf_enabled CONFIG_RDS_TCP
-	check_conf_enabled CONFIG_RDS
-	check_conf_disabled CONFIG_MODULES
+	check_conf_enabled CONFIG_RDS_TCP rds_tcp
+	check_conf_enabled CONFIG_RDS rds
 }
 
 # Check kernel config and host environment for RDS-RDMA support.
@@ -139,8 +159,8 @@ check_rdma_conf()
 
 	# Kconfig will enforce CONFIG_INFINIBAND_* as dependencies
 	# of CONFIG_RDMA_RXE
-	check_rdma_conf_enabled CONFIG_RDMA_RXE
-	check_rdma_conf_enabled CONFIG_RDS_RDMA
+	check_rdma_conf_enabled CONFIG_RDMA_RXE rdma_rxe
+	check_rdma_conf_enabled CONFIG_RDS_RDMA rds_rdma
 
 	if ! which rdma > /dev/null 2>&1; then
 		echo "selftests: [SKIP] rdma transport requires the 'rdma'" \
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net-next v2 4/4] selftests: rds: report missing RDMA prereqs as XFAIL
  2026-05-27  2:34 [PATCH net-next v2 0/4] selftests: rds: ROCE support follow ups Allison Henderson
                   ` (2 preceding siblings ...)
  2026-05-27  2:34 ` [PATCH net-next v2 3/4] selftests: rds: support RDS built as loadable modules Allison Henderson
@ 2026-05-27  2:34 ` Allison Henderson
  2026-06-02  2:24   ` Jakub Kicinski
  3 siblings, 1 reply; 8+ messages in thread
From: Allison Henderson @ 2026-05-27  2:34 UTC (permalink / raw)
  To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender,
	linux-kselftest, shuah

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 the XFAIL code (5) and tag their
messages [XFAIL] instead of [SKIP].

Signed-off-by: Allison Henderson <achender@kernel.org>
---
 tools/testing/selftests/net/rds/rds_run.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/net/rds/rds_run.sh b/tools/testing/selftests/net/rds/rds_run.sh
index c16b30dbdd169..ba957a2257c91 100755
--- a/tools/testing/selftests/net/rds/rds_run.sh
+++ b/tools/testing/selftests/net/rds/rds_run.sh
@@ -123,10 +123,10 @@ check_rdma_conf_enabled() {
 		probe_module "$2"
 		return
 	fi
-	echo "selftests: [SKIP] rdma transport requires $1 enabled"
+	echo "selftests: [XFAIL] rdma transport requires $1 enabled"
 	echo "To enable, run" \
 	     "tools/testing/selftests/net/rds/config.sh -r and rebuild"
-	exit 4
+	exit 5
 }
 
 # Load the module backing a config that is built as a loadable module
@@ -148,7 +148,7 @@ check_conf() {
 }
 
 # Check kernel config and host environment for RDS-RDMA support.
-# Exits with SKIP (4) if the user requested rdma but prerequisites
+# Exits with XFAIL (5) if the user requested rdma but prerequisites
 # are not met.
 check_rdma_conf()
 {
@@ -163,9 +163,9 @@ check_rdma_conf()
 	check_rdma_conf_enabled CONFIG_RDS_RDMA rds_rdma
 
 	if ! which rdma > /dev/null 2>&1; then
-		echo "selftests: [SKIP] rdma transport requires the 'rdma'" \
-		      " tool (iproute2)"
-		exit 4
+		echo "selftests: [XFAIL] rdma transport requires the 'rdma'" \
+		      "tool (iproute2)"
+		exit 5
 	fi
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next v2 3/4] selftests: rds: support RDS built as loadable modules
  2026-05-27  2:34 ` [PATCH net-next v2 3/4] selftests: rds: support RDS built as loadable modules Allison Henderson
@ 2026-06-02  2:24   ` Jakub Kicinski
  0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2026-06-02  2:24 UTC (permalink / raw)
  To: achender
  Cc: Jakub Kicinski, netdev, pabeni, edumazet, horms, linux-rdma,
	linux-kselftest, shuah

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
---
selftests: rds: support RDS built as loadable modules

This commit removes CONFIG_MODULES=n from the rds selftest config to prevent
unrelated features from being silently dropped. It updates the configuration
check routines to accept options built as either modules or built-in, and
adds support for probing the backing modules.

> diff --git a/tools/testing/selftests/net/rds/rds_run.sh b/tools/testing/selftests/net/rds/rds_run.sh
> index ef16039be1ae5..c16b30dbdd169 100755
> --- a/tools/testing/selftests/net/rds/rds_run.sh
> +++ b/tools/testing/selftests/net/rds/rds_run.sh
[ ... ]
> @@ -93,38 +93,58 @@ check_gcov_conf()
>  	fi
>  }
>  
> +# Checks if a kconfig is enabled (set to =y or =m)
> +# $1: kconfig symbol to check
> +# $2: (optional) module name backing $1
> +#     Ex: check_conf_enabled CONFIG_RDS_TCP rds_tcp
> +#     Modules for configs set to  =m will be probed
> +#     If omitted, only a built-in (=y) config is accepted.
> +# Returns on success.  exits 4 on failure
>  # Kselftest framework requirement - SKIP code is 4.
>  check_conf_enabled() {
> -	if ! grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then
> -		echo "selftests: [SKIP] This test requires $1 enabled"
> -		echo "Please run tools/testing/selftests/net/rds/config.sh and rebuild the kernel"
> -		exit 4
> +	if grep -x "$1=y" "$kconfig" > /dev/null 2>&1; then
> +		return
>  	fi
> +	if [ -n "${2:-}" ] && grep -x "$1=m" "$kconfig" > /dev/null 2>&1; then
> +		probe_module "$2"
> +		return
> +	fi
> +	echo "selftests: [SKIP] This test requires $1 enabled"
> +	echo "Please run" \
> +	     "tools/testing/selftests/net/rds/config.sh and rebuild the kernel"

[Severity: Medium]
Should tools/testing/selftests/net/rds/config.sh also be updated to
reflect the new module support?

If a user follows these instructions to run config.sh for missing
dependencies, that script still explicitly disables CONFIG_MODULES via
scripts/config --disable CONFIG_MODULES.

Could this undermine the goal of this patch by forcefully disabling modules in
the user's kernel configuration anyway?

> +	exit 4
>  }

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next v2 4/4] selftests: rds: report missing RDMA prereqs as XFAIL
  2026-05-27  2:34 ` [PATCH net-next v2 4/4] selftests: rds: report missing RDMA prereqs as XFAIL Allison Henderson
@ 2026-06-02  2:24   ` Jakub Kicinski
  2026-06-02  5:04     ` Allison Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2026-06-02  2:24 UTC (permalink / raw)
  To: achender
  Cc: Jakub Kicinski, netdev, pabeni, edumazet, horms, linux-rdma,
	linux-kselftest, shuah

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
---
selftests: rds: report missing RDMA prereqs as XFAIL

This commit changes the exit code and message tag for RDMA prerequisites in
the RDS selftests to report as an expected failure instead of a skip.

> diff --git a/tools/testing/selftests/net/rds/rds_run.sh b/tools/testing/selftests/net/rds/rds_run.sh
> --- a/tools/testing/selftests/net/rds/rds_run.sh
> +++ b/tools/testing/selftests/net/rds/rds_run.sh
> @@ -123,10 +123,10 @@ check_rdma_conf_enabled() {
>  		probe_module "$2"
>  		return
>  	fi
> -	echo "selftests: [SKIP] rdma transport requires $1 enabled"
> +	echo "selftests: [XFAIL] rdma transport requires $1 enabled"
>  	echo "To enable, run" \
>  	     "tools/testing/selftests/net/rds/config.sh -r and rebuild"
> -	exit 4
> +	exit 5

[Severity: High]
Is exit code 5 the correct value for an expected failure in the kselftest
framework?

Looking at the kselftest framework in tools/testing/selftests/kselftest.h
and ktap_helpers.sh, the expected failure code (KSFT_XFAIL) is defined as 2.

When runner.sh receives an exit code of 5, it does not match KSFT_XFAIL.
Instead, it falls through to the default case and calls ktap_test_fail,
which logs a hard test failure.

Could this actively fail the test in the continuous integration environments
rather than marking it as an expected failure?

[ ... ]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next v2 4/4] selftests: rds: report missing RDMA prereqs as XFAIL
  2026-06-02  2:24   ` Jakub Kicinski
@ 2026-06-02  5:04     ` Allison Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Allison Henderson @ 2026-06-02  5:04 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: netdev, pabeni, edumazet, horms, linux-rdma, linux-kselftest,
	shuah

On Mon, 2026-06-01 at 19:24 -0700, Jakub Kicinski wrote:
> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
> ---
> selftests: rds: report missing RDMA prereqs as XFAIL
> 
> This commit changes the exit code and message tag for RDMA prerequisites in
> the RDS selftests to report as an expected failure instead of a skip.
> 
> > diff --git a/tools/testing/selftests/net/rds/rds_run.sh b/tools/testing/selftests/net/rds/rds_run.sh
> > --- a/tools/testing/selftests/net/rds/rds_run.sh
> > +++ b/tools/testing/selftests/net/rds/rds_run.sh
> > @@ -123,10 +123,10 @@ check_rdma_conf_enabled() {
> >  		probe_module "$2"
> >  		return
> >  	fi
> > -	echo "selftests: [SKIP] rdma transport requires $1 enabled"
> > +	echo "selftests: [XFAIL] rdma transport requires $1 enabled"
> >  	echo "To enable, run" \
> >  	     "tools/testing/selftests/net/rds/config.sh -r and rebuild"
> > -	exit 4
> > +	exit 5
> 
> [Severity: High]
> Is exit code 5 the correct value for an expected failure in the kselftest
> framework?
> 
> Looking at the kselftest framework in tools/testing/selftests/kselftest.h
> and ktap_helpers.sh, the expected failure code (KSFT_XFAIL) is defined as 2.
> 
> When runner.sh receives an exit code of 5, it does not match KSFT_XFAIL.
> Instead, it falls through to the default case and calls ktap_test_fail,
> which logs a hard test failure.
> 
> Could this actively fail the test in the continuous integration environments
> rather than marking it as an expected failure?

You're right its 2, good catch.  I will fix that and config.sh in a v3.  Thanks!
Allison

> 
> [ ... ]


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-06-02  5:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27  2:34 [PATCH net-next v2 0/4] selftests: rds: ROCE support follow ups Allison Henderson
2026-05-27  2:34 ` [PATCH net-next v2 1/4] selftests: rds: Rename run.sh to rds_run.sh Allison Henderson
2026-05-27  2:34 ` [PATCH net-next v2 2/4] selftests: rds: pin RDS sockets to their intended transport Allison Henderson
2026-05-27  2:34 ` [PATCH net-next v2 3/4] selftests: rds: support RDS built as loadable modules Allison Henderson
2026-06-02  2:24   ` Jakub Kicinski
2026-05-27  2:34 ` [PATCH net-next v2 4/4] selftests: rds: report missing RDMA prereqs as XFAIL Allison Henderson
2026-06-02  2:24   ` Jakub Kicinski
2026-06-02  5:04     ` Allison Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox