From: Leon Romanovsky <leon@kernel.org>
To: Chenguang Zhao <zhaochenguang@kylinos.cn>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Shuah Khan <shuah@kernel.org>,
Zhu Yanjun <yanjun.zhu@linux.dev>,
linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v3] RDMA/CM: add RDMA CM observability regression scripts
Date: Tue, 9 Jun 2026 19:00:33 +0300 [thread overview]
Message-ID: <20260609160033.GD327369@unreal> (raw)
In-Reply-To: <20260506060305.891564-1-zhaochenguang@kylinos.cn>
On Wed, May 06, 2026 at 02:03:05PM +0800, Chenguang Zhao wrote:
> This adds a minimal RDMA CM selftest suite that captures observability
> baselines and runs trace, counter-delta, and fault-injection-oriented
> checks, plus a review-loop helper for repeated validation rounds.
>
> Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
> ---
> v3:
> TARGET += rdma is already present, remove it
> as suggested by Yanjun.
>
> v2:
> https://lore.kernel.org/all/20260428071216.1212775-1-zhaochenguang@kylinos.cn/
>
> v1:
> https://lore.kernel.org/all/20260416062224.1546388-1-zhaochenguang@kylinos.cn/
> ---
> tools/testing/selftests/rdma/Makefile | 10 ++
> tools/testing/selftests/rdma/config | 6 +
> .../selftests/rdma/rdma_cm_baseline.sh | 58 ++++++++
> .../selftests/rdma/rdma_cm_counter_delta.sh | 72 ++++++++++
> .../selftests/rdma/rdma_cm_fault_injection.sh | 95 +++++++++++++
> .../selftests/rdma/rdma_cm_review_loop.sh | 35 +++++
> .../selftests/rdma/rdma_cm_trace_sequence.sh | 83 ++++++++++++
> tools/testing/selftests/rdma/rdma_common.sh | 126 ++++++++++++++++++
> 8 files changed, 485 insertions(+)
> create mode 100755 tools/testing/selftests/rdma/rdma_cm_baseline.sh
> create mode 100755 tools/testing/selftests/rdma/rdma_cm_counter_delta.sh
> create mode 100755 tools/testing/selftests/rdma/rdma_cm_fault_injection.sh
> create mode 100755 tools/testing/selftests/rdma/rdma_cm_review_loop.sh
> create mode 100755 tools/testing/selftests/rdma/rdma_cm_trace_sequence.sh
> create mode 100755 tools/testing/selftests/rdma/rdma_common.sh
>
> diff --git a/tools/testing/selftests/rdma/Makefile b/tools/testing/selftests/rdma/Makefile
> index 7dd7cba7a73c..04c52db4b9d9 100644
> --- a/tools/testing/selftests/rdma/Makefile
> +++ b/tools/testing/selftests/rdma/Makefile
> @@ -4,4 +4,14 @@ TEST_PROGS := rxe_rping_between_netns.sh \
> rxe_socket_with_netns.sh \
> rxe_test_NETDEV_UNREGISTER.sh
>
> +TEST_PROGS += \
> + rdma_cm_baseline.sh \
> + rdma_cm_trace_sequence.sh \
> + rdma_cm_counter_delta.sh \
> + rdma_cm_fault_injection.sh
> +
> +TEST_FILES += \
> + rdma_common.sh \
> + rdma_cm_review_loop.sh
> +
> include ../lib.mk
> diff --git a/tools/testing/selftests/rdma/config b/tools/testing/selftests/rdma/config
> index 4ffb814e253b..e22141838c19 100644
> --- a/tools/testing/selftests/rdma/config
> +++ b/tools/testing/selftests/rdma/config
> @@ -1,3 +1,9 @@
> CONFIG_TUN
> CONFIG_VETH
> CONFIG_RDMA_RXE
> +CONFIG_DEBUG_KERNEL
> +CONFIG_FAULT_INJECTION
> +CONFIG_SYSFS
> +CONFIG_DEBUG_FS
> +CONFIG_FAULT_INJECTION_DEBUG_FS
> +CONFIG_FAILSLAB
> diff --git a/tools/testing/selftests/rdma/rdma_cm_baseline.sh b/tools/testing/selftests/rdma/rdma_cm_baseline.sh
> new file mode 100755
> index 000000000000..b0d8b3e46470
> --- /dev/null
> +++ b/tools/testing/selftests/rdma/rdma_cm_baseline.sh
> @@ -0,0 +1,58 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +
> +set -euo pipefail
> +
> +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
> +source "${SCRIPT_DIR}/rdma_common.sh"
> +
> +require_root
> +require_cmd date
> +require_cmd uname
> +
> +trace_dir="$(tracefs_dir || true)"
> +counter_root="$(find_cm_counter_root || true)"
> +out_dir="/tmp/rdma_cm_baseline.$(date +%s)"
> +dmesg_lines=400
> +dmesg_pattern="ib_cm|infiniband|rdma|roce|mlx|hns_roce|irdma|siw|rxe"
Sorry that it took so long to review this.
Please address Sashiko’s comments regarding 'fault injection most likely
not enabled here' and 'statistics check in wrong port':
https://sashiko.dev/#/patchset/20260506060305.891564-1-zhaochenguang@kylinos.cn
Also, 'dmesg_pattern' is not a scalable option. You should not rely on
the dmesg print format.
Thanks
prev parent reply other threads:[~2026-06-09 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 6:03 [PATCH v3] RDMA/CM: add RDMA CM observability regression scripts Chenguang Zhao
2026-06-09 16:00 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260609160033.GD327369@unreal \
--to=leon@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=yanjun.zhu@linux.dev \
--cc=zhaochenguang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.