mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH can-next v4 0/9] selftests: can: add J1939 socket and transport tests
@ 2026-11-18  8:42 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
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Oleksij Rempel @ 2026-11-18  8:42 UTC (permalink / raw)
  To: Robin van der Gracht, Oliver Hartkopp, Marc Kleine-Budde, Shuah Khan
  Cc: kernel, linux-can, linux-kernel, linux-kselftest, Felix Maurer,
	Vincent Mailhol, Alexander Hölzl, Chaosheng Qu,
	Tetsuo Handa, Oleksij Rempel

net/can/j1939 has had no in-tree selftests. This series adds a kselftest
suite for the J1939 socket layer and the TP/ETP transport, run on vcan.
All test programs except test_j1939_base use a CAN_RAW socket as an
independent on-the-wire peer. By default the wrapper scripts put the peer
on a second vcan, and the CAN gateway routes frames between the two.

The timer checks are relaxed by default, for slow CI machines;
J1939_STRICT_TIMING selects tight bounds.

The tests in this series do not cover every path of the stack. They
cover the main paths of the socket layer, address claiming and the
TP/ETP transport.

This series changes no kernel code. To keep it at a manageable size, it
deliberately leaves out tests that would run into known bugs in the stack.
Where the tests work around such a bug, the patches say so. Tests for
these bugs belong with their fixes.

I used Claude Code (mainly Claude Opus 5.5) to write most of the test
code, the commit messages, the Q&As and the changelogs, and to review
them. I have read, edited and run all of it myself, on vcan under QEMU.

v1: https://lore.kernel.org/all/20261014154435.3577983-1-o.rempel@pengutronix.de/
v2: https://lore.kernel.org/all/20261104-j1939-selftests-v2-0-cf797c83317b@pengutronix.de/
v3: https://lore.kernel.org/all/20261111-j1939-selftests-v3-0-5a80277ab363@pengutronix.de/

---
Oleksij Rempel (9):
      selftests: can: install net/lib.sh with the CAN tests
      selftests: can: add J1939 test helper header and library
      selftests: can: add J1939 base functional tests
      selftests: can: add J1939 socket option and metadata tests
      selftests: can: add J1939 addressing and concurrency tests
      selftests: can: add J1939 wire-format tests against CAN_RAW
      selftests: can: add J1939 TP/ETP multi-frame tests against CAN_RAW
      selftests: can: cover J1939 transport abort and timeout paths
      selftests: can: check SO_J1939_PROMISC receive effect

 tools/testing/selftests/net/can/.gitignore         |   6 +
 tools/testing/selftests/net/can/Makefile           |  23 +-
 tools/testing/selftests/net/can/config             |   3 +
 tools/testing/selftests/net/can/j1939_gw.c         | 125 +++
 tools/testing/selftests/net/can/j1939_helpers.c    | 550 ++++++++++++
 tools/testing/selftests/net/can/j1939_helpers.h    | 391 +++++++++
 tools/testing/selftests/net/can/j1939_lib.sh       | 141 +++
 tools/testing/selftests/net/can/j1939_tests.h      |  99 +++
 tools/testing/selftests/net/can/test_j1939_addr.c  | 737 ++++++++++++++++
 tools/testing/selftests/net/can/test_j1939_addr.sh |   4 +
 tools/testing/selftests/net/can/test_j1939_base.c  | 239 ++++++
 tools/testing/selftests/net/can/test_j1939_base.sh |   7 +
 tools/testing/selftests/net/can/test_j1939_multi.c | 947 +++++++++++++++++++++
 .../testing/selftests/net/can/test_j1939_multi.sh  |   4 +
 tools/testing/selftests/net/can/test_j1939_opts.c  | 440 ++++++++++
 tools/testing/selftests/net/can/test_j1939_opts.sh |   4 +
 tools/testing/selftests/net/can/test_j1939_wire.c  | 190 +++++
 tools/testing/selftests/net/can/test_j1939_wire.sh |   4 +
 18 files changed, 3912 insertions(+), 2 deletions(-)
---
base-commit: 6584acd42820478910a771efb28a355a707e9cb0
change-id: 20261104-j1939-selftests-12fc860698c0

Best regards,
-- 
Oleksij Rempel <o.rempel@pengutronix.de>


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

end of thread, other threads:[~2026-11-20 10:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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-20 10:30     ` Marc Kleine-Budde
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

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®