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

2010-12-06 Thread Bruno Haible
Hi Eric, Ralf, I've now pushed the big patch, with some explanations in m4/README (attached below). Ralf Wildenhues wrote: > Well, I think what Eric was hinting at was that, for example, some tests > in Autoconf's and Automake's own test suites interpret an exit status of > 77 from a configure ex

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

2010-12-05 Thread Ralf Wildenhues
Hello, * Bruno Haible wrote on Sun, Dec 05, 2010 at 02:12:49AM CET: > > If the particular > > combination of failures matches 63, 77, or 99 (as commonly used by > > automake and autoconf to mean version mismatch, skip, or hard fail), > > then the configure script might misbehave. > > In the gener

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

2010-12-04 Thread Bruno Haible
Hi Eric, > If the particular > combination of failures matches 63, 77, or 99 (as commonly used by > automake and autoconf to mean version mismatch, skip, or hard fail), > then the configure script might misbehave. In the generated configure scripts, AC_RUN_IFELSE tests for an exit code equal to 0

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

2010-12-04 Thread Eric Blake
On 12/04/2010 11:44 AM, Bruno Haible wrote: > Eric, Paul, Jim, > >> That sort of thing (possibly with bit masks, as you mention) >> sounds like a win to me. > > Thanks for your support. > > Eric Blake wrote: >> A bit-mask approach gives more information, >> but may be a bit harder to code, and y

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

2010-12-04 Thread Bruno Haible
John Darrington wrote: > I'd like to extend this style to all AC_RUN_IFELSE invocations in gnulib, > ... > Autoconf and some other projects use the return code 77 to indicate that a > test > neither passed nor failed, but could not be conducted. I'm talking about programs run through A

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

2010-12-01 Thread John Darrington
On Tue, Nov 30, 2010 at 04:07:27AM +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

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

2010-12-01 Thread Jim Meyering
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 cod

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

2010-11-30 Thread Eric Blake
On 11/29/2010 08:07 PM, 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

return values of test programs in *.m4 macros

2010-11-30 Thread Bruno Haible
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 f