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>, libc-alpha at sourceware dot org
- Cc: joseph at codesourcery dot com, adhemerval dot zanella at linaro dot org
- Date: Wed, 1 Mar 2017 15:19:35 -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>
On 02/25/2017 11:34 AM, Zack Weinberg wrote:
> On 02/20/2017 09:11 AM, Carlos O'Donell wrote:
>> On 02/20/2017 08:03 AM, Zack Weinberg wrote:
>>>
>>> posix/wordexp-test.c used libc-internal.h for PTR_ALIGN_DOWN; I
>>> duplicated the definition into the .c file, which is not ideal, but
>>> since this didn't come up anywhere else, inventing a new header for it
>>> seems like excessive polish.
>>
>> Please add PTR_ALIGN_DOWN to the support/ subsystem for testing and port
>> the test to support/.
>>
>> We will conceivably need similar macros for other tests and as a glibc
>> developer I like to have access to the same helper macros I use in glib.
>
> 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?
Yeah, that seems like a sensible compromise.
--
Cheers,
Carlos.