From: sashiko-bot@kernel.org
To: "Alexander Hölzl" <alexander.hoelzl@gmx.net>
Cc: "Oleksij Rempel" <o.rempel@pengutronix.de>,
linux-can@vger.kernel.org, "Vincent Mailhol" <mailhol@kernel.org>,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
"Oliver Hartkopp" <socketcan@hartkopp.net>
Subject: Re: [PATCH v4 3/3] j1939: add J1939 rx CTS tests
Date: Mon, 06 Jul 2026 22:52:49 +0000 [thread overview]
Message-ID: <20260706225250.0FD261F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260706224548.100451-3-alexander.hoelzl@gmx.net>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Missing closing quote in bash script `test_rx_cts.sh` causing unexpected EOF syntax error, breaking the test.
- [Low] Incorrect `sizeof()` argument used when validating the received abort payload.
- [Low] Strict timing assertions might cause flaky test failures on heavily loaded CI systems.
--
--- Patch [3]: [PATCH v4 3/3] j1939: add J1939 rx CTS tests ---
commit 21e063d80602f46f314c362808e394f235e646f9
Author: Alexander Hölzl <alexander.hoelzl@gmx.net>
j1939: add J1939 rx CTS tests
This commit adds tests to verify the correct behavior of received J1939
CTS messages. It covers normal segmented transmission, transmission resuming
after a hold, aborting on requested already acked messages, and aborting on
too many retransmit requests.
> diff --git a/tools/testing/selftests/net/can/test_rx_cts.c b/tools/testing/selftests/net/can/test_rx_cts.c
> new file mode 100644
> index 0000000000000..1b437792d6772
> --- /dev/null
> +++ b/tools/testing/selftests/net/can/test_rx_cts.c
[ ... ]
> + /*
> + * The actual timeout is 1050ms. We define an acceptable window
> + * to account for CI scheduling variations.
> + */
> + ASSERT_GE(elapsed_ms, 1000)
> + TH_LOG("Abort received too early: %ld ms", elapsed_ms);
> + ASSERT_LE(elapsed_ms, 1500)
> + TH_LOG("Abort received too late: %ld ms", elapsed_ms);
[Severity: Low]
This isn't a bug, but could this strict timing assertion cause flaky test
failures?
An upper bound of 1500ms provides only a 450ms window for the 1050ms kernel
timeout, which might be easily exceeded due to thread scheduling delays under
heavy load on oversubscribed or virtualized CI runners.
[ ... ]
> + /* Now send a CTS for an already acked frame */
> + memcpy(tx_frame.data, CTS_1_FRAME_PAYLOAD, sizeof(CTS_1_FRAME_PAYLOAD));
> + res = send(self->raw_sock, &tx_frame, sizeof(tx_frame), 0);
> + ASSERT_GT(res, 0)
> + TH_LOG("failed to send second cts(1) with raw sock: %d", errno);
> +
> + res = recv_payload(self->raw_sock, ABORT_DUP_SEQ_PAYLOAD, sizeof(DATA_2_PAYLOAD));
[Severity: Low]
Is this the correct size constant to use here?
It appears sizeof(ABORT_DUP_SEQ_PAYLOAD) should be used instead of
sizeof(DATA_2_PAYLOAD), even though both evaluate to 8 bytes.
[ ... ]
> diff --git a/tools/testing/selftests/net/can/test_rx_cts.sh b/tools/testing/selftests/net/can/test_rx_cts.sh
> new file mode 100755
> index 0000000000000..b2064ea7851e2
> --- /dev/null
> +++ b/tools/testing/selftests/net/can/test_rx_cts.sh
[ ... ]
> +test_rx_cts()
> +{
> + ./test_rx_cts
> + check_err $?
> + log_test "test_rx_cts
[Severity: Medium]
Does this missing closing double quote cause an unexpected EOF syntax error
during shell parsing?
This would completely prevent the test script from running.
> +}
> +
> +trap cleanup EXIT
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260706224548.100451-1-alexander.hoelzl@gmx.net?part=3
next prev parent reply other threads:[~2026-07-06 22:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 22:41 [PATCH v4 1/3] j1939: restrict amount of consecutive retransmission requests Alexander Hölzl
2026-07-06 22:41 ` [PATCH v4 2/3] j1939: fix implementation not handling holds correctly Alexander Hölzl
2026-07-06 22:58 ` sashiko-bot
2026-07-06 22:41 ` [PATCH v4 3/3] j1939: add J1939 rx CTS tests Alexander Hölzl
2026-07-06 22:52 ` sashiko-bot [this message]
2026-07-06 22:58 ` [PATCH v4 1/3] j1939: restrict amount of consecutive retransmission requests sashiko-bot
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=20260706225250.0FD261F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexander.hoelzl@gmx.net \
--cc=linux-can@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=o.rempel@pengutronix.de \
--cc=sashiko-reviews@lists.linux.dev \
--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