[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: Eric Blake
Subject: Re: return values of test programs in *.m4 macros
Date: Sat, 04 Dec 2010 13:15:47 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

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 you are still limited to only 6
>> failures before you run afoul of $? limitations.
> It's a bit harder, yes. One needs to think about whether it's useful
> to execute the second line of code after the first line fails.
> And one is limited to 7 possible bits that can be set. A return
> value of 126 or 127 as a bit combination is extremely unlikely,
> because it would mean that 6 out of 7 independent bugs are all
> present on that particular machine.

One other thing to be careful of with bit masks.  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.  Enumerated failures, while
only providing the first failure rather than a combination of failures,
are less likely to get that high.

> Here's the proposed patch. To exclude typos and normal mistakes,
> I tested it on 11 different platforms, to verify that all cache
> variables and the entire config.status come out the same, with
> and without the patch.

Thanks for tackling this.  I haven't looked closely at it yet, but given
your testing, it's probably won't need much further tweaking.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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