[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: return values of test programs in *.m4 macros

From: Jim Meyering
Subject: Re: return values of test programs in *.m4 macros
Date: Wed, 01 Dec 2010 07:18:28 +0100

Bruno Haible wrote:

> Hi,
> For a long time, we've written our test programs in *.m4 macros in such a way
> that when they fail, the return code is 1.
> But often we have several tests, combined in a single program.
> Example: m4/utimes.m4.
> Eric's new style is to use a different return code (1, 2, 3, ...) at every
> possible failure point. This return code is then printed in the config.log.
> Example: m4/chown.m4.
> Or even bit masks, as in m4/fcntl-o.m4.
> I'd like to extend this style to all AC_RUN_IFELSE invocations in gnulib,
> so that
>   1) When gnulib is being ported to a new platform, we can understand
>      which of the portability flaws affect the platform, without running
>      test programs by hand, just by running ./configure and analyzing
>      config.log.
>   2) Sometimes parts of tests are unreliable (e.g. m4/utimes.m4 on NFS
>      mounted file systems). When someone reports a test failure, here too
>      it is convenient for us to be able to say "send us your config.log"
>      rather than having to execute test programs by hand.
> Of course these return codes shall all be < 126.
> Opinions? Objections?

It would be an improvement.
I see no disadvantage.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]