public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Pre-approval for #include adjustments to the testsuite
@ 2017-02-16 14:39 Zack Weinberg
  2017-02-16 15:13 ` Joseph Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Zack Weinberg @ 2017-02-16 14:39 UTC (permalink / raw)
  To: GNU C Library, Joseph Myers

I'm working on a patch to compile as much of the testsuite as possible
in _ISOMAC mode, as a step toward compiling the testsuite against
installed headers.  This has a lot of tentacles and isn't even close to
ready for review yet, but the bulk of the changes required turn out to
be boring and repetitive: the wrapper headers include each other
casually, so lots of test programs are missing #includes that they
really should have.  For instance, many of the io/tst-*at.c programs are
getting away with not including sys/stat.h because include/stdlib.h does
it for them.  Here's an excerpt from the changelog for the current
iteration of the patch:

    	* dirent/opendir-tst1.c: Include sys/stat.h.
    	* dirent/tst-fdopendir.c: Include sys/stat.h.
    	* dirent/tst-fdopendir2.c: Include stdlib.h.
    	* dirent/tst-scandir.c: Include stdbool.h.
    	* elf/tst-auditmod1.c: Include link.h and stddef.h.
    	* elf/tst-tls15.c: Include stdlib.h.
    	* elf/tst-tls16.c: Include stdlib.h.
    	* elf/tst-tls17.c: Include stdlib.h.
    	* elf/tst-tls18.c: Include stdlib.h.
    	* iconv/tst-iconv6.c: Include endian.h.
    	* iconvdata/bug-iconv11.c: Include limits.h.
    	* io/test-utime.c: Include stdint.h.
	...

You get the idea.  To reduce churn and make the core patch easier to
review, I would like to commit changes like these piecemeal, ahead of
the main patch.  So I'm asking for blanket pre-approval to commit
additions and/or removals of #include lines to files that are part of
the testsuite, making no other changes.  Is that OK?

zw

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Pre-approval for #include adjustments to the testsuite
  2017-02-16 14:39 Pre-approval for #include adjustments to the testsuite Zack Weinberg
@ 2017-02-16 15:13 ` Joseph Myers
  2017-02-16 16:54   ` Carlos O'Donell
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph Myers @ 2017-02-16 15:13 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: GNU C Library

On Thu, 16 Feb 2017, Zack Weinberg wrote:

> You get the idea.  To reduce churn and make the core patch easier to
> review, I would like to commit changes like these piecemeal, ahead of
> the main patch.  So I'm asking for blanket pre-approval to commit
> additions and/or removals of #include lines to files that are part of
> the testsuite, making no other changes.  Is that OK?

We already have 
<https://sourceware.org/glibc/wiki/Consensus#Trivial_Bug-Fix_Changes> 
"Anyone can commit a change adding missing #include directives where it is 
clear what the right header is for functionality used in a source file. 
Post the patch and ChangeLog to libc-alpha with a short message and then 
push the commit.".  The intent was for the situation "code compiles on one 
architecture where the sysdeps headers include the required header 
indirectly, doesn't compile on another architecture where the sysdeps 
headers don't have that include".  But I think it's equally reasonable to 
apply it to cases where code is relying on implicit inclusions by wrapper 
headers.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Pre-approval for #include adjustments to the testsuite
  2017-02-16 15:13 ` Joseph Myers
@ 2017-02-16 16:54   ` Carlos O'Donell
  2017-02-16 17:00     ` Zack Weinberg
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos O'Donell @ 2017-02-16 16:54 UTC (permalink / raw)
  To: Joseph Myers, Zack Weinberg; +Cc: GNU C Library

