[PATCH 0/4] Suppress internal declarations for most of the testsuite.

Zack Weinberg zackw@panix.com
Mon Feb 20 13:03:00 GMT 2017


This patch series arranges to compile most of the testsuite under
_ISOMAC, i.e. nearly all internal declarations from the wrapper
headers are suppressed, as are nearly all declarations from
libc-symbols.h itself.  This is a step towards compiling the testsuite
against *installed* headers.  It's still different in significant
ways: libc-modules.h and the IS_IN family of macros are still visible,
everything gets _GNU_SOURCE whether it likes it or not, and tests can
still include non-installed non-wrapper headers if they want.  Of course,
many of those assume the full libc-symbols.h is visible, so they won't
work---the bulk of the changes to C sources in these patches is
dealing with that.

(I don't have any plans to continue working toward the goal of
compiling the testsuite against installed headers.  I did this because
it also smooths the way toward getting rid of all __need_foo macros.)

Patches 1-3 are 'safe' changes in the testsuite: they aren't
*necessary* in the absence of patch 4, but they do no harm, and they
are conceptually separate and can be reviewed as such.  Patch 4
introduces a new IS_IN module for the testsuite, arranges for that to
imply _ISOMAC, and separates out the tests that actually *need*
to see internal declarations.

I tested these with two build-many-glibcs cycles, one with patches 1-3
applied and one with patches 1-4 applied.  (1-3 are independent of
each other at the file level, so this should be sufficient.)  There
were no new failures.  However, what with HPPA, Coldfire, and
Microblaze not being buildable at the moment due to unrelated bugs, I
think there's a good chance that their arch-specific tests will need
some adjustments for this patchset.  I propose to leave that to the
people who are working on those architectures already.

