glibc/conform/Makefile

242 lines
10 KiB
Makefile
Raw Normal View History

# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
#
# Sub-makefile for conform portion of the library.
#
subdir := conform
Consistently include Makeconfig after defining subdir. In <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html> I noted it was necessary to add includes of Makeconfig early in various subdirectory makefiles for the tests-special variable settings added by that patch to be conditional on configuration information. No-one commented on the general question there of whether Makeconfig should always be included immediately after the definition of subdir. This patch implements that early inclusion of Makeconfig in each directory (which is a lot easier than consistent placement of includes of Rules). Includes are added if needed, or moved up if already present. Subdirectory "all:" targets are removed, since Makeconfig provides one. There is potential for further cleanups I haven't done. Rules and Makerules have code such as ifneq "$(findstring env,$(origin headers))" "" headers := endif to override to empty any value of various variables that came from the environment. I think there is a case for Makeconfig setting all the subdirectory variables (other than subdir) to empty to ensure no outside value is going to take effect if a subdirectory fails to define a variable. (A list of such variables, possibly out of date and incomplete, is in manual/maint.texi.) Rules and Makerules would give errors if Makeconfig hadn't already been included, instead of including it themselves. The special code to override values coming from the environment would then be obsolete and could be removed. Tested x86_64, including that installed binaries are identical before and after the patch. * argp/Makefile: Include Makeconfig immediately after defining subdir. * assert/Makefile: Likewise. * benchtests/Makefile: Likewise. * catgets/Makefile: Likewise. * conform/Makefile: Likewise. * crypt/Makefile: Likewise. * csu/Makefile: Likewise. (all): Remove target. * ctype/Makefile: Include Makeconfig immediately after defining subdir. * debug/Makefile: Likewise. * dirent/Makefile: Likewise. * dlfcn/Makefile: Likewise. * gmon/Makefile: Likewise. * gnulib/Makefile: Likewise. * grp/Makefile: Likewise. * gshadow/Makefile: Likewise. * hesiod/Makefile: Likewise. * hurd/Makefile: Likewise. (all): Remove target. * iconvdata/Makefile: Include Makeconfig immediately after defining subdir. * inet/Makefile: Likewise. * intl/Makefile: Likewise. * io/Makefile: Likewise. * libio/Makefile: Likewise. (all): Remove target. * locale/Makefile: Include Makeconfig immediately after defining subdir. * login/Makefile: Likewise. * mach/Makefile: Likewise. (all): Remove target. * malloc/Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. * manual/Makefile: Include Makeconfig immediately after defining subdir. * math/Makefile: Likewise. * misc/Makefile: Likewise. * nis/Makefile: Likewise. * nss/Makefile: Likewise. * po/Makefile: Likewise. (all): Remove target. * posix/Makefile: Include Makeconfig immediately after defining subdir. * pwd/Makefile: Likewise. * resolv/Makefile: Likewise. * resource/Makefile: Likewise. * rt/Makefile: Likewise. * setjmp/Makefile: Likewise. * shadow/Makefile: Likewise. * signal/Makefile: Likewise. * socket/Makefile: Likewise. * soft-fp/Makefile: Likewise. * stdio-common/Makefile: Likewise. * stdlib/Makefile: Likewise. * streams/Makefile: Likewise. * string/Makefile: Likewise. * sunrpc/Makefile: Likewise. (all): Remove target. * sysvipc/Makefile: Include Makeconfig immediately after defining subdir. * termios/Makefile: Likewise. * time/Makefile: Likewise. * timezone/Makefile: Likewise. (all): Remove target. * wcsmbs/Makefile: Include Makeconfig immediately after defining subdir. * wctype/Makefile: Likewise. libidn/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. localedata/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. nptl/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. nptl_db/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir.
2014-02-26 23:12:03 +00:00
include ../Makeconfig
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
conformtest-headers-data := $(wildcard data/*.h-data) \
$(wildcard data/*/*.h-data)
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
conformtest-standards := ISO ISO99 ISO11 POSIX XPG4 XPG42 UNIX98 XOPEN2K \
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
POSIX2008 XOPEN2K8
conformtest-headers-ISO := assert.h ctype.h errno.h float.h limits.h locale.h \
math.h setjmp.h signal.h stdarg.h stddef.h stdio.h \
stdlib.h string.h time.h
conformtest-headers-ISO99 := $(conformtest-headers-ISO) complex.h fenv.h \
inttypes.h iso646.h stdbool.h stdint.h tgmath.h \
wchar.h wctype.h
# Missing ISO11 expectations for: stdatomic.h threads.h.
conformtest-headers-ISO11 := $(conformtest-headers-ISO99) stdalign.h \
stdnoreturn.h uchar.h
conformtest-headers-POSIX := $(conformtest-headers-ISO) aio.h dirent.h \
fcntl.h fnmatch.h glob.h grp.h mqueue.h \
pthread.h pwd.h regex.h sched.h semaphore.h \
sys/mman.h sys/stat.h sys/times.h sys/types.h \
sys/utsname.h sys/wait.h tar.h termios.h \
unistd.h utime.h wordexp.h
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
# Missing XPG4 expectations for: regexp.h wchar.h.
conformtest-headers-XPG4 := $(conformtest-headers-ISO) cpio.h dirent.h \
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
fcntl.h fnmatch.h ftw.h glob.h grp.h iconv.h \
langinfo.h monetary.h nl_types.h pwd.h regex.h \
search.h sys/ipc.h sys/msg.h sys/sem.h sys/shm.h \
sys/stat.h sys/times.h sys/types.h sys/utsname.h \
sys/wait.h tar.h termios.h ulimit.h unistd.h \
utime.h varargs.h wordexp.h
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
# Missing XPG42 expectations for: re_comp.h regexp.h wchar.h.
# XPG42 includes XTI, but xti.h is outside the scope of these tests.
conformtest-headers-XPG42 := $(conformtest-headers-XPG4) arpa/inet.h fmtmsg.h \
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
libgen.h ndbm.h netdb.h netinet/in.h poll.h \
strings.h stropts.h sys/mman.h sys/resource.h \
sys/socket.h sys/statvfs.h sys/time.h sys/timeb.h \
sys/uio.h sys/un.h syslog.h ucontext.h utmpx.h
# Missing UNIX98 expectations for: inttypes.h re_comp.h regexp.h.
# The online UNIX98 includes XCURSES, but curses.h, term.h and
# unctrl.h are outside the scope of these tests. It also includes
# XTI, but xti.h is outside the scope of these tests.
conformtest-headers-UNIX98 := $(conformtest-headers-POSIX) arpa/inet.h cpio.h \
dlfcn.h fmtmsg.h ftw.h iconv.h iso646.h \
langinfo.h libgen.h monetary.h ndbm.h netdb.h \
netinet/in.h nl_types.h poll.h search.h \
strings.h stropts.h sys/ipc.h sys/msg.h \
sys/resource.h sys/sem.h sys/shm.h sys/socket.h \
sys/statvfs.h sys/time.h sys/timeb.h sys/uio.h \
sys/un.h syslog.h ucontext.h ulimit.h utmpx.h \
varargs.h wchar.h wctype.h
# Missing XOPEN2K expectations for: trace.h.
conformtest-headers-XOPEN2K := $(conformtest-headers-POSIX) arpa/inet.h \
complex.h cpio.h dlfcn.h fenv.h fmtmsg.h ftw.h \
iconv.h inttypes.h iso646.h langinfo.h \
libgen.h monetary.h ndbm.h net/if.h netdb.h \
netinet/in.h netinet/tcp.h nl_types.h poll.h \
search.h spawn.h stdbool.h stdint.h strings.h \
stropts.h sys/ipc.h sys/msg.h sys/resource.h \
sys/select.h sys/sem.h sys/shm.h sys/socket.h \
sys/statvfs.h sys/time.h sys/timeb.h sys/uio.h \
sys/un.h syslog.h tgmath.h ucontext.h ulimit.h \
utmpx.h wchar.h wctype.h
# Missing POSIX2008 expectations for: trace.h.
conformtest-headers-POSIX2008 := $(conformtest-headers-POSIX) arpa/inet.h \
complex.h cpio.h dlfcn.h fenv.h iconv.h \
inttypes.h iso646.h langinfo.h monetary.h \
net/if.h netdb.h netinet/in.h netinet/tcp.h \
nl_types.h poll.h spawn.h stdbool.h stdint.h \
strings.h stropts.h sys/select.h \
sys/socket.h sys/statvfs.h sys/un.h tgmath.h \
wchar.h wctype.h
# Missing XOPEN2K8 expectations for: trace.h.
conformtest-headers-XOPEN2K8 := $(conformtest-headers-POSIX2008) fmtmsg.h \
ftw.h libgen.h ndbm.h search.h sys/ipc.h \
sys/msg.h sys/resource.h sys/sem.h sys/shm.h \
sys/time.h sys/uio.h syslog.h ulimit.h utmpx.h
conformtest-header-list-base := $(foreach std,$(conformtest-standards),\
header-list-$(std).out)
conformtest-header-list-tests := $(addprefix $(objpfx),\
$(conformtest-header-list-base))
tests-special += $(conformtest-header-list-tests)
generated += $(conformtest-header-list-base)
conformtest-header-base := $(foreach std,\
$(conformtest-standards),\
$(foreach h,\
$(conformtest-headers-$(std)),\
$(std)/$(h)/conform.out))
conformtest-header-tests := $(addprefix $(objpfx),$(conformtest-header-base))
2012-02-27 02:45:44 +00:00
ifneq (yes,$(fast-check))
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
tests-special += $(conformtest-header-tests)
generated += $(conformtest-header-base)
2012-02-27 02:45:44 +00:00
endif
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
linknamespace-symlists-base := $(foreach std,$(conformtest-standards),\
symlist-$(std))
linknamespace-symlists-tests := $(addprefix $(objpfx),\
$(linknamespace-symlists-base))
tests-special += $(linknamespace-symlists-tests)
Make linknamespace tests check only relevant libraries. This patch addresses one known caveat in the linknamespace tests: with this patch they will now only look for definitions of symbols in relevant libraries, meaning that librt and libpthread are not checked for ISO C standards, XPG3 and XPG4. In particular, this means that if __pthread_initialize_minimal is somehow brought in for one of those standards, the definition from libc-tls.o will be considered instead of that from libpthread, so avoiding bringing in lots of other libpthread symbols. This should address some of the failures reported by Carlos in <https://sourceware.org/ml/libc-alpha/2014-11/msg00882.html>, where __pointer_chk_guard_local brought in __pthread_initialize_minimal. Tested for x86_64. The removal of one XFAIL for XPG4 actually shows up a header bug (shm_open should not be declared for XPG4 - the namespace issue was for symbols brought in by shm_open, which is no longer found at all now librt isn't searched; I've filed bug 17663 for the header bug, though it would show up eventually anyway in the course of review of conform/ data against XPG4). Committed. * conform/Makefile (linknamespace-symlist-stdlibs-base): New variable. (linknamespace-symlist-stdlibs-tests): Likewise. (tests-special): Append $(linknamespace-symlist-stdlibs-tests) instead of $(objpfx)symlist-stdlibs. (linknamespace-libs-isoc): New variable. (linknamespace-libs): Use $(linknamespace-libs-isoc). (linknamespace-libs-ISO): New variable. (linknamespace-libs-ISO99): Likewise. (linknamespace-libs-ISO11): Likewise. (linknamespace-libs-XPG3): Likewise. (linknamespace-libs-XPG4): Likewise. (linknamespace-libs-POSIX): Likewise. (linknamespace-libs-UNIX98): Likewise. (linknamespace-libs-XOPEN2K): Likewise. (linknamespace-libs-POSIX2008): Likewise. (linknamespace-libs-XOPEN2K8): Likewise. ($(objpfx)symlist-stdlibs): Replace by $(linknamespace-symlist-stdlibs-tests). Use $(linknamespace-libs-$*) as set of libraries. ($(linknamespace-header-tests)): Update dependencies. Use $(objpfx)symlist-stdlibs-$$std for --libsyms argument. (test-xfail-XPG4/sys/mman.h/linknamespace): Remove. * conform/linknamespace.pl: Remove comment about considering definitions of symbols from irrelevant libraries.
2014-11-29 01:46:56 +00:00
linknamespace-symlist-stdlibs-base := $(foreach std,$(conformtest-standards),\
symlist-stdlibs-$(std))
linknamespace-symlist-stdlibs-tests := \
$(addprefix $(objpfx),\
$(linknamespace-symlist-stdlibs-base))
tests-special += $(linknamespace-symlist-stdlibs-tests)
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
linknamespace-header-base := $(foreach std,\
$(conformtest-standards),\
$(foreach h,\
$(conformtest-headers-$(std)),\
$(std)/$(h)/linknamespace.out))
linknamespace-header-tests := $(addprefix $(objpfx),\
$(linknamespace-header-base))
tests-special += $(linknamespace-header-tests)
Enumerate tests with special rules in tests-special variable. This patch is a revised and updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>. In order to generate overall summaries of the results of all tests in the glibc testsuite, we need to identify and concatenate the files with the results of individual tests. Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this. However, the normal glibc approach is explicit enumeration of the expected set of files with a given property, rather than all files matching some pattern like that. Furthermore, we would like to be able to mark tests as UNRESOLVED if the file with their results is for some reason missing, and in future we would like to be able to mark tests as UNSUPPORTED if they are disabled for a particular configuration (rather than simply having them missing from the list of tests as at present). Such handling of tests that were not run or did not record results requires an explicit enumeration of tests. For the tests following the default makefile rules, $(tests) (and $(xtests)) provides such an enumeration. Others, however, are added directly as dependencies of the "tests" and "xtests" makefile targets. This patch changes the makefiles to put them in variables tests-special and xtests-special, with appropriate dependencies on the tests listed there then being added centrally. Those variables are used in Rules and so need to be set before Rules is included in a subdirectory makefile, which is often earlier in the makefile than the dependencies were present before. We previously discussed the question of where to include Rules; see the question at <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a discussion in <https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why Rules is included early rather than late in subdirectory makefiles. It was necessary to avoid an indirection through the check-abi target and get the check-abi-* targets for individual libraries into the tests-special variable. The intl/ test $(objpfx)tst-gettext.out, previously built only because of dependencies from other tests, was also added to tests-special for the same reason. The entries in tests-special are the full makefile targets, complete with $(objpfx) and .out. If a future change causes tests to be named consistently with a .out suffix, this can be changed to include just the path relative to $(objpfx), without .out. Tested x86_64, including that the same set of files is generated in the build directory by a build and testsuite run both before and after the patch (except for changes to the elf/tst-null-argv.debug.out.<number> file name), and a build with run-built-tests=no to verify there aren't any more obvious instances of the issue Marcus Shawcroft reported with a previous version in <https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>. * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (tests): Depend on $(tests-special). * Makerules (check-abi-list): New variable. (check-abi): Depend on $(check-abi-list). [$(subdir) = elf] (tests-special): Add $(objpfx)check-abi-libc.out. [$(build-shared) = yes && subdir] (tests-special): Add $(check-abi-list). [$(build-shared) = yes && subdir] (tests): Do not depend on check-abi. * Rules (tests): Depend on $(tests-special). (xtests): Depend on $(xtests-special). * catgets/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * conform/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * elf/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * grp/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * iconv/Makefile (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * iconvdata/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * intl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. Also add $(objpfx)tst-gettext.out. * io/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * libio/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * malloc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * misc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl_db/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * posix/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * resolv/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * stdio-common/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (do-tst-unbputc): Remove target. (do-tst-printf): Likewise. * stdlib/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * string/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * sysdeps/x86/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. localedata: * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
include ../Rules
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
$(conformtest-header-list-tests): $(objpfx)header-list-%.out: \
check-header-lists.sh \
$(conformtest-headers-data)
$(SHELL) $< "$*" "$(CC)" "$(strip $(conformtest-headers-$*))" \
"$(conformtest-headers-data)" > $@; \
Generate .test-result files for tests with special rules. This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html> now proposed for inclusion in glibc, extends the generation of PASS and FAIL status in .test-result files for individual tests to cover tests with their own custom makefile rules. This is just adding $(evaluate-test) calls to all such rules, since tests with multiple commands were previously split into separate tests. Note that the tests the makefiles expect to fail (posix/annexc and conformtest) currently get FAIL listed in the .test-result file, rather than XFAIL; a subsequent patch will introduce a better XFAIL mechanism. Tested x86_64. * Makefile ($(objpfx)c++-types-check.out): Use $(evaluate-test). ($(objpfx)check-local-headers.out): Likewise. ($(objpfx)begin-end-check.out): Likewise. * Makerules (check-abi-%.out): Likewise. * catgets/Makefile ($(objpfx)test1.cat): Likewise. ($(objpfx)test2.cat): Likewise. ($(objpfx)de/libc.cat): Likewise. ($(objpfx)test-gencat.out): Likewise. * conform/Makefile ($(objpfx)run-conformtest.out): Likewise. * elf/Makefile ($(objpfx)order-cmp.out): Likewise. ($(objpfx)noload-mem): Likewise. ($(objpfx)tst-pathopt.out): Likewise. ($(objpfx)tst-rtld-load-self.out): Likewise. ($(objpfx)tst-array1-cmp.out): Likewise. ($(objpfx)tst-array1-static-cmp.out): Likewise. ($(objpfx)tst-array2-cmp.out): Likewise. ($(objpfx)tst-array3-cmp.out): Likewise. ($(objpfx)tst-array4-cmp.out): Likewise. ($(objpfx)tst-array5-cmp.out): Likewise. ($(objpfx)tst-array5-static-cmp.out): Likewise. ($(objpfx)check-textrel.out): Likewise. ($(objpfx)check-execstack.out): Likewise. ($(objpfx)check-localplt.out): Likewise. ($(objpfx)order2-cmp.out): Likewise. ($(objpfx)tst-leaks1-mem): Likewise. ($(objpfx)tst-leaks1-static-mem): Likewise. ($(objpfx)tst-initorder-cmp.out): Likewise. ($(objpfx)tst-initorder2-cmp.out): Likewise. ($(objpfx)tst-unused-dep.out): Likewise. ($(objpfx)tst-unused-dep-cmp.out): Likewise. * grp/Makefile ($(objpfx)tst_fgetgrent.out): Likewise. * iconv/Makefile (test-iconvconfig): Likewise. * iconvdata/Makefile ($(objpfx)mtrace-tst-loading): Likewise. ($(objpfx)iconv-test.out): Likewise. ($(objpfx)tst-tables.out): Likewise. * intl/Makefile ($(objpfx)mtrace-tst-gettext): Likewise. ($(objpfx)tst-gettext.out): Likewise. ($(objpfx)tst-translit.out): Likewise. ($(objpfx)tst-gettext2.out): Likewise. ($(objpfx)tst-gettext4.out): Likewise. ($(objpfx)tst-gettext6.out): Likewise. * io/Makefile ($(objpfx)ftwtest.out): Likewise. * libio/Makefile ($(objpfx)test-freopen.out): Likewise. ($(objpfx)tst-fopenloc-cmp.out): Likewise. ($(objpfx)tst-fopenloc-mem.out): Likewise. * malloc/Makefile ($(objpfx)tst-mtrace.out): Likewise. * misc/Makefile ($(objpfx)tst-error1-mem): Likewise. * posix/Makefile ($(objpfx)globtest.out): Likewise. ($(objpfx)wordexp-tst.out): Likewise. ($(objpfx)annexc.out): Likewise. ($(objpfx)tst-fnmatch-mem): Likewise. ($(objpfx)bug-regex2-mem): Likewise. ($(objpfx)bug-regex14-mem): Likewise. ($(objpfx)bug-regex21-mem): Likewise. ($(objpfx)bug-regex31-mem): Likewise. ($(objpfx)tst-vfork3-mem): Likewise. ($(objpfx)tst-rxspencer-no-utf8-mem): Likewise. ($(objpfx)tst-pcre-mem): Likewise. ($(objpfx)tst-boost-mem): Likewise. ($(objpfx)tst-getconf.out): Likewise. ($(objpfx)bug-ga2-mem): Likewise. ($(objpfx)bug-glob2-mem): Likewise. * resolv/Makefile ($(objpfx)mtrace-tst-leaks): Likewise. ($(objpfx)mtrace-tst-leaks2): Likewise. * stdio-common/Makefile ($(objpfx)tst-unbputc.out): Likewise. ($(objpfx)tst-printf.out): Likewise. ($(objpfx)tst-setvbuf1.out): Likewise. ($(objpfx)tst-setvbuf1-cmp.out): Likewise. * stdlib/Makefile ($(objpfx)isomac.out): Likewise. ($(objpfx)tst-fmtmsg.out): Likewise. * string/Makefile ($(objpfx)tst-svc-cmp.out): Likewise. * sysdeps/x86/Makefile ($(objpfx)tst-xmmymm.out): Likewise. localedata: * Makefile ($(objpfx)sort-test.out): Use $(evaluate-test). ($(objpfx)tst-fmon.out): Likewise. ($(objpfx)tst-numeric.out): Likewise. ($(objpfx)tst-locale.out): Likewise. ($(objpfx)tst-rpmatch.out): Likewise. ($(objpfx)tst-trans.out): Likewise. ($(objpfx)tst-mbswcs.out): Likewise. ($(objpfx)tst-ctype.out): Likewise. ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise. nptl: * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test). ($(objpfx)tst-tls6.out): Likewise. ($(objpfx)tst-cleanup0.out): Likewise. ($(objpfx)tst-cleanup0-cmp.out): Likewise. ($(objpfx)tst-cancel-wrappers.out): Likewise. ($(objpfx)tst-oddstacklimit.out): Likewise. nptl_db: * Makefile ($(objpfx)db-symbols.out): Use $(evaluate-test).
2014-02-21 21:48:08 +00:00
$(evaluate-test)
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
# Pre-standard C feature no longer supported by GCC (obsoleted in
# newer POSIX standards).
test-xfail-XPG4/varargs.h/conform = yes
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
test-xfail-XPG42/varargs.h/conform = yes
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
test-xfail-UNIX98/varargs.h/conform = yes
# Header not provided by glibc.
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
test-xfail-XPG42/ndbm.h/conform = yes
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
test-xfail-UNIX98/ndbm.h/conform = yes
test-xfail-XOPEN2K/ndbm.h/conform = yes
test-xfail-XOPEN2K8/ndbm.h/conform = yes
conformtest-cc-flags = -I../include $(+sysdep-includes) $(sysincludes) -I..
conformtest: Support system-specific XFAILs. conformtest has an internal XFAIL mechanism to allow failures of individual expectations to be ignored, so that known hard-to-fix failures (e.g. those affecting ABIs or requiring kernel changes) do not cause the overall tests to FAIL and so hide other failures from the same (header, standard) pair. Various such bugs are system-specific, so this patch adds a mechanism to allow system-specific XFAILs. A system-independent XFAIL is achieved by putting "xfail-" at the start of the relevant expectation in the *-data files. A system-specific XFAIL instead uses "xfail[cond]-", where "cond" is a condition listed in conformtest-xfail-conds in a sysdeps makefile (so one for x32 might set conformtest-xfail-conds = x86_64-x32-linux, for example, and then an expectation for tv_nsec's type could use xfail[x86_64-x32-linux]-). The actual names are arbitrary, just needing to match between the makefiles and the expectations, and if necessary you can use "xfail[cond1|cond2]-" for a test that is expected to fail under multiple conditions. As with system-independent XFAILs, I think system-specific ones should have a bug filed in Bugzilla and a comment referencing that bug. Tested for x86_64, including with test expectations and makefiles changed to use the new facility. * conform/conformtest.pl ($xfail_str): New variable. (--xfail=): New command-line option. (top level): Handle expectations starting xfail[cond]-. * conform/Makefile (conformtest-xfail): New variable. ($(conformtest-header-tests)): Pass $(conformtest-xfail) to conformtest.pl.
2017-03-17 01:08:27 +00:00
# conformtest-xfail-conds may be set by a sysdeps Makefile fragment to
# a list of conditions that are considered to be true when encountered
# in xfail[cond]- lines in test expectations.
conformtest-xfail = $(if $(conformtest-xfail-conds),\
--xfail='$(conformtest-xfail-conds)')
ifeq (no,$(cross-compiling))
conformtest-cross =
else
conformtest-cross = --cross
endif
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
$(conformtest-header-tests): $(objpfx)%/conform.out: \
conformtest.pl $(conformtest-headers-data)
(set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \
mkdir -p $(@D)/scratch; \
$(PERL) -I. conformtest.pl --tmpdir=$(@D)/scratch --cc='$(CC)' \
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
--flags='$(conformtest-cc-flags)' --standard=$$std \
--headers=$$hdr $(conformtest-xfail) $(conformtest-cross) \
> $@); \
conformtest: split up running of tests from makefile. This patch changes the logic by which header conformance tests are run so that the makefiles run the tests for each (standard, header) pair separately rather than as a single test (there are 518 such pairs being tested at present). Since these tests are slow and previously couldn't be run in parallel, this obviously speeds up the whole test run significantly when using parallel testing. There are other benefits. These tests can now be marked as expected to fail at the level of (standard, header) pairs, meaning that regressions introduced by a header change are much more likely to be spotted (of course, such a regression could be a bug in the header or in the expectations, most of which have not been properly checked against the relevant standards). The patch introduces lists in conform/Makefile of the headers to test for each standard, with a new (quick) test for each standard that the list agrees with the set of headers for which there are in fact nonempty expectations for that standard. This means that each of the 518 pairs being tested is actually something meaningful to test rather than a null test. I also hope to use these lists of headers in various standards in future tests for namespace violations where a function in a standard is implemented to call a non-reserved name for a function outside that standard. Although there are a lot of tests now marked as expected to fail, I expect most of those to be easy to fix (whether with fixes to the expectations, the headers or both - if fixing a header bug, of course file it in Bugzilla first); only a limited number are likely to reflect actual missing features in glibc. Tested x86_64 (GCC 4.7 branch). It's quite possible some failures vary from platform to platform, in which case either additional XFAILs can be added here, or platform-specific header bugs (if applicable) the failures show up can be fixed. I made XFAILs unconditional for tests that should only fail for GCC 4.6 and earlier; we could make the GCC version available in the makefiles and condition these, but simply moving the XFAILing to a finer granularity seems a clear improvement on the previous state of the whole of conformtest being XFAILed. * Makeconfig (test-xfail-name): New variable. (evaluate-test): Use $(test-xfail-name) instead of $(@F:.out=) to compute variable name for expected failures. * conform/Makefile (conformtest-headers-data): New variable. (conformtest-standards): Likewise. (conformtest-headers-ISO): Likewise. (conformtest-headers-ISO99): Likewise. (conformtest-headers-ISO11): Likewise. (conformtest-headers-POSIX): Likewise. (conformtest-headers-XPG3): Likewise. (conformtest-headers-XPG4): Likewise. (conformtest-headers-UNIX98): Likewise. (conformtest-headers-XOPEN2K): Likewise. (conformtest-headers-POSIX2008): Likewise. (conformtest-headers-XOPEN2K8): Likewise. (conformtest-header-list-base): Likewise. (conformtest-header-list-tests): Likewise. (conformtest-header-base): Likewise. (conformtest-header-tests): Likewise. (tests-special): Add $(conformtest-header-list-tests). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-tests) instead of $(objpfx)run-conformtest.out. (generated): Add $(conformtest-header-list-base). If [$(fast-check) && !$(cross-compiling)], add $(conformtest-header-base). Remove previous setting. ($(conformtest-header-list-tests)): New target. (test-xfail-run-conformtest): Remove variable. ($(objpfx)run-conformtest.out): Remove target. (test-xfail-ISO11/complex.h/conform): New variable. (test-xfail-ISO11/stdalign.h/conform): Likewise. (test-xfail-ISO11/stdnoreturn.h/conform): Likewise. (test-xfail-XPG3/varargs.h/conform): Likewise. (test-xfail-XPG4/varargs.h/conform): Likewise. (test-xfail-UNIX98/varargs.h/conform): Likewise. (test-xfail-XPG4/ndbm.h/conform): Likewise. (test-xfail-UNIX98/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K/ndbm.h/conform): Likewise. (test-xfail-XOPEN2K8/ndbm.h/conform): Likewise. (test-xfail-XPG3/fcntl.h/conform): Likewise. (test-xfail-XPG3/ftw.h/conform): Likewise. (test-xfail-XPG3/grp.h/conform): Likewise. (test-xfail-XPG3/langinfo.h/conform): Likewise. (test-xfail-XPG3/limits.h/conform): Likewise. (test-xfail-XPG3/pwd.h/conform): Likewise. (test-xfail-XPG3/search.h/conform): Likewise. (test-xfail-XPG3/signal.h/conform): Likewise. (test-xfail-XPG3/stdio.h/conform): Likewise. (test-xfail-XPG3/stdlib.h/conform): Likewise. (test-xfail-XPG3/string.h/conform): Likewise. (test-xfail-XPG3/sys/ipc.h/conform): Likewise. (test-xfail-XPG3/sys/msg.h/conform): Likewise. (test-xfail-XPG3/sys/sem.h/conform): Likewise. (test-xfail-XPG3/sys/shm.h/conform): Likewise. (test-xfail-XPG3/sys/stat.h/conform): Likewise. (test-xfail-XPG3/sys/types.h/conform): Likewise. (test-xfail-XPG3/sys/wait.h/conform): Likewise. (test-xfail-XPG3/termios.h/conform): Likewise. (test-xfail-XPG3/time.h/conform): Likewise. (test-xfail-XPG3/unistd.h/conform): Likewise. (test-xfail-XPG4/arpa/inet.h/conform): Likewise. (test-xfail-XPG4/fcntl.h/conform): Likewise. (test-xfail-XPG4/langinfo.h/conform): Likewise. (test-xfail-XPG4/netdb.h/conform): Likewise. (test-xfail-XPG4/netinet/in.h/conform): Likewise. (test-xfail-XPG4/signal.h/conform): Likewise. (test-xfail-XPG4/stdio.h/conform): Likewise. (test-xfail-XPG4/stdlib.h/conform): Likewise. (test-xfail-XPG4/stropts.h/conform): Likewise. (test-xfail-XPG4/sys/ipc.h/conform): Likewise. (test-xfail-XPG4/sys/msg.h/conform): Likewise. (test-xfail-XPG4/sys/sem.h/conform): Likewise. (test-xfail-XPG4/sys/shm.h/conform): Likewise. (test-xfail-XPG4/sys/socket.h/conform): Likewise. (test-xfail-XPG4/sys/stat.h/conform): Likewise. (test-xfail-XPG4/sys/time.h/conform): Likewise. (test-xfail-XPG4/sys/types.h/conform): Likewise. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-XPG4/termios.h/conform): Likewise. (test-xfail-XPG4/ucontext.h/conform): Likewise. (test-xfail-XPG4/unistd.h/conform): Likewise. (test-xfail-XPG4/utmpx.h/conform): Likewise. (test-xfail-POSIX/sched.h/conform): Likewise. (test-xfail-POSIX/signal.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise. (test-xfail-POSIX/tar.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/fcntl.h/conform): Likewise. (test-xfail-UNIX98/langinfo.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/sched.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/stdio.h/conform): Likewise. (test-xfail-UNIX98/stdlib.h/conform): Likewise. (test-xfail-UNIX98/stropts.h/conform): Likewise. (test-xfail-UNIX98/sys/ipc.h/conform): Likewise. (test-xfail-UNIX98/sys/msg.h/conform): Likewise. (test-xfail-UNIX98/sys/sem.h/conform): Likewise. (test-xfail-UNIX98/sys/shm.h/conform): Likewise. (test-xfail-UNIX98/sys/socket.h/conform): Likewise. (test-xfail-UNIX98/sys/time.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-UNIX98/unistd.h/conform): Likewise. (test-xfail-UNIX98/utmpx.h/conform): Likewise. (test-xfail-XOPEN2K/aio.h/conform): Likewise. (test-xfail-XOPEN2K/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K/langinfo.h/conform): Likewise. (test-xfail-XOPEN2K/math.h/conform): Likewise. (test-xfail-XOPEN2K/mqueue.h/conform): Likewise. (test-xfail-XOPEN2K/netdb.h/conform): Likewise. (test-xfail-XOPEN2K/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K/semaphore.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/stdarg.h/conform): Likewise. (test-xfail-XOPEN2K/stdio.h/conform): Likewise. (test-xfail-XOPEN2K/stropts.h/conform): Likewise. (test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/termios.h/conform): Likewise. (test-xfail-XOPEN2K/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/utmpx.h/conform): Likewise. (test-xfail-POSIX2008/arpa/inet.h/conform): Likewise. (test-xfail-POSIX2008/fcntl.h/conform): Likewise. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/stropts.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise. (test-xfail-XOPEN2K8/fcntl.h/conform): Likewise. (test-xfail-XOPEN2K8/limits.h/conform): Likewise. (test-xfail-XOPEN2K8/math.h/conform): Likewise. (test-xfail-XOPEN2K8/netdb.h/conform): Likewise. (test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/stdio.h/conform): Likewise. (test-xfail-XOPEN2K8/stropts.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/msg.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/select.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/shm.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/time.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/termios.h/conform): Likewise. (test-xfail-XOPEN2K8/tgmath.h/conform): Likewise. (test-xfail-XOPEN2K8/utmpx.h/conform): Likewise. (conformtest-cc-flags): Likewise. ($(conformtest-header-tests): New target. * conform/check-header-lists.sh: New file. * conform/run-conformtest.sh: Remove.
2014-03-07 03:23:34 +00:00
$(evaluate-test)
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
$(linknamespace-symlists-tests): $(objpfx)symlist-%: list-header-symbols.pl
$(PERL) -I. -w $< --tmpdir=$(objpfx) --cc='$(CC)' \
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
--flags='$(conformtest-cc-flags)' --standard=$* \
--headers="$(strip $(conformtest-headers-$*))" \
> $@ 2> $@.err; \
$(evaluate-test)
Make linknamespace tests check only relevant libraries. This patch addresses one known caveat in the linknamespace tests: with this patch they will now only look for definitions of symbols in relevant libraries, meaning that librt and libpthread are not checked for ISO C standards, XPG3 and XPG4. In particular, this means that if __pthread_initialize_minimal is somehow brought in for one of those standards, the definition from libc-tls.o will be considered instead of that from libpthread, so avoiding bringing in lots of other libpthread symbols. This should address some of the failures reported by Carlos in <https://sourceware.org/ml/libc-alpha/2014-11/msg00882.html>, where __pointer_chk_guard_local brought in __pthread_initialize_minimal. Tested for x86_64. The removal of one XFAIL for XPG4 actually shows up a header bug (shm_open should not be declared for XPG4 - the namespace issue was for symbols brought in by shm_open, which is no longer found at all now librt isn't searched; I've filed bug 17663 for the header bug, though it would show up eventually anyway in the course of review of conform/ data against XPG4). Committed. * conform/Makefile (linknamespace-symlist-stdlibs-base): New variable. (linknamespace-symlist-stdlibs-tests): Likewise. (tests-special): Append $(linknamespace-symlist-stdlibs-tests) instead of $(objpfx)symlist-stdlibs. (linknamespace-libs-isoc): New variable. (linknamespace-libs): Use $(linknamespace-libs-isoc). (linknamespace-libs-ISO): New variable. (linknamespace-libs-ISO99): Likewise. (linknamespace-libs-ISO11): Likewise. (linknamespace-libs-XPG3): Likewise. (linknamespace-libs-XPG4): Likewise. (linknamespace-libs-POSIX): Likewise. (linknamespace-libs-UNIX98): Likewise. (linknamespace-libs-XOPEN2K): Likewise. (linknamespace-libs-POSIX2008): Likewise. (linknamespace-libs-XOPEN2K8): Likewise. ($(objpfx)symlist-stdlibs): Replace by $(linknamespace-symlist-stdlibs-tests). Use $(linknamespace-libs-$*) as set of libraries. ($(linknamespace-header-tests)): Update dependencies. Use $(objpfx)symlist-stdlibs-$$std for --libsyms argument. (test-xfail-XPG4/sys/mman.h/linknamespace): Remove. * conform/linknamespace.pl: Remove comment about considering definitions of symbols from irrelevant libraries.
2014-11-29 01:46:56 +00:00
linknamespace-libs-isoc = $(common-objpfx)libc.a $(common-objpfx)math/libm.a
linknamespace-libs-thr = $(linknamespace-libs-isoc) \
$(common-objpfx)rt/librt.a $(static-thread-library)
linknamespace-libs-posix = $(linknamespace-libs-thr) \
$(common-objpfx)dlfcn/libdl.a
linknamespace-libs-xsi = $(linknamespace-libs-posix) \
$(common-objpfx)crypt/libcrypt.a
Make linknamespace tests check only relevant libraries. This patch addresses one known caveat in the linknamespace tests: with this patch they will now only look for definitions of symbols in relevant libraries, meaning that librt and libpthread are not checked for ISO C standards, XPG3 and XPG4. In particular, this means that if __pthread_initialize_minimal is somehow brought in for one of those standards, the definition from libc-tls.o will be considered instead of that from libpthread, so avoiding bringing in lots of other libpthread symbols. This should address some of the failures reported by Carlos in <https://sourceware.org/ml/libc-alpha/2014-11/msg00882.html>, where __pointer_chk_guard_local brought in __pthread_initialize_minimal. Tested for x86_64. The removal of one XFAIL for XPG4 actually shows up a header bug (shm_open should not be declared for XPG4 - the namespace issue was for symbols brought in by shm_open, which is no longer found at all now librt isn't searched; I've filed bug 17663 for the header bug, though it would show up eventually anyway in the course of review of conform/ data against XPG4). Committed. * conform/Makefile (linknamespace-symlist-stdlibs-base): New variable. (linknamespace-symlist-stdlibs-tests): Likewise. (tests-special): Append $(linknamespace-symlist-stdlibs-tests) instead of $(objpfx)symlist-stdlibs. (linknamespace-libs-isoc): New variable. (linknamespace-libs): Use $(linknamespace-libs-isoc). (linknamespace-libs-ISO): New variable. (linknamespace-libs-ISO99): Likewise. (linknamespace-libs-ISO11): Likewise. (linknamespace-libs-XPG3): Likewise. (linknamespace-libs-XPG4): Likewise. (linknamespace-libs-POSIX): Likewise. (linknamespace-libs-UNIX98): Likewise. (linknamespace-libs-XOPEN2K): Likewise. (linknamespace-libs-POSIX2008): Likewise. (linknamespace-libs-XOPEN2K8): Likewise. ($(objpfx)symlist-stdlibs): Replace by $(linknamespace-symlist-stdlibs-tests). Use $(linknamespace-libs-$*) as set of libraries. ($(linknamespace-header-tests)): Update dependencies. Use $(objpfx)symlist-stdlibs-$$std for --libsyms argument. (test-xfail-XPG4/sys/mman.h/linknamespace): Remove. * conform/linknamespace.pl: Remove comment about considering definitions of symbols from irrelevant libraries.
2014-11-29 01:46:56 +00:00
linknamespace-libs-ISO = $(linknamespace-libs-isoc)
linknamespace-libs-ISO99 = $(linknamespace-libs-isoc)
linknamespace-libs-ISO11 = $(linknamespace-libs-isoc)
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) \
$(common-objpfx)crypt/libcrypt.a
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4)
linknamespace-libs-POSIX = $(linknamespace-libs-thr)
linknamespace-libs-UNIX98 = $(linknamespace-libs-xsi)
linknamespace-libs-XOPEN2K = $(linknamespace-libs-xsi)
linknamespace-libs-POSIX2008 = $(linknamespace-libs-posix)
linknamespace-libs-XOPEN2K8 = $(linknamespace-libs-xsi)
2017-02-01 16:34:06 +00:00
linknamespace-libs = $(foreach std,$(conformtest-standards),\
$(linknamespace-libs-$(std)))
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
Make linknamespace tests check only relevant libraries. This patch addresses one known caveat in the linknamespace tests: with this patch they will now only look for definitions of symbols in relevant libraries, meaning that librt and libpthread are not checked for ISO C standards, XPG3 and XPG4. In particular, this means that if __pthread_initialize_minimal is somehow brought in for one of those standards, the definition from libc-tls.o will be considered instead of that from libpthread, so avoiding bringing in lots of other libpthread symbols. This should address some of the failures reported by Carlos in <https://sourceware.org/ml/libc-alpha/2014-11/msg00882.html>, where __pointer_chk_guard_local brought in __pthread_initialize_minimal. Tested for x86_64. The removal of one XFAIL for XPG4 actually shows up a header bug (shm_open should not be declared for XPG4 - the namespace issue was for symbols brought in by shm_open, which is no longer found at all now librt isn't searched; I've filed bug 17663 for the header bug, though it would show up eventually anyway in the course of review of conform/ data against XPG4). Committed. * conform/Makefile (linknamespace-symlist-stdlibs-base): New variable. (linknamespace-symlist-stdlibs-tests): Likewise. (tests-special): Append $(linknamespace-symlist-stdlibs-tests) instead of $(objpfx)symlist-stdlibs. (linknamespace-libs-isoc): New variable. (linknamespace-libs): Use $(linknamespace-libs-isoc). (linknamespace-libs-ISO): New variable. (linknamespace-libs-ISO99): Likewise. (linknamespace-libs-ISO11): Likewise. (linknamespace-libs-XPG3): Likewise. (linknamespace-libs-XPG4): Likewise. (linknamespace-libs-POSIX): Likewise. (linknamespace-libs-UNIX98): Likewise. (linknamespace-libs-XOPEN2K): Likewise. (linknamespace-libs-POSIX2008): Likewise. (linknamespace-libs-XOPEN2K8): Likewise. ($(objpfx)symlist-stdlibs): Replace by $(linknamespace-symlist-stdlibs-tests). Use $(linknamespace-libs-$*) as set of libraries. ($(linknamespace-header-tests)): Update dependencies. Use $(objpfx)symlist-stdlibs-$$std for --libsyms argument. (test-xfail-XPG4/sys/mman.h/linknamespace): Remove. * conform/linknamespace.pl: Remove comment about considering definitions of symbols from irrelevant libraries.
2014-11-29 01:46:56 +00:00
$(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \
$(linknamespace-libs)
LC_ALL=C $(READELF) -W -s $(linknamespace-libs-$*) > $@; \
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
$(evaluate-test)
$(linknamespace-header-tests): $(objpfx)%/linknamespace.out: \
Make linknamespace tests check only relevant libraries. This patch addresses one known caveat in the linknamespace tests: with this patch they will now only look for definitions of symbols in relevant libraries, meaning that librt and libpthread are not checked for ISO C standards, XPG3 and XPG4. In particular, this means that if __pthread_initialize_minimal is somehow brought in for one of those standards, the definition from libc-tls.o will be considered instead of that from libpthread, so avoiding bringing in lots of other libpthread symbols. This should address some of the failures reported by Carlos in <https://sourceware.org/ml/libc-alpha/2014-11/msg00882.html>, where __pointer_chk_guard_local brought in __pthread_initialize_minimal. Tested for x86_64. The removal of one XFAIL for XPG4 actually shows up a header bug (shm_open should not be declared for XPG4 - the namespace issue was for symbols brought in by shm_open, which is no longer found at all now librt isn't searched; I've filed bug 17663 for the header bug, though it would show up eventually anyway in the course of review of conform/ data against XPG4). Committed. * conform/Makefile (linknamespace-symlist-stdlibs-base): New variable. (linknamespace-symlist-stdlibs-tests): Likewise. (tests-special): Append $(linknamespace-symlist-stdlibs-tests) instead of $(objpfx)symlist-stdlibs. (linknamespace-libs-isoc): New variable. (linknamespace-libs): Use $(linknamespace-libs-isoc). (linknamespace-libs-ISO): New variable. (linknamespace-libs-ISO99): Likewise. (linknamespace-libs-ISO11): Likewise. (linknamespace-libs-XPG3): Likewise. (linknamespace-libs-XPG4): Likewise. (linknamespace-libs-POSIX): Likewise. (linknamespace-libs-UNIX98): Likewise. (linknamespace-libs-XOPEN2K): Likewise. (linknamespace-libs-POSIX2008): Likewise. (linknamespace-libs-XOPEN2K8): Likewise. ($(objpfx)symlist-stdlibs): Replace by $(linknamespace-symlist-stdlibs-tests). Use $(linknamespace-libs-$*) as set of libraries. ($(linknamespace-header-tests)): Update dependencies. Use $(objpfx)symlist-stdlibs-$$std for --libsyms argument. (test-xfail-XPG4/sys/mman.h/linknamespace): Remove. * conform/linknamespace.pl: Remove comment about considering definitions of symbols from irrelevant libraries.
2014-11-29 01:46:56 +00:00
linknamespace.pl \
$(linknamespace-symlists-tests) \
Make linknamespace tests check only relevant libraries. This patch addresses one known caveat in the linknamespace tests: with this patch they will now only look for definitions of symbols in relevant libraries, meaning that librt and libpthread are not checked for ISO C standards, XPG3 and XPG4. In particular, this means that if __pthread_initialize_minimal is somehow brought in for one of those standards, the definition from libc-tls.o will be considered instead of that from libpthread, so avoiding bringing in lots of other libpthread symbols. This should address some of the failures reported by Carlos in <https://sourceware.org/ml/libc-alpha/2014-11/msg00882.html>, where __pointer_chk_guard_local brought in __pthread_initialize_minimal. Tested for x86_64. The removal of one XFAIL for XPG4 actually shows up a header bug (shm_open should not be declared for XPG4 - the namespace issue was for symbols brought in by shm_open, which is no longer found at all now librt isn't searched; I've filed bug 17663 for the header bug, though it would show up eventually anyway in the course of review of conform/ data against XPG4). Committed. * conform/Makefile (linknamespace-symlist-stdlibs-base): New variable. (linknamespace-symlist-stdlibs-tests): Likewise. (tests-special): Append $(linknamespace-symlist-stdlibs-tests) instead of $(objpfx)symlist-stdlibs. (linknamespace-libs-isoc): New variable. (linknamespace-libs): Use $(linknamespace-libs-isoc). (linknamespace-libs-ISO): New variable. (linknamespace-libs-ISO99): Likewise. (linknamespace-libs-ISO11): Likewise. (linknamespace-libs-XPG3): Likewise. (linknamespace-libs-XPG4): Likewise. (linknamespace-libs-POSIX): Likewise. (linknamespace-libs-UNIX98): Likewise. (linknamespace-libs-XOPEN2K): Likewise. (linknamespace-libs-POSIX2008): Likewise. (linknamespace-libs-XOPEN2K8): Likewise. ($(objpfx)symlist-stdlibs): Replace by $(linknamespace-symlist-stdlibs-tests). Use $(linknamespace-libs-$*) as set of libraries. ($(linknamespace-header-tests)): Update dependencies. Use $(objpfx)symlist-stdlibs-$$std for --libsyms argument. (test-xfail-XPG4/sys/mman.h/linknamespace): Remove. * conform/linknamespace.pl: Remove comment about considering definitions of symbols from irrelevant libraries.
2014-11-29 01:46:56 +00:00
$(linknamespace-symlist-stdlibs-tests)
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
(set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \
mkdir -p $(@D)/scratch; \
$(PERL) -I. -w $< --tmpdir=$(@D)/scratch --cc='$(CC)' \
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
--flags='$(conformtest-cc-flags)' --standard=$$std \
--stdsyms=$(objpfx)symlist-$$std --header=$$hdr \
Make linknamespace tests check only relevant libraries. This patch addresses one known caveat in the linknamespace tests: with this patch they will now only look for definitions of symbols in relevant libraries, meaning that librt and libpthread are not checked for ISO C standards, XPG3 and XPG4. In particular, this means that if __pthread_initialize_minimal is somehow brought in for one of those standards, the definition from libc-tls.o will be considered instead of that from libpthread, so avoiding bringing in lots of other libpthread symbols. This should address some of the failures reported by Carlos in <https://sourceware.org/ml/libc-alpha/2014-11/msg00882.html>, where __pointer_chk_guard_local brought in __pthread_initialize_minimal. Tested for x86_64. The removal of one XFAIL for XPG4 actually shows up a header bug (shm_open should not be declared for XPG4 - the namespace issue was for symbols brought in by shm_open, which is no longer found at all now librt isn't searched; I've filed bug 17663 for the header bug, though it would show up eventually anyway in the course of review of conform/ data against XPG4). Committed. * conform/Makefile (linknamespace-symlist-stdlibs-base): New variable. (linknamespace-symlist-stdlibs-tests): Likewise. (tests-special): Append $(linknamespace-symlist-stdlibs-tests) instead of $(objpfx)symlist-stdlibs. (linknamespace-libs-isoc): New variable. (linknamespace-libs): Use $(linknamespace-libs-isoc). (linknamespace-libs-ISO): New variable. (linknamespace-libs-ISO99): Likewise. (linknamespace-libs-ISO11): Likewise. (linknamespace-libs-XPG3): Likewise. (linknamespace-libs-XPG4): Likewise. (linknamespace-libs-POSIX): Likewise. (linknamespace-libs-UNIX98): Likewise. (linknamespace-libs-XOPEN2K): Likewise. (linknamespace-libs-POSIX2008): Likewise. (linknamespace-libs-XOPEN2K8): Likewise. ($(objpfx)symlist-stdlibs): Replace by $(linknamespace-symlist-stdlibs-tests). Use $(linknamespace-libs-$*) as set of libraries. ($(linknamespace-header-tests)): Update dependencies. Use $(objpfx)symlist-stdlibs-$$std for --libsyms argument. (test-xfail-XPG4/sys/mman.h/linknamespace): Remove. * conform/linknamespace.pl: Remove comment about considering definitions of symbols from irrelevant libraries.
2014-11-29 01:46:56 +00:00
--libsyms=$(objpfx)symlist-stdlibs-$$std \
--readelf='$(READELF)' \
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
> $@ 2>&1); \
$(evaluate-test)
# Pre-standard C feature no longer supported by GCC (obsoleted in
# newer POSIX standards).
test-xfail-XPG4/varargs.h/linknamespace = yes
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
test-xfail-XPG42/varargs.h/linknamespace = yes
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
test-xfail-UNIX98/varargs.h/linknamespace = yes
# Header not provided by glibc.
conformtest: Fix XPG standard naming. The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
test-xfail-XPG42/ndbm.h/linknamespace = yes
Add tests for namespace for static linking. One thing we currently try to ensure manually is that glibc is namespace-clean for static linking; that is, if you only use features from a particular standard (including the set of features exposed by headers given feature test macros such as _DEFAULT_SOURCE that don't correspond to any written standard), the library objects brought in by the static linker will not define or use (strong) names that are reserved to the user in that standard. This patch implements automatic tests for this, using the same set of standards as for the header conformance tests (it would, however, be easy to add more standards for this testing, without them needing to have the definitions of expected header contents for the header tests). The tests are based on the functions declared in each header, as extracted using GCC's -aux-info option. The following comment from linknamespace.pl explains the caveats around this approach: Here's an example of the output for ISO (C90) assert.h, from before my recent fixes and whitelisting of cases that seem more complicated to fix: [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] __get_nprocs -> [libc.a(getsysstats.o)] fgets_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fileno [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] fread_unlocked [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_archive_subfreeres -> [libc.a(loadarchive.o)] __sysconf -> [libc.a(sysconf.o)] __tzname_max -> [libc.a(tzset.o)] __tzfile_compute -> [libc.a(tzfile.o)] ftello [initial] __assert_fail -> [libc.a(assert.o)] free -> [libc.a(malloc.o)] malloc_info [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __libc_setlocale_lock -> [libc.a(setlocale.o)] _nl_default_locale_path -> [libc.a(findlocale.o)] memmem [initial] __assert_perror_fail -> [libc.a(assert-perr.o)] __strerror_r -> [libc.a(_strerror.o)] mempcpy [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] _nl_find_domain -> [libc.a(finddomain.o)] _nl_expand_alias -> [libc.a(localealias.o)] qsort -> [libc.a(msort.o)] qsort_r [initial] __assert_fail -> [libc.a(assert.o)] _dl_pagesize -> [libc.a(dl-support.o)] __rawmemchr -> [libc.a(rawmemchr.o)] rawmemchr [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] __getcwd -> [libc.a(getcwd.o)] rewinddir [initial] __assert_fail -> [libc.a(assert.o)] stderr [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdin [initial] __assert_fail -> [libc.a(assert.o)] stderr -> [libc.a(stdio.o)] stdout [initial] __assert_fail -> [libc.a(assert.o)] __dcgettext -> [libc.a(dcgettext.o)] __dcigettext -> [libc.a(dcigettext.o)] stpcpy [initial] __assert_fail -> [libc.a(assert.o)] __fxprintf -> [libc.a(fxprintf.o)] _IO_vfprintf -> [libc.a(vfprintf.o)] __printf_fp -> [libc.a(printf_fp.o)] wmemset Of the 161 XFAILs, seven are the inevitable varargs.h and ndbm.h failures; I think the remaining 154 mostly represent genuine bugs in glibc that should mostly be straightforward to fix (probably rather fewer than 154 bugs - issues generally affect multiple headers, for multiple standards). (When fixing, of course you need to file a bug in Bugzilla, and check for the possibility that the header conditionals are what's incorrect - that the first listed symbol shouldn't have been declared, or that the symbol finally brought in should have been declared.) * conform/GlibcConform.pm: New file. * conform/conformtest.pl: Use GlibcConform module. * conform/linknamespace.pl: New file. * conform/list-header-symbols.pl: Likewise. * conform/Makefile (linknamespace-symlists-base): New variable. (linknamespace-symlists-tests): Likewise. (linknamespace-header-base): Likewise. (linknamespace-header-tests): Likewise. (tests-special): Add new tests. ($(linknamespace-symlists-tests)): New rule. (linknamespace-libs): New variable. ($(objpfx)symlist-stdlibs): New rule. ($(linknamespace-header-tests)): Likewise. (test-xfail-XPG3/varargs.h/linknamespace): New variable. (test-xfail-XPG4/varargs.h/linknamespace): Likewise. (test-xfail-UNIX98/varargs.h/linknamespace): Likewise. (test-xfail-XPG4/ndbm.h/linknamespace): Likewise. (test-xfail-UNIX98/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ndbm.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/ndbm.h/linknamespace): Likewise. (test-xfail-ISO/math.h/linknamespace): Likewise. (test-xfail-ISO/signal.h/linknamespace): Likewise. (test-xfail-ISO/stdio.h/linknamespace): Likewise. (test-xfail-ISO/time.h/linknamespace): Likewise. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/ctype.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/signal.h/linknamespace): Likewise. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/ctype.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/signal.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/ctype.h/linknamespace): Likewise. (test-xfail-XPG3/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG3/glob.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG3/regex.h/linknamespace): Likewise. (test-xfail-XPG3/search.h/linknamespace): Likewise. (test-xfail-XPG3/stdio.h/linknamespace): Likewise. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG3/unistd.h/linknamespace): Likewise. (test-xfail-XPG3/wordexp.h/linknamespace): Likewise. (test-xfail-XPG4/ctype.h/linknamespace): Likewise. (test-xfail-XPG4/fmtmsg.h/linknamespace): Likewise. (test-xfail-XPG4/fnmatch.h/linknamespace): Likewise. (test-xfail-XPG4/glob.h/linknamespace): Likewise. (test-xfail-XPG4/grp.h/linknamespace): Likewise. (test-xfail-XPG4/libgen.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-XPG4/netdb.h/linknamespace): Likewise. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-XPG4/search.h/linknamespace): Likewise. (test-xfail-XPG4/stdio.h/linknamespace): Likewise. (test-xfail-XPG4/stdlib.h/linknamespace): Likewise. (test-xfail-XPG4/sys/mman.h/linknamespace): Likewise. (test-xfail-XPG4/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XPG4/syslog.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise. (test-xfail-XPG4/unistd.h/linknamespace): Likewise. (test-xfail-XPG4/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX/aio.h/linknamespace): Likewise. (test-xfail-POSIX/fnmatch.h/linknamespace): Likewise. (test-xfail-POSIX/glob.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-POSIX/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX/pthread.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. (test-xfail-POSIX/unistd.h/linknamespace): Likewise. (test-xfail-POSIX/wordexp.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/ctype.h/linknamespace): Likewise. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-UNIX98/fnmatch.h/linknamespace): Likewise. (test-xfail-UNIX98/glob.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-UNIX98/mqueue.h/linknamespace): Likewise. (test-xfail-UNIX98/netdb.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/regex.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/search.h/linknamespace): Likewise. (test-xfail-UNIX98/semaphore.h/linknamespace): Likewise. (test-xfail-UNIX98/stdio.h/linknamespace): Likewise. (test-xfail-UNIX98/stdlib.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-UNIX98/syslog.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise. (test-xfail-UNIX98/unistd.h/linknamespace): Likewise. (test-xfail-UNIX98/wchar.h/linknamespace): Likewise. (test-xfail-UNIX98/wordexp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fnmatch.h/linknamespace): Likewise. (test-xfail-XOPEN2K/glob.h/linknamespace): Likewise. (test-xfail-XOPEN2K/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K/signal.h/linknamespace): Likewise. (test-xfail-XOPEN2K/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K/stdlib.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. (test-xfail-XOPEN2K/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K/wordexp.h/linknamespace): Likewise. (test-xfail-POSIX2008/aio.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise. (test-xfail-POSIX2008/dirent.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/grp.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-POSIX2008/netdb.h/linknamespace): Likewise. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/regex.h/linknamespace): Likewise. (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise. (test-xfail-POSIX2008/unistd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/aio.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/grp.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/netdb.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pthread.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/regex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/search.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/syslog.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/time.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/unistd.h/linknamespace): Likewise.
2014-11-12 22:45:25 +00:00
test-xfail-UNIX98/ndbm.h/linknamespace = yes
test-xfail-XOPEN2K/ndbm.h/linknamespace = yes
test-xfail-XOPEN2K8/ndbm.h/linknamespace = yes