On 02/16/2017 10:12 AM, Joseph Myers wrote:
> On Thu, 16 Feb 2017, Zack Weinberg wrote:
> 
>> You get the idea.  To reduce churn and make the core patch easier to
>> review, I would like to commit changes like these piecemeal, ahead of
>> the main patch.  So I'm asking for blanket pre-approval to commit
>> additions and/or removals of #include lines to files that are part of
>> the testsuite, making no other changes.  Is that OK?
> 
> We already have 
> <https://sourceware.org/glibc/wiki/Consensus#Trivial_Bug-Fix_Changes> 
> "Anyone can commit a change adding missing #include directives where it is 
> clear what the right header is for functionality used in a source file. 
> Post the patch and ChangeLog to libc-alpha with a short message and then 
> push the commit.".  The intent was for the situation "code compiles on one 
> architecture where the sysdeps headers include the required header 
> indirectly, doesn't compile on another architecture where the sysdeps 
> headers don't have that include".  But I think it's equally reasonable to 
> apply it to cases where code is relying on implicit inclusions by wrapper 
> headers.
 
Agreed.

-- 
Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Pre-approval for #include adjustments to the testsuite
  2017-02-16 16:54   ` Carlos O'Donell
@ 2017-02-16 17:00     ` Zack Weinberg
  2017-02-16 17:12       ` Carlos O'Donell
  0 siblings, 1 reply; 5+ messages in thread
From: Zack Weinberg @ 2017-02-16 17:00 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: Joseph Myers, GNU C Library

On Thu, Feb 16, 2017 at 11:53 AM, Carlos O'Donell <carlos@redhat.com> wrote:
> On 02/16/2017 10:12 AM, Joseph Myers wrote:
>> On Thu, 16 Feb 2017, Zack Weinberg wrote:
>>> I'm asking for blanket pre-approval to commit
>>> additions and/or removals of #include lines to files that are part of
>>> the testsuite, making no other changes.
>>
>> We already have
>> <https://sourceware.org/glibc/wiki/Consensus#Trivial_Bug-Fix_Changes>
>> "Anyone can commit a change adding missing #include directives where it is
>> clear what the right header is for functionality used in a source file.
>
> Agreed.

OK, I will proceed with these patches.

Follow-up question: In several cases, include/ wrappers include
secondary headers that they do not themselves appear to need.  What do
people think of removing such inclusions?  Useful, waste of time,
harmful?  I would not consider such patches to be trivial.

zw

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Pre-approval for #include adjustments to the testsuite
  2017-02-16 17:00     ` Zack Weinberg
@ 2017-02-16 17:12       ` Carlos O'Donell
  0 siblings, 0 replies; 5+ messages in thread
From: Carlos O'Donell @ 2017-02-16 17:12 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: Joseph Myers, GNU C Library

On 02/16/2017 11:59 AM, Zack Weinberg wrote:
> On Thu, Feb 16, 2017 at 11:53 AM, Carlos O'Donell <carlos@redhat.com> wrote:
>> On 02/16/2017 10:12 AM, Joseph Myers wrote:
>>> On Thu, 16 Feb 2017, Zack Weinberg wrote:
>>>> I'm asking for blanket pre-approval to commit
>>>> additions and/or removals of #include lines to files that are part of
>>>> the testsuite, making no other changes.
>>>
>>> We already have
>>> <https://sourceware.org/glibc/wiki/Consensus#Trivial_Bug-Fix_Changes>
>>> "Anyone can commit a change adding missing #include directives where it is
>>> clear what the right header is for functionality used in a source file.
>>
>> Agreed.
> 
> OK, I will proceed with these patches.
> 
> Follow-up question: In several cases, include/ wrappers include
> secondary headers that they do not themselves appear to need.  What do
> people think of removing such inclusions?  Useful, waste of time,
> harmful?  I would not consider such patches to be trivial.

I would avoid it for now, only because it detracts from your awesome goal :-)

-- 
Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-16 17:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 14:39 Pre-approval for #include adjustments to the testsuite Zack Weinberg
2017-02-16 15:13 ` Joseph Myers
2017-02-16 16:54   ` Carlos O'Donell
2017-02-16 17:00     ` Zack Weinberg
2017-02-16 17:12       ` Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).