This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/4] Miscellaneous 'safe' testsuite changes.
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Zack Weinberg <zackw at panix dot com>, Florian Weimer <fw at deneb dot enyo dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Joseph Myers <joseph at codesourcery dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Wed, 1 Mar 2017 13:22:01 -0500
- Subject: Re: [PATCH 3/4] Miscellaneous 'safe' testsuite changes.
- Authentication-results: sourceware.org; auth=none
- References: <20170220130342.6373-1-zackw@panix.com> <20170220130342.6373-2-zackw@panix.com> <20170220130342.6373-3-zackw@panix.com> <20170220130342.6373-4-zackw@panix.com> <8c498c93-b2cf-a2af-a741-bc721ac47f6e@redhat.com> <f37b8c3f-5994-102f-219a-8a4dffafbd16@panix.com> <87k28eugjp.fsf@mid.deneb.enyo.de> <CAKCAbMgjBQwhebioj4my9kQ4zVkwnzDupzhV79gzPBnZ4ha0Aw@mail.gmail.com>
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.