public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/2] selftests: rds: add config file and config.sh -c option
@ 2026-03-20  4:18 Allison Henderson
  2026-03-20  4:18 ` [PATCH net-next v3 1/2] selftests: rds: add tools/testing/selftests/net/rds/config Allison Henderson
  2026-03-20  4:18 ` [PATCH net-next v3 2/2] selftests: rds: Add -c config option to rds/config.sh Allison Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Allison Henderson @ 2026-03-20  4:18 UTC (permalink / raw)
  To: netdev
  Cc: linux-kselftest, pabeni, edumazet, rds-devel, kuba, shuah, horms,
	linux-rdma, allison.henderson

This series adds an RDS-specific config file for ksft CI and extends
config.sh with a -c flag to specify an alternate config file path.
Users can now specify the path of the config they want to update, or
default to .config if none is specified.

---                                                                                                                                                  
Changes v2 -> v3:
  [PATCH net-next v3 1/2] selftests: rds: add tools/testing/selftests/net/rds/config
    - Sort CONFIG entries in tools/testing/selftests/net/rds/config
    - Sort TEST_FILES entries alphabetically in Makefile
  [PATCH net-next v3 2/2] selftests: rds: Add -c config option to rds/config.sh
    - Use bash array for FLAGS to keep config.sh shellcheck clean

Allison Henderson (2):
  selftests: rds: add tools/testing/selftests/net/rds/config
  selftests: rds: Add -c config option to rds/config.sh

 tools/testing/selftests/net/rds/Makefile   |  1 +
 tools/testing/selftests/net/rds/README.txt |  5 ++-
 tools/testing/selftests/net/rds/config     |  5 +++
 tools/testing/selftests/net/rds/config.sh  | 37 +++++++++++++---------
 4 files changed, 32 insertions(+), 16 deletions(-)
 create mode 100644 tools/testing/selftests/net/rds/config

-- 
2.43.0


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

* [PATCH net-next v3 1/2] selftests: rds: add tools/testing/selftests/net/rds/config
  2026-03-20  4:18 [PATCH net-next v3 0/2] selftests: rds: add config file and config.sh -c option Allison Henderson
@ 2026-03-20  4:18 ` Allison Henderson
  2026-03-24  2:40   ` Jakub Kicinski
  2026-03-20  4:18 ` [PATCH net-next v3 2/2] selftests: rds: Add -c config option to rds/config.sh Allison Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Allison Henderson @ 2026-03-20  4:18 UTC (permalink / raw)
  To: netdev
  Cc: linux-kselftest, pabeni, edumazet, rds-devel, kuba, shuah, horms,
	linux-rdma, allison.henderson

The ksft CI runtime needs an rds specific config file to build a
minimal kernel with the right options enabled.  This patch adds
an rds selftest config containing the required CONFIG_RDS* and
CONFIG_NET_* options.

Signed-off-by: Allison Henderson <achender@kernel.org>
---
 tools/testing/selftests/net/rds/Makefile | 1 +
 tools/testing/selftests/net/rds/config   | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/tools/testing/selftests/net/rds/Makefile b/tools/testing/selftests/net/rds/Makefile
index fe363be8e358..a3462dadb47c 100644
--- a/tools/testing/selftests/net/rds/Makefile
+++ b/tools/testing/selftests/net/rds/Makefile
@@ -6,6 +6,7 @@ all:
 TEST_PROGS := run.sh
 
 TEST_FILES := \
+	config \
 	include.sh \
 	settings \
 	test.py \
diff --git a/tools/testing/selftests/net/rds/config b/tools/testing/selftests/net/rds/config
new file mode 100644
index 000000000000..97db7ecb892a
--- /dev/null
+++ b/tools/testing/selftests/net/rds/config
@@ -0,0 +1,5 @@
+CONFIG_NET_NS=y
+CONFIG_NET_SCH_NETEM=y
+CONFIG_RDS=y
+CONFIG_RDS_TCP=y
+CONFIG_VETH=y
-- 
2.43.0


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

* [PATCH net-next v3 2/2] selftests: rds: Add -c config option to rds/config.sh
  2026-03-20  4:18 [PATCH net-next v3 0/2] selftests: rds: add config file and config.sh -c option Allison Henderson
  2026-03-20  4:18 ` [PATCH net-next v3 1/2] selftests: rds: add tools/testing/selftests/net/rds/config Allison Henderson
