[PATCH 3/4] Miscellaneous 'safe' testsuite changes.
Zack Weinberg
zackw@panix.com
Mon Feb 27 01:38:00 GMT 2017
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.
zw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Narrowing-the-visibility-of-libc-internal.h-even-fur.patch
Type: text/x-patch
Size: 32834 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170227/f0dd209e/attachment.bin>
More information about the Libc-alpha
mailing list