Consensus on unit tests?

Florian Weimer fweimer@redhat.com
Mon Jul 4 19:07:00 GMT 2016


On 07/04/2016 04:27 PM, Carlos O'Donell wrote:
> On 07/01/2016 02:43 AM, Florian Weimer wrote:
>> On 06/25/2016 01:59 AM, Carlos O'Donell wrote:
>>
>>> I would like to remove the superfluous condition and add a unit
>>> test for all the cases that define the way the interface should
>>> behave.
>>>
>>> Since Florian asked for pretty diagrams, I have included them.
>>
>> I can't quote your patch due to the way it is included in the message
>> (inline text after the signature).
>
> I can certainly adjust the way I inline my messages if that helps.
> Out of curiosity, what MUA are you using?

Thunderbird.  It usually does not have these problems, but this time, 
the patch was included inline after the signature separator.  Somehow, 
Thunderbird ended up treating it as if format=flowed was specified.

>> What's unclear based on the documentation if the address has to fall
>> in the range covered by the link map (i.e., if there are indeed only
>> three cases, or five).  If there is indeed a precondition that the
>> address is in some special range, you should add it to the comment.
>
> There is no precondition that I am aware of. I have clarified the
> new patch to say "loadable segment" where I previously said "segment"
> to make it more clear.

Not even things like “a segment must not cover more than half of the 
address space” or “a segment must not cross the middle of the address 
space”?  Or addr >= l->l_addr?

Intuitively, I would expect that a straight interval comparison as you 
wrote it, without any additional checks, would need an additional bit 
beyond the word size for it to be correct.

Florian



More information about the Libc-alpha mailing list