@ 2026-03-20  4:18 ` Allison Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Allison Henderson @ 2026-03-20  4:18 UTC (permalink / raw)
  To: netdev
  Cc: linux-kselftest, pabeni, edumazet, rds-devel, kuba, shuah, horms,
	linux-rdma, allison.henderson

This patch adds a new -c flag to config.sh that enables callers
to specify the file path of the config they would like to update.
If no config is specified, the default will be the .config of the
current directory.

Signed-off-by: Allison Henderson <achender@kernel.org>
---
 tools/testing/selftests/net/rds/README.txt |  5 ++-
 tools/testing/selftests/net/rds/config.sh  | 37 +++++++++++++---------
 2 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/tools/testing/selftests/net/rds/README.txt b/tools/testing/selftests/net/rds/README.txt
index cbde2951ab13..c6fe003d503b 100644
--- a/tools/testing/selftests/net/rds/README.txt
+++ b/tools/testing/selftests/net/rds/README.txt
@@ -31,8 +31,11 @@ EXAMPLE:
     # Alternatly create a gcov disabled .config
     tools/testing/selftests/net/rds/config.sh
 
+    # Config paths may also be specified with the -c flag
+    tools/testing/selftests/net/rds/config.sh -c .config.local
+
     # build the kernel
-    vng --build  --config tools/testing/selftests/net/config
+    vng --build --config .config
 
     # launch the tests in a VM
     vng -v --rwdir ./ --run . --user root --cpus 4 -- \
diff --git a/tools/testing/selftests/net/rds/config.sh b/tools/testing/selftests/net/rds/config.sh
index 791c8dbe1095..29a79314dd60 100755
--- a/tools/testing/selftests/net/rds/config.sh
+++ b/tools/testing/selftests/net/rds/config.sh
@@ -6,15 +6,20 @@ set -u
 set -x
 
 unset KBUILD_OUTPUT
+CONF_FILE=""
+FLAGS=()
 
 GENERATE_GCOV_REPORT=0
-while getopts "g" opt; do
+while getopts "gc:" opt; do
   case ${opt} in
     g)
       GENERATE_GCOV_REPORT=1
       ;;
+    c)
+      CONF_FILE=$OPTARG
+      ;;
     :)
-      echo "USAGE: config.sh [-g]"
+      echo "USAGE: config.sh [-g] [-c config]"
       exit 1
       ;;
     ?)
@@ -24,30 +29,32 @@ while getopts "g" opt; do
   esac
 done
 
-CONF_FILE="tools/testing/selftests/net/config"
+if [[ "$CONF_FILE" != "" ]]; then
+	FLAGS=(--file "$CONF_FILE")
+fi
 
 # no modules
-scripts/config --file "$CONF_FILE" --disable CONFIG_MODULES
+scripts/config "${FLAGS[@]}" --disable CONFIG_MODULES
 
 # enable RDS
-scripts/config --file "$CONF_FILE" --enable CONFIG_RDS
-scripts/config --file "$CONF_FILE" --enable CONFIG_RDS_TCP
+scripts/config "${FLAGS[@]}" --enable CONFIG_RDS
+scripts/config "${FLAGS[@]}" --enable CONFIG_RDS_TCP
 
 if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then
 	# instrument RDS and only RDS
-	scripts/config --file "$CONF_FILE" --enable CONFIG_GCOV_KERNEL
-	scripts/config --file "$CONF_FILE" --disable GCOV_PROFILE_ALL
-	scripts/config --file "$CONF_FILE" --enable GCOV_PROFILE_RDS
+	scripts/config "${FLAGS[@]}" --enable CONFIG_GCOV_KERNEL
+	scripts/config "${FLAGS[@]}" --disable GCOV_PROFILE_ALL
+	scripts/config "${FLAGS[@]}" --enable GCOV_PROFILE_RDS
 else
-	scripts/config --file "$CONF_FILE" --disable CONFIG_GCOV_KERNEL
-	scripts/config --file "$CONF_FILE" --disable GCOV_PROFILE_ALL
-	scripts/config --file "$CONF_FILE" --disable GCOV_PROFILE_RDS
+	scripts/config "${FLAGS[@]}" --disable CONFIG_GCOV_KERNEL
+	scripts/config "${FLAGS[@]}" --disable GCOV_PROFILE_ALL
+	scripts/config "${FLAGS[@]}" --disable GCOV_PROFILE_RDS
 fi
 
 # need network namespaces to run tests with veth network interfaces
-scripts/config --file "$CONF_FILE" --enable CONFIG_NET_NS
-scripts/config --file "$CONF_FILE" --enable CONFIG_VETH
+scripts/config "${FLAGS[@]}" --enable CONFIG_NET_NS
+scripts/config "${FLAGS[@]}" --enable CONFIG_VETH
 
 # simulate packet loss
-scripts/config --file "$CONF_FILE" --enable CONFIG_NET_SCH_NETEM
+scripts/config "${FLAGS[@]}" --enable CONFIG_NET_SCH_NETEM
 
-- 
2.43.0


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

* Re: [PATCH net-next v3 1/2] selftests: rds: add tools/testing/selftests/net/rds/config
  2026-03-20  4:18 ` [PATCH net-next v3 1/2] selftests: rds: add tools/testing/selftests/net/rds/config Allison Henderson
