Re: [rtla 08/13] rtla: Use standard exit codes for result enum
From: Wander Lairson Costa
Date: Fri Nov 28 2025 - 09:04:39 EST
On Fri, Nov 28, 2025 at 10:18 AM Costa Shulyupin <costa.shul@xxxxxxxxxx> wrote:
>
> On Mon, 17 Nov 2025 at 20:56, Wander Lairson Costa <wander@xxxxxxxxxx> wrote:
> >
> >
> > - PASSED = 0, /* same as EXIT_SUCCESS */
> > - ERROR = 1, /* same as EXIT_FAILURE, an error in arguments */
> > - FAILED = 2, /* test hit the stop tracing condition */
> > + PASSED = EXIT_SUCCESS,
> > + ERROR = EXIT_FAILURE,
> > + FAILED, /* test hit the stop tracing condition */
>
> The exit codes are defined as numbers internationally because it provides direct translation from numbers to codes and vice versa. Additional indirection doesn't add to readability.
>
I believe that where it is written "internationally" reads
"intentionally" (happens to me all the time). The main motivation is
to use the standard C library exit codes when calling exit().
> Costa
>
>
> ________________________________
> Hi Wander,
>
> Additional indirection does not add to readability.
>
> Thanks,
> Costa