mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 14:00:30 +00:00
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.
This commit is contained in:
parent
a00f522af8
commit
54ee292da7
162
ChangeLog
162
ChangeLog
@ -1,5 +1,167 @@
|
||||
2014-03-07 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* 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.
|
||||
|
||||
* conform/conformtest.pl: Allow ' and \ in values given for
|
||||
constants.
|
||||
* conform/data/semaphore.h-data [POSIX] (fcntl.h): Allow header
|
||||
|
@ -1083,11 +1083,14 @@ endif
|
||||
# The name to give to a test in test results summaries.
|
||||
test-name = $(strip $(patsubst %.out, %, $(patsubst $(common-objpfx)%, %, $@)))
|
||||
|
||||
# Likewise, in XFAIL variable names.
|
||||
test-xfail-name = $(strip $(patsubst %.out, %, $(patsubst $(objpfx)%, %, $@)))
|
||||
|
||||
# Command to output a test status line (such as PASS: test-name). If
|
||||
# test-xfail-$(@F:.out=) has a nonempty value, the status will be
|
||||
# test-xfail-$(test-xfail-name) has a nonempty value, the status will be
|
||||
# XPASS or XFAIL rather than PASS or FAIL.
|
||||
evaluate-test = $(..)scripts/evaluate-test.sh $(test-name) $$? \
|
||||
$(if $(test-xfail-$(@F:.out=)),true,false) \
|
||||
$(if $(test-xfail-$(test-xfail-name)),true,false) \
|
||||
> $(common-objpfx)$(test-name).test-result
|
||||
|
||||
endif # Makeconfig not yet included
|
||||
|
250
conform/Makefile
250
conform/Makefile
@ -22,20 +22,254 @@ subdir := conform
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
conformtest-headers-data := $(wildcard data/*.h-data) \
|
||||
$(wildcard data/*/*.h-data)
|
||||
|
||||
conformtest-standards := ISO ISO99 ISO11 POSIX XPG3 XPG4 UNIX98 XOPEN2K \
|
||||
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
|
||||
# Missing XPG3 expectations for: regexp.h wchar.h.
|
||||
conformtest-headers-XPG3 := $(conformtest-headers-ISO) cpio.h dirent.h \
|
||||
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
|
||||
# Missing XPG4 expectations for: re_comp.h regexp.h wchar.h.
|
||||
# XPG4 includes XTI, but xti.h is outside the scope of these tests.
|
||||
conformtest-headers-XPG4 := $(conformtest-headers-XPG3) arpa/inet.h fmtmsg.h \
|
||||
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))
|
||||
ifneq (yes,$(fast-check))
|
||||
ifeq (no,$(cross-compiling))
|
||||
tests-special += $(objpfx)run-conformtest.out
|
||||
tests-special += $(conformtest-header-tests)
|
||||
generated += $(conformtest-header-base)
|
||||
endif
|
||||
endif
|
||||
|
||||
include ../Rules
|
||||
|
||||
test-xfail-run-conformtest = yes
|
||||
$(objpfx)run-conformtest.out: run-conformtest.sh conformtest.pl \
|
||||
$(wildcard data/*.h-data) \
|
||||
$(wildcard data/*/*.h-data)
|
||||
$(BASH) -e $< $(objpfx) $(PERL) '$(CC)' \
|
||||
'-I../include $(+sysdep-includes) $(sysincludes) -I..'; \
|
||||
$(conformtest-header-list-tests): $(objpfx)header-list-%.out: \
|
||||
check-header-lists.sh \
|
||||
$(conformtest-headers-data)
|
||||
$(SHELL) $< "$*" "$(CC)" "$(strip $(conformtest-headers-$*))" \
|
||||
"$(conformtest-headers-data)" > $@; \
|
||||
$(evaluate-test)
|
||||
|
||||
generated = $(wildcard $(objpfx)conform-*.out)
|
||||
# GCC 4.6 and earlier lack features required by these tests.
|
||||
test-xfail-ISO11/complex.h/conform = yes
|
||||
test-xfail-ISO11/stdalign.h/conform = yes
|
||||
test-xfail-ISO11/stdnoreturn.h/conform = yes
|
||||
|
||||
# Pre-standard C feature no longer supported by GCC (obsoleted in
|
||||
# newer POSIX standards).
|
||||
test-xfail-XPG3/varargs.h/conform = yes
|
||||
test-xfail-XPG4/varargs.h/conform = yes
|
||||
test-xfail-UNIX98/varargs.h/conform = yes
|
||||
|
||||
# Header not provided by glibc.
|
||||
test-xfail-XPG4/ndbm.h/conform = yes
|
||||
test-xfail-UNIX98/ndbm.h/conform = yes
|
||||
test-xfail-XOPEN2K/ndbm.h/conform = yes
|
||||
test-xfail-XOPEN2K8/ndbm.h/conform = yes
|
||||
|
||||
# Unsorted expected failures.
|
||||
test-xfail-XPG3/fcntl.h/conform = yes
|
||||
test-xfail-XPG3/ftw.h/conform = yes
|
||||
test-xfail-XPG3/grp.h/conform = yes
|
||||
test-xfail-XPG3/langinfo.h/conform = yes
|
||||
test-xfail-XPG3/limits.h/conform = yes
|
||||
test-xfail-XPG3/pwd.h/conform = yes
|
||||
test-xfail-XPG3/search.h/conform = yes
|
||||
test-xfail-XPG3/signal.h/conform = yes
|
||||
test-xfail-XPG3/stdio.h/conform = yes
|
||||
test-xfail-XPG3/stdlib.h/conform = yes
|
||||
test-xfail-XPG3/string.h/conform = yes
|
||||
test-xfail-XPG3/sys/ipc.h/conform = yes
|
||||
test-xfail-XPG3/sys/msg.h/conform = yes
|
||||
test-xfail-XPG3/sys/sem.h/conform = yes
|
||||
test-xfail-XPG3/sys/shm.h/conform = yes
|
||||
test-xfail-XPG3/sys/stat.h/conform = yes
|
||||
test-xfail-XPG3/sys/types.h/conform = yes
|
||||
test-xfail-XPG3/sys/wait.h/conform = yes
|
||||
test-xfail-XPG3/termios.h/conform = yes
|
||||
test-xfail-XPG3/time.h/conform = yes
|
||||
test-xfail-XPG3/unistd.h/conform = yes
|
||||
test-xfail-XPG4/arpa/inet.h/conform = yes
|
||||
test-xfail-XPG4/fcntl.h/conform = yes
|
||||
test-xfail-XPG4/langinfo.h/conform = yes
|
||||
test-xfail-XPG4/netdb.h/conform = yes
|
||||
test-xfail-XPG4/netinet/in.h/conform = yes
|
||||
test-xfail-XPG4/signal.h/conform = yes
|
||||
test-xfail-XPG4/stdio.h/conform = yes
|
||||
test-xfail-XPG4/stdlib.h/conform = yes
|
||||
test-xfail-XPG4/stropts.h/conform = yes
|
||||
test-xfail-XPG4/sys/ipc.h/conform = yes
|
||||
test-xfail-XPG4/sys/msg.h/conform = yes
|
||||
test-xfail-XPG4/sys/sem.h/conform = yes
|
||||
test-xfail-XPG4/sys/shm.h/conform = yes
|
||||
test-xfail-XPG4/sys/socket.h/conform = yes
|
||||
test-xfail-XPG4/sys/stat.h/conform = yes
|
||||
test-xfail-XPG4/sys/time.h/conform = yes
|
||||
test-xfail-XPG4/sys/types.h/conform = yes
|
||||
test-xfail-XPG4/sys/wait.h/conform = yes
|
||||
test-xfail-XPG4/termios.h/conform = yes
|
||||
test-xfail-XPG4/ucontext.h/conform = yes
|
||||
test-xfail-XPG4/unistd.h/conform = yes
|
||||
test-xfail-XPG4/utmpx.h/conform = yes
|
||||
test-xfail-POSIX/sched.h/conform = yes
|
||||
test-xfail-POSIX/signal.h/conform = yes
|
||||
test-xfail-POSIX/sys/wait.h/conform = yes
|
||||
test-xfail-POSIX/tar.h/conform = yes
|
||||
test-xfail-UNIX98/arpa/inet.h/conform = yes
|
||||
test-xfail-UNIX98/fcntl.h/conform = yes
|
||||
test-xfail-UNIX98/langinfo.h/conform = yes
|
||||
test-xfail-UNIX98/netdb.h/conform = yes
|
||||
test-xfail-UNIX98/netinet/in.h/conform = yes
|
||||
test-xfail-UNIX98/sched.h/conform = yes
|
||||
test-xfail-UNIX98/signal.h/conform = yes
|
||||
test-xfail-UNIX98/stdio.h/conform = yes
|
||||
test-xfail-UNIX98/stdlib.h/conform = yes
|
||||
test-xfail-UNIX98/stropts.h/conform = yes
|
||||
test-xfail-UNIX98/sys/ipc.h/conform = yes
|
||||
test-xfail-UNIX98/sys/msg.h/conform = yes
|
||||
test-xfail-UNIX98/sys/sem.h/conform = yes
|
||||
test-xfail-UNIX98/sys/shm.h/conform = yes
|
||||
test-xfail-UNIX98/sys/socket.h/conform = yes
|
||||
test-xfail-UNIX98/sys/time.h/conform = yes
|
||||
test-xfail-UNIX98/sys/wait.h/conform = yes
|
||||
test-xfail-UNIX98/ucontext.h/conform = yes
|
||||
test-xfail-UNIX98/unistd.h/conform = yes
|
||||
test-xfail-UNIX98/utmpx.h/conform = yes
|
||||
test-xfail-XOPEN2K/aio.h/conform = yes
|
||||
test-xfail-XOPEN2K/arpa/inet.h/conform = yes
|
||||
test-xfail-XOPEN2K/fcntl.h/conform = yes
|
||||
test-xfail-XOPEN2K/langinfo.h/conform = yes
|
||||
test-xfail-XOPEN2K/math.h/conform = yes
|
||||
test-xfail-XOPEN2K/mqueue.h/conform = yes
|
||||
test-xfail-XOPEN2K/netdb.h/conform = yes
|
||||
test-xfail-XOPEN2K/netinet/in.h/conform = yes
|
||||
test-xfail-XOPEN2K/semaphore.h/conform = yes
|
||||
test-xfail-XOPEN2K/signal.h/conform = yes
|
||||
test-xfail-XOPEN2K/stdarg.h/conform = yes
|
||||
test-xfail-XOPEN2K/stdio.h/conform = yes
|
||||
test-xfail-XOPEN2K/stropts.h/conform = yes
|
||||
test-xfail-XOPEN2K/sys/ipc.h/conform = yes
|
||||
test-xfail-XOPEN2K/sys/msg.h/conform = yes
|
||||
test-xfail-XOPEN2K/sys/sem.h/conform = yes
|
||||
test-xfail-XOPEN2K/sys/shm.h/conform = yes
|
||||
test-xfail-XOPEN2K/sys/socket.h/conform = yes
|
||||
test-xfail-XOPEN2K/sys/wait.h/conform = yes
|
||||
test-xfail-XOPEN2K/termios.h/conform = yes
|
||||
test-xfail-XOPEN2K/tgmath.h/conform = yes
|
||||
test-xfail-XOPEN2K/ucontext.h/conform = yes
|
||||
test-xfail-XOPEN2K/utmpx.h/conform = yes
|
||||
test-xfail-POSIX2008/arpa/inet.h/conform = yes
|
||||
test-xfail-POSIX2008/fcntl.h/conform = yes
|
||||
test-xfail-POSIX2008/netdb.h/conform = yes
|
||||
test-xfail-POSIX2008/netinet/in.h/conform = yes
|
||||
test-xfail-POSIX2008/signal.h/conform = yes
|
||||
test-xfail-POSIX2008/stropts.h/conform = yes
|
||||
test-xfail-POSIX2008/sys/socket.h/conform = yes
|
||||
test-xfail-POSIX2008/sys/wait.h/conform = yes
|
||||
test-xfail-XOPEN2K8/arpa/inet.h/conform = yes
|
||||
test-xfail-XOPEN2K8/fcntl.h/conform = yes
|
||||
test-xfail-XOPEN2K8/limits.h/conform = yes
|
||||
test-xfail-XOPEN2K8/math.h/conform = yes
|
||||
test-xfail-XOPEN2K8/netdb.h/conform = yes
|
||||
test-xfail-XOPEN2K8/netinet/in.h/conform = yes
|
||||
test-xfail-XOPEN2K8/signal.h/conform = yes
|
||||
test-xfail-XOPEN2K8/stdio.h/conform = yes
|
||||
test-xfail-XOPEN2K8/stropts.h/conform = yes
|
||||
test-xfail-XOPEN2K8/sys/ipc.h/conform = yes
|
||||
test-xfail-XOPEN2K8/sys/msg.h/conform = yes
|
||||
test-xfail-XOPEN2K8/sys/select.h/conform = yes
|
||||
test-xfail-XOPEN2K8/sys/sem.h/conform = yes
|
||||
test-xfail-XOPEN2K8/sys/shm.h/conform = yes
|
||||
test-xfail-XOPEN2K8/sys/socket.h/conform = yes
|
||||
test-xfail-XOPEN2K8/sys/time.h/conform = yes
|
||||
test-xfail-XOPEN2K8/sys/wait.h/conform = yes
|
||||
test-xfail-XOPEN2K8/termios.h/conform = yes
|
||||
test-xfail-XOPEN2K8/tgmath.h/conform = yes
|
||||
test-xfail-XOPEN2K8/utmpx.h/conform = yes
|
||||
|
||||
conformtest-cc-flags = -I../include $(+sysdep-includes) $(sysincludes) -I..
|
||||
$(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) conformtest.pl --tmpdir=$(@D)/scratch --cc='$(CC)' \
|
||||
--flags='$(conformtest-cc-flags)' --standard=$$std \
|
||||
--headers=$$hdr > $@); \
|
||||
$(evaluate-test)
|
||||
|
65
conform/check-header-lists.sh
Executable file
65
conform/check-header-lists.sh
Executable file
@ -0,0 +1,65 @@
|
||||
#! /bin/sh
|
||||
# Check the set of headers with conformtest expectations for a given standard.
|
||||
# Copyright (C) 2014 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/>.
|
||||
|
||||
set -e
|
||||
|
||||
std=$1
|
||||
CC=$2
|
||||
expected_list=$3
|
||||
all_data_files=$4
|
||||
|
||||
new_list=
|
||||
|
||||
for f in $all_data_files; do
|
||||
h=${f#data/}
|
||||
h=${h%-data}
|
||||
exp=$($CC -D$std -x c -E $f | sed -e '/^#/d' -e '/^[ ]*$/d')
|
||||
if [ "$exp" ]; then
|
||||
new_list="$new_list $h"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Headers with expectations for $std: $new_list"
|
||||
echo "Expected list: $expected_list"
|
||||
|
||||
rc=0
|
||||
|
||||
for h in $expected_list; do
|
||||
case " $new_list " in
|
||||
(*" $h "*)
|
||||
;;
|
||||
(*)
|
||||
echo "Missing expectations for $h."
|
||||
rc=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for h in $new_list; do
|
||||
case " $expected_list " in
|
||||
(*" $h "*)
|
||||
;;
|
||||
(*)
|
||||
echo "Spurious expectations for $h."
|
||||
rc=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit $rc
|
@ -1,31 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
objpfx="$1"
|
||||
perl="$2"
|
||||
cc="$3"
|
||||
includes="$4"
|
||||
|
||||
scratch=${objpfx}scratch
|
||||
mkdir -p "$scratch"
|
||||
|
||||
standards=("ISO" "ISO99" "ISO11" "POSIX" "XPG3" "XPG4" "UNIX98"
|
||||
"XOPEN2K" "XOPEN2K8" "POSIX2008")
|
||||
|
||||
exitval=0
|
||||
> ${objpfx}run-conformtest.out
|
||||
for s in ${standards[*]}; do
|
||||
echo -n $s...
|
||||
e=0
|
||||
if ! $perl conformtest.pl --tmpdir="$scratch" --cc="$cc" --flags="$includes" --standard=$s > ${objpfx}conform-$s.out; then
|
||||
e=1
|
||||
fi
|
||||
printf "\n%s\n" $s >> ${objpfx}run-conformtest.out
|
||||
tail -n 4 ${objpfx}conform-$s.out >> ${objpfx}run-conformtest.out
|
||||
echo
|
||||
if [ $e -ne 0 ]; then
|
||||
tail -n 3 ${objpfx}conform-$s.out
|
||||
exitval=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $exitval
|
Loading…
Reference in New Issue
Block a user