Message ID | 87sgwyhqpo.fsf@oldenburg2.str.redhat.com |
---|---|
State | New |
Headers | show |
Series | Add missing header wrappers under include/ | expand |
* Florian Weimer: > With a complete set of wrapper headers, it will be possible to check > for automatically for new installed headers which lack such wrappers. We also need include/rpcsvc/bootparam.h and include/rpcsvc/yp_prot.h if we want to go into this direction. I think we have to whitelist the .x non-headers which are installed as if they were real C/C++ headers. Obviously, we do not need a wrapper for them. Are missing wrapper headers something we should test for in a generic fashion at all? Thanks, Florian
On Mon, 11 Feb 2019, Florian Weimer wrote: > Are missing wrapper headers something we should test for in a generic > fashion at all? There are at least three separate potential problems (where people can make a mistake that doesn't immediately produce an obvious build or test failure) relating to the current handling of installed headers: (a) Missing wrappers meaning code can quietly end up using an installed header instead of one from the build tree. (b) Attempted sysdeps overrides in the presence of such wrappers that do not actually work properly (the issue with overridden bits/ headers needing to go in top-level bits/ rather than in some other directory with a wrapper, though of course this applies to anything with a wrapper including a particular path to an overridden file). (c) Failing to add a new header (that's included from an installed header) to the relevant Makefile, so it doesn't get installed and builds (possibly only under certain conditions) with installed headers fail, though everything works fine when building and testing glibc. I think requiring and testing for wrapper headers is a reasonable way to address (a) - if you test for such headers in all cases, you avoid the fragility of the present approach where a wrapper is only needed when a header is used outside the directory that contains it. It would also be worth thinking separately about how to implement tests to avoid issues (b) and (c). For example, now that testing installs glibc into a container, that container directory could be used to examine the full set of installed headers together to see if they have any #includes of headers not present there (other than kernel headers, other-ABI gnu/stubs-*.h and gnu/lib-names-*.h, etc.). (This is awkward to test for on a per-directory basis because one installed header can include a header that itself is installed by another directory.) scripts/check-local-headers.sh attempts to test for something related to (a). However, issues with it include (i) it runs before the rest of the testsuite (it would be a more thorough test if it ran after the rest of the testsuite so it checked for problem uses of installed headers in testcases; it ought to be possible to fix the ordering so it does run after the other tests again); and (ii) of course it only detects issues that show up with the current glibc configuration, whereas your proposed check that every installed header has a wrapper would mean more system-specific issues get detected in a single glibc testsuite run rather than only in a build-many-glibcs.py run.
* Florian Weimer: > * Florian Weimer: > >> With a complete set of wrapper headers, it will be possible to check >> for automatically for new installed headers which lack such wrappers. > > We also need include/rpcsvc/bootparam.h and include/rpcsvc/yp_prot.h if > we want to go into this direction. Here's a patch that does that. Thanks, Florian Add missing header wrappers under include/ With a complete set of wrapper headers, it will be possible to check for automatically for new installed headers which lack such wrappers. 2019-02-12 Florian Weimer <fweimer@redhat.com> Add missing header wrappers under include/. * include/ar.h: New file. * include/bits/mqueue2.h: Likewise. * include/bits/stdio.h: Likewise. * include/bits/stdio2.h: Likewise. * include/fstab.h: Likewise. * include/fts.h: Likewise. * include/lastlog.h: Likewise. * include/netinet/icmp6.h: Likewise. * include/netinet/igmp.h: Likewise. * include/netinet/ip6.h: Likewise. * include/re_comp.h: Likewise. * include/regexp.h: Likewise. * include/rpcsvc/bootparam.h: Likewise. * include/rpcsvc/yp_prot.h: Likewise. * include/sys/random.h: Likewise. * include/sys/stropts.h: Likewise. * include/sys/ttychars.h: Likewise. * include/sys/vfs.h: Likewise. * include/wait.h: Likewise. diff --git a/include/ar.h b/include/ar.h new file mode 100644 index 0000000000..400167a53c --- /dev/null +++ b/include/ar.h @@ -0,0 +1 @@ +#include <misc/ar.h> diff --git a/include/bits/mqueue2.h b/include/bits/mqueue2.h new file mode 100644 index 0000000000..2d5c231181 --- /dev/null +++ b/include/bits/mqueue2.h @@ -0,0 +1 @@ +#include <rt/bits/mqueue2.h> diff --git a/include/bits/stdio.h b/include/bits/stdio.h new file mode 100644 index 0000000000..55c51eadeb --- /dev/null +++ b/include/bits/stdio.h @@ -0,0 +1 @@ +#include <libio/bits/stdio.h> diff --git a/include/bits/stdio2.h b/include/bits/stdio2.h new file mode 100644 index 0000000000..6d7cf4306f --- /dev/null +++ b/include/bits/stdio2.h @@ -0,0 +1 @@ +#include <libio/bits/stdio2.h> diff --git a/include/fstab.h b/include/fstab.h new file mode 100644 index 0000000000..314aa3e3b9 --- /dev/null +++ b/include/fstab.h @@ -0,0 +1 @@ +#include <misc/fstab.h> diff --git a/include/fts.h b/include/fts.h new file mode 100644 index 0000000000..145dce6779 --- /dev/null +++ b/include/fts.h @@ -0,0 +1 @@ +#include <io/fts.h> diff --git a/include/lastlog.h b/include/lastlog.h new file mode 100644 index 0000000000..5c0ea0320e --- /dev/null +++ b/include/lastlog.h @@ -0,0 +1 @@ +#include <login/lastlog.h> diff --git a/include/netinet/icmp6.h b/include/netinet/icmp6.h new file mode 100644 index 0000000000..fee15fc531 --- /dev/null +++ b/include/netinet/icmp6.h @@ -0,0 +1 @@ +#include <inet/netinet/icmp6.h> diff --git a/include/netinet/igmp.h b/include/netinet/igmp.h new file mode 100644 index 0000000000..63a9355f79 --- /dev/null +++ b/include/netinet/igmp.h @@ -0,0 +1 @@ +#include <inet/netinet/igmp.h> diff --git a/include/netinet/ip6.h b/include/netinet/ip6.h new file mode 100644 index 0000000000..262c7c2405 --- /dev/null +++ b/include/netinet/ip6.h @@ -0,0 +1 @@ +#include <inet/netinet/ip6.h> diff --git a/include/re_comp.h b/include/re_comp.h new file mode 100644 index 0000000000..130df7d956 --- /dev/null +++ b/include/re_comp.h @@ -0,0 +1 @@ +#include <posix/re_comp.h> diff --git a/include/regexp.h b/include/regexp.h new file mode 100644 index 0000000000..3155371b17 --- /dev/null +++ b/include/regexp.h @@ -0,0 +1 @@ +#include <misc/regexp.h> diff --git a/include/rpcsvc/bootparam.h b/include/rpcsvc/bootparam.h new file mode 100644 index 0000000000..87e4eef218 --- /dev/null +++ b/include/rpcsvc/bootparam.h @@ -0,0 +1 @@ +#include <sunrpc/rpcsvc/bootparam.h> diff --git a/include/rpcsvc/yp_prot.h b/include/rpcsvc/yp_prot.h new file mode 100644 index 0000000000..ab1ca10a28 --- /dev/null +++ b/include/rpcsvc/yp_prot.h @@ -0,0 +1 @@ +#include <nis/rpcsvc/yp_prot.h> diff --git a/include/sys/random.h b/include/sys/random.h new file mode 100644 index 0000000000..b33d114b74 --- /dev/null +++ b/include/sys/random.h @@ -0,0 +1 @@ +#include <stdlib/sys/random.h> diff --git a/include/sys/stropts.h b/include/sys/stropts.h new file mode 100644 index 0000000000..711f1502dd --- /dev/null +++ b/include/sys/stropts.h @@ -0,0 +1 @@ +#include <streams/sys/stropts.h> diff --git a/include/sys/ttychars.h b/include/sys/ttychars.h new file mode 100644 index 0000000000..86cb77dd77 --- /dev/null +++ b/include/sys/ttychars.h @@ -0,0 +1 @@ +#include <termios/sys/ttychars.h> diff --git a/include/sys/vfs.h b/include/sys/vfs.h new file mode 100644 index 0000000000..95f311dbd6 --- /dev/null +++ b/include/sys/vfs.h @@ -0,0 +1 @@ +#include <io/sys/vfs.h> diff --git a/include/wait.h b/include/wait.h new file mode 100644 index 0000000000..ed3d08601e --- /dev/null +++ b/include/wait.h @@ -0,0 +1 @@ +#include <posix/wait.h>
On 2/12/19 9:12 AM, Florian Weimer wrote: > * Florian Weimer: > >> * Florian Weimer: >> >>> With a complete set of wrapper headers, it will be possible to check >>> for automatically for new installed headers which lack such wrappers. >> >> We also need include/rpcsvc/bootparam.h and include/rpcsvc/yp_prot.h if >> we want to go into this direction. > > Here's a patch that does that. > > Thanks, > Florian > > Add missing header wrappers under include/ > > With a complete set of wrapper headers, it will be possible to check > for automatically for new installed headers which lack such wrappers. > > 2019-02-12 Florian Weimer <fweimer@redhat.com> > > Add missing header wrappers under include/. > * include/ar.h: New file. > * include/bits/mqueue2.h: Likewise. > * include/bits/stdio.h: Likewise. > * include/bits/stdio2.h: Likewise. > * include/fstab.h: Likewise. > * include/fts.h: Likewise. > * include/lastlog.h: Likewise. > * include/netinet/icmp6.h: Likewise. > * include/netinet/igmp.h: Likewise. > * include/netinet/ip6.h: Likewise. > * include/re_comp.h: Likewise. > * include/regexp.h: Likewise. > * include/rpcsvc/bootparam.h: Likewise. > * include/rpcsvc/yp_prot.h: Likewise. > * include/sys/random.h: Likewise. > * include/sys/stropts.h: Likewise. > * include/sys/ttychars.h: Likewise. > * include/sys/vfs.h: Likewise. > * include/wait.h: Likewise. OK for master. I like the direction this goes. Thanks for working on this. Reviewed-by: Carlos O'Donell <carlos@redhat.com> > diff --git a/include/ar.h b/include/ar.h > new file mode 100644 > index 0000000000..400167a53c > --- /dev/null > +++ b/include/ar.h > @@ -0,0 +1 @@ > +#include <misc/ar.h> > diff --git a/include/bits/mqueue2.h b/include/bits/mqueue2.h > new file mode 100644 > index 0000000000..2d5c231181 > --- /dev/null > +++ b/include/bits/mqueue2.h > @@ -0,0 +1 @@ > +#include <rt/bits/mqueue2.h> > diff --git a/include/bits/stdio.h b/include/bits/stdio.h > new file mode 100644 > index 0000000000..55c51eadeb > --- /dev/null > +++ b/include/bits/stdio.h > @@ -0,0 +1 @@ > +#include <libio/bits/stdio.h> > diff --git a/include/bits/stdio2.h b/include/bits/stdio2.h > new file mode 100644 > index 0000000000..6d7cf4306f > --- /dev/null > +++ b/include/bits/stdio2.h > @@ -0,0 +1 @@ > +#include <libio/bits/stdio2.h> > diff --git a/include/fstab.h b/include/fstab.h > new file mode 100644 > index 0000000000..314aa3e3b9 > --- /dev/null > +++ b/include/fstab.h > @@ -0,0 +1 @@ > +#include <misc/fstab.h> > diff --git a/include/fts.h b/include/fts.h > new file mode 100644 > index 0000000000..145dce6779 > --- /dev/null > +++ b/include/fts.h > @@ -0,0 +1 @@ > +#include <io/fts.h> > diff --git a/include/lastlog.h b/include/lastlog.h > new file mode 100644 > index 0000000000..5c0ea0320e > --- /dev/null > +++ b/include/lastlog.h > @@ -0,0 +1 @@ > +#include <login/lastlog.h> > diff --git a/include/netinet/icmp6.h b/include/netinet/icmp6.h > new file mode 100644 > index 0000000000..fee15fc531 > --- /dev/null > +++ b/include/netinet/icmp6.h > @@ -0,0 +1 @@ > +#include <inet/netinet/icmp6.h> > diff --git a/include/netinet/igmp.h b/include/netinet/igmp.h > new file mode 100644 > index 0000000000..63a9355f79 > --- /dev/null > +++ b/include/netinet/igmp.h > @@ -0,0 +1 @@ > +#include <inet/netinet/igmp.h> > diff --git a/include/netinet/ip6.h b/include/netinet/ip6.h > new file mode 100644 > index 0000000000..262c7c2405 > --- /dev/null > +++ b/include/netinet/ip6.h > @@ -0,0 +1 @@ > +#include <inet/netinet/ip6.h> > diff --git a/include/re_comp.h b/include/re_comp.h > new file mode 100644 > index 0000000000..130df7d956 > --- /dev/null > +++ b/include/re_comp.h > @@ -0,0 +1 @@ > +#include <posix/re_comp.h> > diff --git a/include/regexp.h b/include/regexp.h > new file mode 100644 > index 0000000000..3155371b17 > --- /dev/null > +++ b/include/regexp.h > @@ -0,0 +1 @@ > +#include <misc/regexp.h> > diff --git a/include/rpcsvc/bootparam.h b/include/rpcsvc/bootparam.h > new file mode 100644 > index 0000000000..87e4eef218 > --- /dev/null > +++ b/include/rpcsvc/bootparam.h > @@ -0,0 +1 @@ > +#include <sunrpc/rpcsvc/bootparam.h> > diff --git a/include/rpcsvc/yp_prot.h b/include/rpcsvc/yp_prot.h > new file mode 100644 > index 0000000000..ab1ca10a28 > --- /dev/null > +++ b/include/rpcsvc/yp_prot.h > @@ -0,0 +1 @@ > +#include <nis/rpcsvc/yp_prot.h> > diff --git a/include/sys/random.h b/include/sys/random.h > new file mode 100644 > index 0000000000..b33d114b74 > --- /dev/null > +++ b/include/sys/random.h > @@ -0,0 +1 @@ > +#include <stdlib/sys/random.h> > diff --git a/include/sys/stropts.h b/include/sys/stropts.h > new file mode 100644 > index 0000000000..711f1502dd > --- /dev/null > +++ b/include/sys/stropts.h > @@ -0,0 +1 @@ > +#include <streams/sys/stropts.h> > diff --git a/include/sys/ttychars.h b/include/sys/ttychars.h > new file mode 100644 > index 0000000000..86cb77dd77 > --- /dev/null > +++ b/include/sys/ttychars.h > @@ -0,0 +1 @@ > +#include <termios/sys/ttychars.h> > diff --git a/include/sys/vfs.h b/include/sys/vfs.h > new file mode 100644 > index 0000000000..95f311dbd6 > --- /dev/null > +++ b/include/sys/vfs.h > @@ -0,0 +1 @@ > +#include <io/sys/vfs.h> > diff --git a/include/wait.h b/include/wait.h > new file mode 100644 > index 0000000000..ed3d08601e > --- /dev/null > +++ b/include/wait.h > @@ -0,0 +1 @@ > +#include <posix/wait.h> >
diff --git a/include/ar.h b/include/ar.h new file mode 100644 index 0000000000..400167a53c --- /dev/null +++ b/include/ar.h @@ -0,0 +1 @@ +#include <misc/ar.h> diff --git a/include/bits/mqueue2.h b/include/bits/mqueue2.h new file mode 100644 index 0000000000..2d5c231181 --- /dev/null +++ b/include/bits/mqueue2.h @@ -0,0 +1 @@ +#include <rt/bits/mqueue2.h> diff --git a/include/bits/stdio.h b/include/bits/stdio.h new file mode 100644 index 0000000000..55c51eadeb --- /dev/null +++ b/include/bits/stdio.h @@ -0,0 +1 @@ +#include <libio/bits/stdio.h> diff --git a/include/bits/stdio2.h b/include/bits/stdio2.h new file mode 100644 index 0000000000..6d7cf4306f --- /dev/null +++ b/include/bits/stdio2.h @@ -0,0 +1 @@ +#include <libio/bits/stdio2.h> diff --git a/include/fstab.h b/include/fstab.h new file mode 100644 index 0000000000..314aa3e3b9 --- /dev/null +++ b/include/fstab.h @@ -0,0 +1 @@ +#include <misc/fstab.h> diff --git a/include/fts.h b/include/fts.h new file mode 100644 index 0000000000..145dce6779 --- /dev/null +++ b/include/fts.h @@ -0,0 +1 @@ +#include <io/fts.h> diff --git a/include/lastlog.h b/include/lastlog.h new file mode 100644 index 0000000000..5c0ea0320e --- /dev/null +++ b/include/lastlog.h @@ -0,0 +1 @@ +#include <login/lastlog.h> diff --git a/include/netinet/icmp6.h b/include/netinet/icmp6.h new file mode 100644 index 0000000000..fee15fc531 --- /dev/null +++ b/include/netinet/icmp6.h @@ -0,0 +1 @@ +#include <inet/netinet/icmp6.h> diff --git a/include/netinet/igmp.h b/include/netinet/igmp.h new file mode 100644 index 0000000000..63a9355f79 --- /dev/null +++ b/include/netinet/igmp.h @@ -0,0 +1 @@ +#include <inet/netinet/igmp.h> diff --git a/include/netinet/ip6.h b/include/netinet/ip6.h new file mode 100644 index 0000000000..262c7c2405 --- /dev/null +++ b/include/netinet/ip6.h @@ -0,0 +1 @@ +#include <inet/netinet/ip6.h> diff --git a/include/re_comp.h b/include/re_comp.h new file mode 100644 index 0000000000..130df7d956 --- /dev/null +++ b/include/re_comp.h @@ -0,0 +1 @@ +#include <posix/re_comp.h> diff --git a/include/regexp.h b/include/regexp.h new file mode 100644 index 0000000000..3155371b17 --- /dev/null +++ b/include/regexp.h @@ -0,0 +1 @@ +#include <misc/regexp.h> diff --git a/include/sys/random.h b/include/sys/random.h new file mode 100644 index 0000000000..b33d114b74 --- /dev/null +++ b/include/sys/random.h @@ -0,0 +1 @@ +#include <stdlib/sys/random.h> diff --git a/include/sys/stropts.h b/include/sys/stropts.h new file mode 100644 index 0000000000..711f1502dd --- /dev/null +++ b/include/sys/stropts.h @@ -0,0 +1 @@ +#include <streams/sys/stropts.h> diff --git a/include/sys/ttychars.h b/include/sys/ttychars.h new file mode 100644 index 0000000000..86cb77dd77 --- /dev/null +++ b/include/sys/ttychars.h @@ -0,0 +1 @@ +#include <termios/sys/ttychars.h> diff --git a/include/sys/vfs.h b/include/sys/vfs.h new file mode 100644 index 0000000000..95f311dbd6 --- /dev/null +++ b/include/sys/vfs.h @@ -0,0 +1 @@ +#include <io/sys/vfs.h> diff --git a/include/wait.h b/include/wait.h new file mode 100644 index 0000000000..ed3d08601e --- /dev/null +++ b/include/wait.h @@ -0,0 +1 @@ +#include <posix/wait.h>