[Top][All Lists]

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

return values of test programs in *.m4 macros

From: Bruno Haible
Subject: return values of test programs in *.m4 macros
Date: Tue, 30 Nov 2010 04:07:27 +0100
User-agent: KMail/1.9.9


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
  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?


reply via email to

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