Patches 1-3 can be applied in any order, but 4 will break the build in
the absence of the other three.  4 also requires my patch to clean up
the macros controlling whether gets is visible
(https://sourceware.org/ml/libc-alpha/2017-02/msg00284.html).

zw

Zack Weinberg (4):
  Split DIAG_* macros to new header libc-diag.h.
  Allow direct use of math_ldbl.h in testsuite.
  Miscellaneous 'safe' testsuite changes.
  Add IS_IN (testsuite) and remaining fixes.

 Makeconfig                                         |  3 +-
 Makefile                                           |  4 +-
 Makerules                                          | 55 ++++++++++----
 Rules                                              | 18 ++---
 benchtests/strcoll-inputs/filelist#en_US.UTF-8     |  1 -
 config.h.in                                        | 11 ---
 dlfcn/Makefile                                     |  3 +-
 elf/Makefile                                       | 58 ++++++++-------
 elf/tst-env-setuid-tunables.c                      |  6 ++
 extra-modules.mk                                   |  9 ---
 include/errno.h                                    |  2 +-
 include/libc-diag.h                                | 57 +++++++++++++++
 include/libc-internal.h                            | 52 +-------------
 include/libc-symbols.h                             | 62 +++++++++++-----
 include/math.h                                     |  5 ++
 include/stdio.h                                    | 10 ++-
 include/stdlib.h                                   |  4 --
 include/string.h                                   | 10 +--
 include/time.h                                     |  4 --
 include/unistd.h                                   |  3 -
 include/wchar.h                                    |  2 -
 inet/Makefile                                      |  4 +-
 inet/tst-checks-posix.c                            |  1 -
 intl/tst-gettext2.c                                |  2 +
 malloc/Makefile                                    |  6 +-
 malloc/tst-malloc.c                                |  2 +-
 malloc/tst-mcheck.c                                |  2 +-
 malloc/tst-realloc.c                               |  2 +-
 math/test-misc.c                                   | 23 +++---
 math/test-signgam-finite-c99.c                     |  1 -
 math/test-signgam-main.c                           |  1 -
 misc/Makefile                                      |  5 +-
 misc/sys/cdefs.h                                   |  3 +
 misc/tst-error1.c                                  |  2 +-
 nptl/Makefile                                      | 31 ++++----
 nptl/tst-join7mod.c                                |  9 +--
 nptl/tst-mutex1.c                                  |  7 +-
 nss/Makefile                                       |  6 +-
 posix/Makefile                                     | 11 +--
 posix/tst-dir.c                                    |  2 +-
 posix/wordexp-test.c                               |  6 +-
 stdio-common/bug21.c                               |  2 +-
 stdio-common/scanf14.c                             |  2 +-
 stdio-common/scanf4.c                              |  2 +-
 stdio-common/scanf7.c                              |  2 +-
 stdio-common/test-vfprintf.c                       |  2 +-
 stdio-common/tst-printf.c                          |  2 +-
 stdio-common/tst-printfsz.c                        |  2 +-
 stdio-common/tst-sprintf.c                         |  2 +-
 stdio-common/tst-unlockedio.c                      |  2 +-
 stdio-common/tstdiomisc.c                          |  2 +-
 stdlib/Makefile                                    | 17 +++--
 stdlib/bug-getcontext.c                            |  2 +-
 stdlib/tst-environ.c                               |  7 +-
 stdlib/tst-strtod.c                                | 60 ----------------
 stdlib/tst-strtod1i.c                              | 84 ++++++++++++++++++++++
 stdlib/tst-strtod5.c                               | 54 +++++---------
 stdlib/tst-strtod5i.c                              | 83 +++++++++++++++++++++
 string/strcasestr.c                                |  4 --
 string/test-string.h                               | 12 ++++
 string/test-strstr.c                               |  1 +
 string/tester.c                                    |  2 +-
 string/tst-endian.c                                |  2 +-
 sysdeps/generic/math_ldbl.h                        | 10 +--
 sysdeps/generic/math_private.h                     |  4 +-
 sysdeps/ia64/fpu/libm-symbols.h                    |  2 +-
 sysdeps/ia64/fpu/math_ldbl.h                       | 22 +++---
 sysdeps/ieee754/ldbl-128/math_ldbl.h               | 26 ++++---
 sysdeps/ieee754/ldbl-128ibm/math_ldbl.h            | 18 +++--
 .../ldbl-128ibm/test-canonical-ldbl-128ibm.c       |  2 +-
 .../ldbl-128ibm/test-totalorderl-ldbl-128ibm.c     |  2 +-
 sysdeps/ieee754/ldbl-96/math_ldbl.h                | 22 +++---
 sysdeps/ieee754/ldbl-96/test-canonical-ldbl-96.c   |  2 +-
 sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c |  2 +-
 sysdeps/m68k/m680x0/fpu/bits/mathinline.h          | 15 ++--
 sysdeps/powerpc/Makefile                           |  2 +-
 sysdeps/powerpc/fpu/math_ldbl.h                    |  7 +-
 sysdeps/powerpc/fpu/tst-setcontext-fpscr.c         |  2 +-
 sysdeps/unix/sysv/linux/Makefile                   |  2 +-
 sysdeps/unix/sysv/linux/tst-clone.c                |  5 ++
 sysdeps/unix/sysv/linux/tst-setgetname.c           |  3 -
 sysdeps/x86_64/fpu/Makefile                        |  8 +++
 sysdeps/x86_64/fpu/math-tests-arch.h               |  8 +--
 sysdeps/x86_64/fpu/math_ldbl.h                     | 13 ++--
 sysdeps/x86_64/multiarch/test-multiarch.c          |  2 +-
 time/tst-strptime2.c                               |  2 +-
 wcsmbs/tst-wcstof.c                                |  2 +-
 87 files changed, 624 insertions(+), 412 deletions(-)
 delete mode 100644 extra-modules.mk
 create mode 100644 include/libc-diag.h
 create mode 100644 stdlib/tst-strtod1i.c
 create mode 100644 stdlib/tst-strtod5i.c

-- 
2.11.0



More information about the Libc-alpha mailing list