From: netdev-bot+sashiko@kernel.org
To: o.rempel@pengutronix.de
Cc: robin@protonic.nl, socketcan@hartkopp.net, mkl@pengutronix.de,
shuah@kernel.org, kernel@pengutronix.de,
linux-can@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, fmaurer@redhat.com,
mailhol@kernel.org, alexander.hoelzl@gmx.net,
quchaosheng000406@163.com, penguin-kernel@I-love.SAKURA.ne.jp,
kuba@kernel.org
Subject: Re: [PATCH can-next v4 2/9] selftests: can: add J1939 test helper header and library
Date: Thu, 19 Nov 2026 23:54:36 +0000 [thread overview]
Message-ID: <179513247684.3132.16965169120419676697@kernel.org> (raw)
In-Reply-To: <20261118-j1939-selftests-v4-2-756768d32ff2@pengutronix.de>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] Baseline decision: false positive.
--
selftests: can: add J1939 test helper header and library
This commit adds the shared code for the upcoming J1939 selftests: the C
helpers in j1939_helpers.c/.h, the harness glue in j1939_tests.h, and the
j1939_lib.sh vcan setup and runner. It also adds j1939_gw, which sets up
CAN gateway rules so that the CAN_RAW peer can sit on its own vcan,
separate from the J1939 sockets.
> diff --git a/tools/testing/selftests/net/can/j1939_lib.sh b/tools/testing/selftests/net/can/j1939_lib.sh
> new file mode 100644
> index 0000000000000..796022760e487
> --- /dev/null
> +++ b/tools/testing/selftests/net/can/j1939_lib.sh
[ ... ]
> +setup()
> +{
> + vcan_setup "$CANIF"
> +
> + # shared or none: no second vcan
> + [ "$j1939_peer" = gateway ] || return 0
> +
> + if [ "$CANIF_RAW" = "$CANIF" ]; then
> + echo "SKIP: CANIF_RAW is CANIF ($CANIF); set another CANIF_RAW or J1939_SHARED_IF=1"
> + exit "$ksft_skip"
> + fi
> +
> + vcan_setup "$CANIF_RAW"
> +
> + # rtnetlink does not load can-gw on demand
> + modprobe -q can-gw 2>/dev/null
> +
> + if ! "$(dirname "$0")/j1939_gw" "$CANIF" "$CANIF_RAW"; then
[Severity: Low]
This isn't a bug, but at this patch tools/testing/selftests/net/can/config
still contains only:
CONFIG_CAN=m
CONFIG_CAN_DEV=m
CONFIG_CAN_VCAN=m
In the default gateway mode, setup() needs CAN_GW. The checks in
j1939_test_main() need CAN_J1939, and CAN_RAW too when a test passes
J1939_NEEDS_RAW:
if (can_proto_missing(SOCK_DGRAM, CAN_J1939)) {
fprintf(stderr, "# kernel lacks CAN_J1939\n");
return KSFT_SKIP;
}
A kernel built only from this fragment would skip every J1939 test.
At this patch nothing goes wrong. TEST_PROGS is still only
test_raw_filter.sh, so no test reaches j1939_lib.sh or j1939_test_main()
yet.
The next patch in the series, "selftests: can: add J1939 base functional
tests", adds the first J1939 test. In the same patch it adds
CONFIG_CAN_GW=m, CONFIG_CAN_J1939=m and CONFIG_CAN_RAW=m to the fragment,
so this is resolved later in the series.
Would it be clearer to add those options here, next to the library and
j1939_gw that depend on them, or is the current split intended?
> + echo "SKIP: cannot route $CANIF <-> $CANIF_RAW (can-gw?); try J1939_SHARED_IF=1"
> + exit "$ksft_skip"
> + fi
> +}
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118-j1939-selftests-v4-0-756768d32ff2%40pengutronix.de
next prev parent reply other threads:[~2026-11-19 23:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 8:42 [PATCH can-next v4 0/9] selftests: can: add J1939 socket and transport tests Oleksij Rempel
2026-11-18 8:42 ` [PATCH can-next v4 1/9] selftests: can: install net/lib.sh with the CAN tests Oleksij Rempel
2026-11-18 8:42 ` [PATCH can-next v4 2/9] selftests: can: add J1939 test helper header and library Oleksij Rempel
2026-11-19 23:54 ` netdev-bot+sashiko [this message]
2026-11-18 8:42 ` [PATCH can-next v4 3/9] selftests: can: add J1939 base functional tests Oleksij Rempel
2026-11-18 8:42 ` [PATCH can-next v4 4/9] selftests: can: add J1939 socket option and metadata tests Oleksij Rempel
2026-11-18 8:42 ` [PATCH can-next v4 5/9] selftests: can: add J1939 addressing and concurrency tests Oleksij Rempel
2026-11-18 8:42 ` [PATCH can-next v4 6/9] selftests: can: add J1939 wire-format tests against CAN_RAW Oleksij Rempel
2026-11-18 8:42 ` [PATCH can-next v4 7/9] selftests: can: add J1939 TP/ETP multi-frame " Oleksij Rempel
2026-11-19 23:54 ` netdev-bot+sashiko
2026-11-18 8:42 ` [PATCH can-next v4 8/9] selftests: can: cover J1939 transport abort and timeout paths Oleksij Rempel
2026-11-18 8:42 ` [PATCH can-next v4 9/9] selftests: can: check SO_J1939_PROMISC receive effect Oleksij Rempel
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=179513247684.3132.16965169120419676697@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=alexander.hoelzl@gmx.net \
--cc=fmaurer@redhat.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=o.rempel@pengutronix.de \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=quchaosheng000406@163.com \
--cc=robin@protonic.nl \
--cc=shuah@kernel.org \
--cc=socketcan@hartkopp.net \
/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 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®