[PATCH] Extend tst-{atexit,at_quick_exit,cxa_atexit,onexit} to verify inheritance across fork

Carlos O'Donell carlos@redhat.com
Mon Aug 28 20:38:00 GMT 2017


On 08/28/2017 04:01 PM, Florian Weimer wrote:
> On 08/28/2017 09:47 PM, Carlos O'Donell wrote:
> 
>> Checking for ATEXIT_MAX shouldn't be too much harder... ;-)
> 
> POSIX does not allow us to define _SC_ATEXIT_MAX because there is no
> actual limit (beyond available memory).  The INT_MAX return value is a bug.

My apologies, I should have been clearer.

The test case *must* test that you can at least register 32 handlers without
error since POSIX Issue 7 mandates this is the minimum number that must be
supported. This way the test case checks for the minimum.

We don't need to check the maximum. Checking for the maximum is more expensive
than just making sure you can register and call 32 handlers.

> I filed a bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22020

Now you've added the need for another test case which should verify that
_SC_ATEXIT_MAX returns -1?

Cheers,
Carlos.



More information about the Libc-alpha mailing list