This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] Miscellaneous 'safe' testsuite changes.


On 02/26/2017 08:37 PM, Zack Weinberg wrote:
> On Sat, Feb 25, 2017 at 4:06 PM, Florian Weimer <fw@deneb.enyo.de> wrote:
>> * Zack Weinberg:
>>
>>> wordexp-test.c is currently not even using the old test skeleton, and
>>> does some fairly hairy things with fork handlers.  I would prefer not to
>>> go down a rabbit hole.  Instead I propose to do something similar to
>>> what I did for the DIAG_* macros: introduce a new header in include/
>>> called libc-pointer-arith.h; move cast_to_integer, ALIGN_UP, ALIGN_DOWN,
>>> PTR_ALIGN_UP, and PTR_ALIGN_DOWN there; have libc-internal.h include it;
>>> have wordexp-test.c include it instead of libc-internal.h; and call that
>>> good enough for now.  OK?
>>
>> If we move into that direction, can we also replace #include
>> <libc-internal.h> in sysdeps/x86_64/nptl/tls.h?
>>
>> I think this is one major cause why things compile on x86-64, but not
>> other architectures.
> 
> I looked into that, and it turns out that the users of libc-internal.h
> divide neatly into four classes: those that want the DIAG_* macros,
> those that want the ALIGN macros, those that want the other stuff
> (mostly early init), and those that don't need it at all.  See
> attached - not quite fully baked but does pass many-glibcs tests.  I'm
> not sure you're going to get your wish, because x86/nptl/tls.h does
> need to keep including libc-pointer-arith.h, and the #1 cause of
> failures in many-glibcs that I didn't see in a regular x86-64 build
> was ... needing to include libc-pointer-arith.h.  But this still seems
> like a good cleanup.

This looks good to me.

-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]