Re: [PATCH v2] cyclictest, cyclicdeadline: Exit with failure when breaktrace threshold is exceeded

Sebastian Andrzej Siewior <[email protected]>
Newsgroups org.kernel.vger.linux-rt-users
Message-ID <[email protected]>
On 2026-08-06 15:07:31 [+0300], Costa Shulyupin wrote:
> cyclictest and cyclicdeadline always exit 0 even when the latency
> threshold set by --breaktrace is exceeded, requiring test harnesses
> to parse output or json to detect a failed test.
> 
> Set ret to EXIT_FAILURE when break_thread_id is set, indicating the

This is misleading because 1 is also returned if you use the wrong
options, are now allowed to use the higher priority. You can't set it to
failure and claim in the docs that the threshold has been reach. This
might have happen, there might be another reason.

Why not pick a dedicated exit code value for this scenario and document
it as such and use it for this purpose only.

> breaktrace threshold was hit.  The exit code enables shell expressions
> like "cyclictest ... && echo PASS" and seamless integration with testing
> frameworks.  Also pass ret to rt_write_json() in cyclicdeadline so the
> JSON output reflects the failure.
> 
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Costa Shulyupin <[email protected]>

Sebastian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.