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/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?

zw


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