Re: [PATCH v1] rtla: Set distinctive exit value for failed tests
From: Tomas Glozar
Date: Thu Apr 17 2025 - 05:02:44 EST
čt 17. 4. 2025 v 10:48 odesílatel Costa Shulyupin
<costa.shul@xxxxxxxxxx> napsal:
> Although it is technically possible to rely on a failed value zero, I
> suppose it is very unexpected. I expect current users only grep the
> output of rtla.
> I think adding a new command line argument is overcomplicated. Adding
> a new command-line argument for this seems unnecessarily complex, and
> I'm not aware of any Linux/POSIX tools that offer such an option.
>
Alright, you convinced me, I unnecessarily exaggerated the impact of
the exit value change. It's common for Unix tools like grep to return
2 on "unclean" result ("no match found" in the case of grep,
"measurement aborted prematurely because of threshold violated" in the
case of rtla). If users are expecting 0, they can be adjusted to
accommodate for both the old and new behavior without issue.
I'll reply with a review on the main thread later.
Tomas