@ 2026-03-24  2:40   ` Jakub Kicinski
  2026-03-24  6:29     ` Allison Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2026-03-24  2:40 UTC (permalink / raw)
  To: Allison Henderson
  Cc: netdev, linux-kselftest, pabeni, edumazet, rds-devel, shuah,
	horms, linux-rdma, allison.henderson

On Thu, 19 Mar 2026 21:18:33 -0700 Allison Henderson wrote:
> --- a/tools/testing/selftests/net/rds/Makefile
> +++ b/tools/testing/selftests/net/rds/Makefile
> @@ -6,6 +6,7 @@ all:
>  TEST_PROGS := run.sh
>  
>  TEST_FILES := \
> +	config \
>  	include.sh \
>  	settings \
>  	test.py \

I don't believe this chunk is necessary, only files which the tests
themselves need to _run_ need to be listed.

I dropped this chunk when applying, thanks!

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

* Re: [PATCH net-next v3 1/2] selftests: rds: add tools/testing/selftests/net/rds/config
  2026-03-24  2:40   ` Jakub Kicinski
@ 2026-03-24  6:29     ` Allison Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Allison Henderson @ 2026-03-24  6:29 UTC (permalink / raw)
  To: kuba@kernel.org, achender@kernel.org
  Cc: linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org,
	rds-devel@oss.oracle.com, shuah@kernel.org, pabeni@redhat.com,
	horms@kernel.org, edumazet@google.com, netdev@vger.kernel.org

On Mon, 2026-03-23 at 19:40 -0700, Jakub Kicinski wrote:
> On Thu, 19 Mar 2026 21:18:33 -0700 Allison Henderson wrote:
> > --- a/tools/testing/selftests/net/rds/Makefile
> > +++ b/tools/testing/selftests/net/rds/Makefile
> > @@ -6,6 +6,7 @@ all:
> >  TEST_PROGS := run.sh
> >  
> >  TEST_FILES := \
> > +	config \
> >  	include.sh \
> >  	settings \
> >  	test.py \
> 
> I don't believe this chunk is necessary, only files which the tests
> themselves need to _run_ need to be listed.
> 
> I dropped this chunk when applying, thanks!

Thank you!  Let me know if you run into any other issues.

Allison


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

end of thread, other threads:[~2026-03-24  6:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20  4:18 [PATCH net-next v3 0/2] selftests: rds: add config file and config.sh -c option Allison Henderson
2026-03-20  4:18 ` [PATCH net-next v3 1/2] selftests: rds: add tools/testing/selftests/net/rds/config Allison Henderson
2026-03-24  2:40   ` Jakub Kicinski
2026-03-24  6:29     ` Allison Henderson
2026-03-20  4:18 ` [PATCH net-next v3 2/2] selftests: rds: Add -c config option to rds/config.sh Allison Henderson

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