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 v3 3/9] selftests: can: add J1939 base functional tests
Date: Fri, 13 Nov 2026 06:01:59 +0000 [thread overview]
Message-ID: <179454971912.488853.3001942751202375383@kernel.org> (raw)
In-Reply-To: <20261111-j1939-selftests-v3-3-5a80277ab363@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] test_j1939_base never opens a CAN_RAW socket, yet it skips the
whole suite when CAN_RAW is missing.
--
selftests: can: add J1939 base functional tests
This adds a J1939 functional selftest. It sends between CAN_J1939 sockets
over vcan and checks payload integrity for single frame, TP and ETP sizes,
the boundaries between them, and single-frame and BAM broadcast. It also
enables CONFIG_CAN_J1939 and CONFIG_CAN_RAW in the selftest config.
> diff --git a/tools/testing/selftests/net/can/test_j1939_base.c b/tools/testing/selftests/net/can/test_j1939_base.c
> new file mode 100644
> index 0000000000000..7bf492c767bf6
> --- /dev/null
> +++ b/tools/testing/selftests/net/can/test_j1939_base.c
> @@ -0,0 +1,236 @@
[ ... ]
> +int main(int argc, char **argv)
> +{
> + return j1939_test_main(argc, argv);
> +}
[Severity: Low]
Is this binary skipped on a kernel that has CONFIG_CAN_J1939 but not
CONFIG_CAN_RAW?
In j1939_tests.h, j1939_test_main() makes every J1939 binary depend on
CAN_RAW:
if (can_proto_missing(SOCK_RAW, CAN_RAW)) {
fprintf(stderr, "# kernel lacks CAN_RAW\n");
return KSFT_SKIP;
}
test_j1939_base only uses SOCK_DGRAM/CAN_J1939 sockets:
- pair_up_ok() calls j1939_open_flags() and j1939_connect_ok().
- bcast_needs_so_broadcast calls j1939_open().
- The data path is send_recv_verify_ok() and recv_timeout() on those
sockets.
Nothing in this file calls open_raw(), open_raw_rcvbuf() or
J1939_SETUP_RAW.
On such a kernel, the single frame, TP, ETP, size boundary, broadcast, BAM
and SO_BROADCAST tests would all report SKIP, even though they could run.
The v2 changelog says CONFIG_CAN_RAW is added here because "every test
needs it". That seems true only because of this check, not because of
anything the base test does.
Could the CAN_RAW check move into the binaries that actually open raw
sockets, or become a per-binary or per-test requirement?
The check itself came from the earlier patch in this series ("selftests:
can: add J1939 test helper header and library"). This is the first binary
that gets skipped by it for no reason.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261111-j1939-selftests-v3-0-5a80277ab363%40pengutronix.de
next prev parent reply other threads:[~2026-11-13 6:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 15:25 [PATCH can-next v3 0/9] selftests: can: add J1939 socket and transport tests Oleksij Rempel
2026-11-11 15:25 ` [PATCH can-next v3 1/9] selftests: can: install net/lib.sh with the CAN tests Oleksij Rempel
2026-11-11 15:25 ` [PATCH can-next v3 2/9] selftests: can: add J1939 test helper header and library Oleksij Rempel
2026-11-11 15:25 ` [PATCH can-next v3 3/9] selftests: can: add J1939 base functional tests Oleksij Rempel
2026-11-13 6:01 ` netdev-bot+sashiko [this message]
2026-11-11 15:25 ` [PATCH can-next v3 4/9] selftests: can: add J1939 socket option and metadata tests Oleksij Rempel
2026-11-13 6:02 ` netdev-bot+sashiko
2026-11-11 15:25 ` [PATCH can-next v3 5/9] selftests: can: add J1939 addressing and concurrency tests Oleksij Rempel
2026-11-13 6:02 ` netdev-bot+sashiko
2026-11-11 15:25 ` [PATCH can-next v3 6/9] selftests: can: add J1939 wire-format tests against CAN_RAW Oleksij Rempel
2026-11-11 15:25 ` [PATCH can-next v3 7/9] selftests: can: add J1939 TP/ETP multi-frame " Oleksij Rempel
2026-11-13 6:02 ` netdev-bot+sashiko
2026-11-11 15:25 ` [PATCH can-next v3 8/9] selftests: can: cover J1939 transport abort and timeout paths Oleksij Rempel
2026-11-11 15:25 ` [PATCH can-next v3 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=179454971912.488853.3001942751202375383@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®