Re: [PATCH v3 2/5] t/helper/test-config: return exit codes consistently
On Sat, May 30, 2020 at 11:29 AM Elijah Newren <newren@gmail.com> wrote:
Show 11 quoted lines
>
> On Wed, May 27, 2020 at 6:13 PM Matheus Tavares
> <matheus.bernardino@usp.br> wrote:
> >
> > The test-config helper may exit with a variety of at least four
> > different codes, to reflect the status of the requested operations.
> > These codes are sometimes checked in the tests, but not all of the codes
> > are returned consistently by the helper: 1 will usually refer to a
> > "value not found", but usage errors can also return 1 or 128. The latter
>
> I'm not sure what "The latter" refers to here.
It would be the 128 exit code. I'll try to reword that for clarity.
Show 10 quoted lines
> > is also expected on errors within the configset functions. These
> > inconsistent uses of the exit codes can lead to false positives in the
> > tests. Although all tests that currently check the helper's exit code,
> > on errors, do also check the output, it's still better to standardize
> > the exit codes and avoid future problems in new tests. While we are
>
> That last sentence was slightly hard for me to parse. Maybe something like:
>
> ...Although all tests which expect errors and check the helper's exit
> code currently also check the output, it's still better...
Sounds better, I will use that for the next version. Thanks.