Commit Graph

71 Commits

Author SHA1 Message Date
Joseph Myers
22b72f356d conformtest: Handle conditional XFAILs with allow-header.
This patch fixes the conformtest handling of headers listed in
allow-header to process xfail[cond]- in the expectations for those
headers.

Tested with build-many-glibcs.py.

	* conform/conformtest.pl: Handle xfail[cond]- in header mentioned
	with allow-header.
2017-03-18 00:16:05 +00:00
Joseph Myers
c33eac51f4 conformtest: Skip execution tests when cross-compiling.
This patch makes conformtest skip execution tests when
cross-compiling, as an interim step towards running most of these
tests (presently disabled) in that case.  It omits the (obvious)
Makefile change to actually enable the conformtest tests when
cross-compiling, as there are still enough failures seen with
build-many-glibcs.py that I'd like to get the results cleaner before
enabling these tests.

Tested for x86_64, and with the tests actually enabled for
cross-compilation with build-many-glibcs.py.

	* conform/conformtest.pl ($cross): New variable.
	(--cross): New command-line option.
	(runtest): Skip test execution when cross-compiling.
	* conform/Makefile (conformtest-cross): New variable.
	($(conformtest-header-tests)): Pass $(conformtest-cross) to
	conformtest.pl.
2017-03-17 01:21:10 +00:00
Joseph Myers
33c02810c5 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
Joseph Myers
0fbca26c39 conformtest: Make more tests into compilation tests.
The conformtest header tests test some things through compilation
tests and others through execution tests.  This patch makes more of
the tests into compilation tests, using _Static_assert (note: for
float.h tests on floating-point values this is depending on a GNU
extension, that those assertions are allowed in the absence of
-pedantic although they aren't strictly integer constant expressions).
The remaining execution tests are for values of things listed as
"symbol" (in fact no such things have a value expectation listed) and
for values of macros defined as string constants (three such values
listed in total).

This is intended as preparation for enabling the vast bulk of the
tests to run for cross compilation.  (Even the few remaining execution
tests ought in principle to run for cross compilation when a test
wrapper is defined, but that's more complicated.  The existing
execution tests for native builds in fact are linked and run with an
existing installed libc that's required to exist to link against,
rather than with the newly built libc; only the new headers are used.)

Tested for x86_64.

	* conform/conformtest.pl: Use compilation instead of execution
	tests for testing values of constants and usability in #if.
2017-03-16 17:51:23 +00:00
Marko Myllynen
48d0341cdd Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
Andreas Schwab
fddb87425a Fix spurious conform test failures 2015-07-27 16:13:55 +02:00
Joseph Myers
5675961d15 conformtest: Support xfail markers on individual assertions.
Various conformtest tests fail because of known issues, filed in
Bugzilla, that are hard to fix (requiring new features, kernel
cooperation or involving changing types in ways that may involve care
around padding when interfacing to the kernel).  Such an issue has the
effect of making the whole test for the (standard, header) pair fail,
so hiding any other issues with that header for that standard
(possibly regressions or architecture-specific issues).

This patch adds a mechanism for individual conformtest test
expectations to start with xfail-, meaning that a failure of that
particular assertion does not cause the whole test to fail at the
makefile level and so failure at the makefile level can be used to
detect other issues that are likely to be easier to fix.  This is
similar to the whitelisted symbols in the linknamespace tests, or the
marking of particular libm tests as allowing spurious or missing
exceptions, for example.  The bugs filed in Bugzilla should still be
fixed, and the xfail- markers removed at that point, but xfail-
renders the tests more useful until that happens.

Note that there is no way to add such a marker for the assertion that
a header uses only symbols in the namespace of symbols it's meant to
use.  I don't think there's any need for a way to xfail those
namespace tests other than xfailing the whole (standard, header) pair
at the makefile level, since they are generally straightforward to fix
(add appropriate conditionals on the problem definitions).

The xfails in this patch do not necessarily cover all cases of
hard-to-fix header bugs filed in Bugzilla that currently show up in
conformtest failures; there may be more yet to add for existing open
bugs.

Tested for x86_64 and x86.

	* conform/conformtest.pl ($xerrors): New variable.
	(note_error): New function.
	(compiletest): New argument $xfail.  Use not_error.
	(runtest): Likewise.
	(top level): Handle xfail- lines.  Update calls to compiletest and
	runtest.  Handle xfail- and optional- in headers listed with
	allow-header.
	* conform/data/fcntl.h-data (O_TTY_INIT): Use xfail-.
	(O_EXEC): Likewise.
	(O_SEARCH): Likewise.
	* conform/data/stropts.h-data (ioctl): Likewise.
	* conform/data/sys/ipc.h-data (ipc_perm.mode): Likewise.
	* conform/data/sys/sem.h-data (semid_ds.sem_nsems): Likewise.
	* conform/data/sys/socket.h-data (msghdr.msg_iovlen): Likewise.
	(msghdr.msg_controllen): Likewise.
	(cmsghdr.cmsg_len): Likewise.
	* conform/data/utmpx.h-data (utmpx.ut_tv): Likewise.
	* conform/Makefile (test-xfail-XPG3/sys/ipc.h/conform): Remove
	variable.
	(test-xfail-XPG3/sys/sem.h/conform): Likewise.
	(test-xfail-XPG4/stropts.h/conform): Likewise.
	(test-xfail-XPG4/sys/ipc.h/conform): Likewise.
	(test-xfail-XPG4/sys/sem.h/conform): Likewise.
	(test-xfail-XPG4/sys/socket.h/conform): Likewise.
	(test-xfail-UNIX98/stropts.h/conform): Likewise.
	(test-xfail-UNIX98/sys/ipc.h/conform): Likewise.
	(test-xfail-UNIX98/sys/sem.h/conform): Likewise.
	(test-xfail-UNIX98/sys/socket.h/conform): Likewise.
	(test-xfail-XOPEN2K/stropts.h/conform): Likewise.
	(test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise.
	(test-xfail-XOPEN2K/sys/sem.h/conform): Likewise.
	(test-xfail-XOPEN2K/sys/socket.h/conform): Likewise.
	(test-xfail-XOPEN2K/utmpx.h/conform): Likewise.
	(test-xfail-POSIX2008/fcntl.h/conform): Likewise.
	(test-xfail-POSIX2008/stropts.h/conform): Likewise.
	(test-xfail-XOPEN2K8/fcntl.h/conform): Likewise.
	(test-xfail-XOPEN2K8/stropts.h/conform): Likewise.
	(test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise.
	(test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise.
	(test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise.
2015-06-19 20:05:41 +00:00
Joseph Myers
24f4f8253f 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
Adhemerval Zanella
aebe100329 Add stardard definition on conform processing
This patch adds the -std=c99 option when preprocessing the data files
from the conform testcases. It fixes an issue where the compiler may
split the 'macro bool' defition from stdbool.h-data in two lines and
thus breaking the conform script.
2014-03-18 13:55:48 -05:00
Joseph Myers
a00f522af8 conformtest: clean up POSIX expectations for semaphore.h, signal.h, tar.h.
Continuing the series of patches to clean up conformtest expectations
for "POSIX" (1995/6) based on review of the expectations against the
standard, this patch cleans up those for semaphore.h, signal.h and
tar.h (including various corrections for other standards for the
expectations affected by this patch).  Tested x86_64.

(Some of the failures for signal.h shown up by this patch correcting
expectations for that header are among the reasons for posix/annexc
being expected to fail.  The goal is for conformtest eventually to
replace posix/annexc and stdlib/isomac once it has all relevant
functionality, and for the loop over standards and headers in
conformtest to convert to separate makefile targets for each
combination, so they can be run in parallel and so that xfails can be
more specific than the present xfailing of the whole of conformtest.)

	* conform/conformtest.pl: Allow ' and \ in values given for
	constants.
	* conform/data/semaphore.h-data [POSIX] (fcntl.h): Allow header
	inclusion.
	[POSIX] (sys/types.h): Likewise.
	[POSIX2008 || XOPEN2K8] (sys/types.h): Don't allow header
	inclusion.
	[POSIX || UNIX98 || XOPEN2K] (time.h): Don't allow header
	inclusion.
	* conform/data/signal.h-data (SIGIO): Remove expectation.
	[XPG3] (SIGBUS): Do not expect.
	[POSIX || XPG3] (SIGPOLL): Likewise.
	[POSIX || XPG3] (SIGPROF): Likewise.
	[POSIX || XPG3] (SIGSYS): Likewise.
	[XPG3] (SIGTRAP): Likewise.
	[POSIX || XPG3] (SIGURG): Likewise.
	[POSIX || XPG3] (SIGVTALRM): Likewise.
	[POSIX || XPG3] (SIGXCPU): Likewise.
	[POSIX || XPG3] (SIGXFSZ): Likewise.
	[POSIX] (SA_SIGINFO): Expect.
	[XPG3] (siginfo_t): Do not expect type or contents.
	[POSIX] (si_pid): Do not expect element.
	[POSIX] (si_uid): Likewise.
	[POSIX] (si_addr): Likewise.
	[POSIX] (si_status): Likewise.
	[POSIX] (si_band): Likewise.
	[XPG4] (si_value): Likewise.
	[POSIX || XPG3] (ILL_ILLOPC): Do not expect.
	[POSIX || XPG3] (ILL_ILLOPN): Likewise.
	[POSIX || XPG3] (ILL_ILLADR): Likewise.
	[POSIX || XPG3] (ILL_ILLTRP): Likewise.
	[POSIX || XPG3] (ILL_PRVOPC): Likewise.
	[POSIX || XPG3] (ILL_PRVREG): Likewise.
	[POSIX || XPG3] (ILL_COPROC): Likewise.
	[POSIX || XPG3] (ILL_BADSTK): Likewise.
	[POSIX || XPG3] (FPE_INTDIV): Likewise.
	[POSIX || XPG3] (FPE_INTOVF): Likewise.
	[POSIX || XPG3] (FPE_FLTDIV): Likewise.
	[POSIX || XPG3] (FPE_FLTOVF): Likewise.
	[POSIX || XPG3] (FPE_FLTUND): Likewise.
	[POSIX || XPG3] (FPE_FLTRES): Likewise.
	[POSIX || XPG3] (FPE_FLTINV): Likewise.
	[POSIX || XPG3] (FPE_FLTSUB): Likewise.
	[POSIX || XPG3] (SEGV_MAPERR): Likewise.
	[POSIX || XPG3] (SEGV_ACCERR): Likewise.
	[POSIX || XPG3] (BUS_ADRALN): Likewise.
	[POSIX || XPG3] (BUS_ADRERR): Likewise.
	[POSIX || XPG3] (BUS_OBJERR): Likewise.
	[POSIX || XPG3] (CLD_EXITED): Likewise.
	[POSIX || XPG3] (CLD_KILLED): Likewise.
	[POSIX || XPG3] (CLD_DUMPED): Likewise.
	[POSIX || XPG3] (CLD_TRAPPED): Likewise.
	[POSIX || XPG3] (CLD_STOPPED): Likewise.
	[POSIX || XPG3] (CLD_CONTINUED): Likewise.
	[POSIX || XPG3] (POLL_IN): Likewise.
	[POSIX || XPG3] (POLL_OUT): Likewise.
	[POSIX || XPG3] (POLL_MSG): Likewise.
	[POSIX || XPG3] (POLL_ERR): Likewise.
	[POSIX || XPG3] (POLL_PRI): Likewise.
	[POSIX || XPG3] (POLL_HUP): Likewise.
	[POSIX || XPG3 || POSIX2008] (TRAP_BRKPT): Likewise.
	[POSIX || XPG3 || POSIX2008] (TRAP_TRACE): Likewise.
	(SIG*): Do not allow.
	[XPG3] (si_*): Likewise.
	[XPG3] (SI_*): Likewise.
	[XPG3 || XPG4] (sigev_*): Likewise.
	[XPG3 || XPG4] (SIGEV_*): Likewise.
	[XPG3 || XPG4] (sival_*): Likewise.
	[POSIX || XPG3 || XPG4] (uc_*): Likewise.
	[POSIX || XPG3] (BUS_*): Likewise.
	[POSIX || XPG3] (CLD_*): Likewise.
	[POSIX || XPG3] (FPE_*): Likewise.
	[POSIX || XPG3] (ILL_*): Likewise.
	[POSIX || XPG3] (POLL_*): Likewise.
	[POSIX || XPG3] (SEGV_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (SS_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (SV_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (TRAP_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (ss_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (sv_*): Likewise.
	* conform/data/tar.h-data (TMAGLEN): Use macro-int-constant.
	Specify type and value.
	(TVERSLEN): Likewise.
	(REGTYPE): Likewise.
	(AREGTYPE): Likewise.
	(LNKTYPE): Likewise.
	(SYMTYPE): Likewise.
	(CHRTYPE): Likewise.
	(BLKTYPE): Likewise.
	(DIRTYPE): Likewise.
	(FIFOTYPE): Likewise.
	(CONTTYPE): Likewise.
	(TSUID): Likewise.
	(TSGID): Likewise.
	(TSVTX): Likewise.
	(TUREAD): Likewise.
	(TUWRITE): Likewise.
	(TUEXEC): Likewise.
	(TGREAD): Likewise.
	(TGWRITE): Likewise.
	(TGEXEC): Likewise.
	(TOREAD): Likewise.
	(TOWRITE): Likewise.
	(TOEXEC): Likewise.
	[POSIX] (TSVTX): Expect constant.
2014-03-07 03:21:04 +00:00
Joseph Myers
b92a20b560 conformtest: Fix namespace testing. 2013-09-04 20:47:21 +00:00
Joseph Myers
05bcf62afb conformtest: Clean up / correct / expand C99 and C11 expectations. 2012-11-07 19:36:48 +00:00
Joseph Myers
a68d0680f8 conformtest: Add test data for fenv.h. 2012-11-02 23:21:36 +00:00
Joseph Myers
c9140a622e conformtest: Check namespace within __attribute__. 2012-05-01 20:05:14 +00:00
Joseph Myers
9af0bf29de conformtest: Use correct keyword set for underlying C standard. 2012-05-01 20:04:44 +00:00
Joseph Myers
661f8cf03b conformtest: Support testing macro usability in #if. 2012-05-01 20:03:42 +00:00
Joseph Myers
ee74b9cbbd conformtest: Support specifying types before promotion. 2012-05-01 20:03:15 +00:00
Joseph Myers
aafc49b3fc conformtest: Unify "macro" and "constant" handling. 2012-05-01 20:02:48 +00:00
Joseph Myers
fefdf57412 conformtest: Unify "macro" cases. 2012-05-01 20:02:19 +00:00
Joseph Myers
f2d922feb2 conformtest: Unify "constant" and "typed-constant". 2012-05-01 20:01:48 +00:00
Joseph Myers
d22956c99b conformtest: Unify handling of "optional-" and non-optional lines. 2012-05-01 20:00:56 +00:00
Joseph Myers
028e2e3879 conformtest: Unify variants of "constant" and "optional-constant". 2012-05-01 20:00:24 +00:00
Joseph Myers
1b8f2850d8 conformtest: Always pass C standards options to compiler. 2012-05-01 19:59:47 +00:00
Joseph Myers
73c5ebe344 conformtest: Use correct feature test macros for XPG4. 2012-05-01 19:58:35 +00:00
Joseph Myers
39c33b6cbc conformtest: Handle "symbol" lines for allow-header. 2012-05-01 19:58:06 +00:00
Joseph Myers
0749ff8b81 conformtest: Remove duplicate typed-constant handling. 2012-04-28 01:42:06 -07:00
Joseph Myers
41d73a1bc0 conformtest: Fix typo in handling typed-constant from allow-header. 2012-04-28 01:27:20 -07:00
Thomas Schwinge
8149f97606 Don't tamper with $HOME. 2012-03-21 18:10:03 +01:00
Ulrich Drepper
d94a467080 Add first fixes for conformtest for POSIX2008 2012-02-26 21:32:56 -05:00
Ulrich Drepper
4efeffc1d5 Fix up POSIX testing in conformtest 2012-02-26 13:17:27 -05:00
Ulrich Drepper
3134156779 First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
Ulrich Drepper
505cf2c00a Fix up netdb.h for XPG7. 2010-01-12 16:43:00 -08:00
Ulrich Drepper
a9625ea95f Internal namespace test improvements. 2010-01-12 12:18:08 -08:00
Ulrich Drepper
cd2f000c07 Fix standalone stdio.h inclusion. 2010-01-10 00:39:22 -08:00
Ulrich Drepper
f095bb7204 Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7.  This
exposed a few bugs in the headers.  There are more changes to come.
2010-01-09 10:56:41 -08:00
Roland McGrath
d902256754 2001-08-22 Roland McGrath <roland@frob.com>
* conform/conformtest.pl (checknamespace): Sort the output list.
2001-08-23 04:34:36 +00:00
Ulrich Drepper
668770fc51 Update.
* conform/conformtest.pl: <inttypes.h> test required <stddef.h>.
2001-08-19 01:33:45 +00:00
Ulrich Drepper
9c777dfe83 Update.
2001-08-18  Ulrich Drepper  <drepper@redhat.com>

	* conform/conformtest.pl: Change namespace test to take #undef
	lines into account.

	* conform/data/netinet/in.h-data: Fix typo in allow-header line.

	* conform/data/sys/socket.h-data: Add sockatmark.
2001-08-18 11:55:52 +00:00
Ulrich Drepper
5d9167133c Update.
2001-02-01  Ulrich Drepper  <drepper@redhat.com>

	* Makerules (build-shlib): Add $(extra-B-$(@F:lib%.so=%).so).
	* configure.in: Test for -z initfirst linker option.
	* config.make.in: Add have-z-initfirst.
	* elf/dl-init.c (_dl_init): Split out actual initialization code in
	new function call_init.  If _dl_initfirst is non-NULL initialize first.
	* elf/dl-load.c (_dl_map_from_fd): If DF_1_INITFIRST flag is set
	remember object in _dl_initfirst.
	* elf/soinit.c: Remove special support for calling
	__pthread_initialize_minimal.

	* conform/conformtest.pl: Add missing $prepend in type test.

	* elf/elf.h (SHT_CHECKSUM): New definition.

	* posix/tst-fnmatch.input: Add tests for [. .] in locales.
2001-02-02 06:19:24 +00:00
Ulrich Drepper
140ec5106e Update.
* conform/conformtest.pl: Add -fno-builtin to CFLAGS.
2001-01-28 23:11:23 +00:00
Ulrich Drepper
3bf3d361fa Update.
* conform/conformtest.pl: Undo last change.  Define
	$mustprepend{"stdio.h"}.
	* libio/stdio.h: Define va_list correctly.
2001-01-28 09:37:21 +00:00
Ulrich Drepper
f9b9f291b7 Update.
* conform/conformtest.pl: Define $mustprepend{"stdio.h"}.
	* libio/stdio.h: Always define __need___va_list.
2001-01-28 09:13:22 +00:00
Ulrich Drepper
73b6bffcfb Update.
* conform/data/time.h-data: CLK_TCK is not in XPG6.  Fix tzname entry.
	* sysdeps/mach/hurd/bits/time.h: Don't define CLK_TCK for XPG6.
	* sysdeps/mach/hurd/i386/bits/time.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/time.h: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/time.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/bits/time.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/time.h: Likewise.
	* time/time.h: Likewise.

	* conform/conformtest.pl (@headers): Add complex.h and tgmath.h.
	* conform/data/complex.h-data: New file.
	* conform/data/tgmath.h-data: New file.

	* conform/data/wchar.h-data: Add missing functions.

	* sysdeps/gnu/bits/utmpx.h: Define RUN_LVL only if __USE_GNU.

	* conform/data/termios.h-data: Add missing const in tcsetattr()
	prototype.

	* posix/sys/wait.h: Include <signal.h> and <sys/resource.h>.
	Don't define pid_t here.

	* conform/data/sys/utsname.h-data: Don't provide fixed array sizes.
2001-01-28 05:38:29 +00:00
Ulrich Drepper
257abbe2e3 Update.
* conform/data/sys/shm.h-data: SHMLBA is not required to by a constant.
	* conform/conformtest.pl: Implement handling of symbol.
2001-01-27 19:45:21 +00:00
Ulrich Drepper
2ff458ebe6 Update.
2001-01-27  Ulrich Drepper  <drepper@redhat.com>

	* signal/signal.h: Fix handling of __need_* symbols.
	* misc/sys/select.c: Define fd_set here.  Remove __fd_set.  Define
	fd_mask only if __USE_MISC.  Declare pselect for __USE_XOPEN2K.
	* include/sys/select.h: Use fd_set not __fd_set.
	* sysdeps/generic/bits/select.h: Likewise.
	* sysdeps/i386/bits/select.h: Likewise.
	* sysdeps/generic/bits/types.h: Don't define __fd_mask, __NFDBITS,
	__FDELT, __FDMASK, and __fd_set here.
	* sysdeps/unix/sysv/aix/bits/types.h: Likewise.
	* sysdeps/unix/sysv/hpux/bits/types.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/types.h: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/types.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/types.h: Likewise.
	* sysdeps/unix/sysv/sysv4/solaris2/bits/types.h: Likewise.
	* time/sys/time.h: Define struct timeval before including <time.h>
	and <sys/select.h>.

	* conform/data/sys/time.h-data: fd_set is a typedef.
	* conform/data/sys/select.h-data: New file.
	* conform/data/sys/mman.h-data: Make typed mem stuff optional.
	* conform/conformtest.pl (@headers): Add sys/select.h.
	(type, optional-type): Unless testing a typedef instantiate object.
	Implement optional-function.

	* math/test-misc.c: Include <float.h>.
2001-01-27 19:28:32 +00:00
Ulrich Drepper
5a9339d5bb Update.
* conform/conformtest.pl: Define $mustprepend{"signal.h"}.
	* conform/data/signal.h-data: Fix sigev_notify_function entry.
	Fix typo (SIGVALRM -> SIGVTALRM).
	* sysdeps/unix/sysv/linux/bits/siginfo.h: Define sigev_notify_attr
	with real type.
	* sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise.
2001-01-27 06:30:48 +00:00
Ulrich Drepper
da23829807 Update.
* conform/conformtest.pl: Implement optional-element.  Define
	$mustprepend{"sched.h"}.

	* conform/data/sched.h-data: Make sporadic scheduler definitions
	optional.

	* pwd/pwd.h: Don't define getpwent_r for XPG.
2001-01-27 05:30:29 +00:00
Ulrich Drepper
ccd4b479dc Update.
* conform/conformtest.pl: Implement optional-type.

	* resolv/netdb.h: Include <netinet/in.h> not <sys/socket.h>.  Include
	<rpc/netdb.h> only if __USE_MISC.  Include <stdint.h> instead of
	defining uint32_t here.  Define IPPORT_RESERVED.
	(struct hostent): Type of h_length element is int.
	(getnameinfo): Type of flags parameter is unsigned int.
	* inet/getnameinfo.c (getnameinfo): flags argument is unsigned.
	* conform/data/netdb.h-data: Add many missing definitions.
2001-01-27 02:27:46 +00:00
Ulrich Drepper
12b64309cf Update.
* conform/conformtest.pl: Implement optional-macro.
	* conform/data/math.h-data: Update for XPG6.

	* math/math.h (HUGE): Define as FLT_MAX value but don't use
	FLT_MAX.  Don't include <float.h>.
	(MAXFLOAT): Likewise.

	* math/math.h: Define MATH_ERRNO and MATH_ERREXCEPT.
2001-01-27 00:15:16 +00:00
Ulrich Drepper
7cc9fcf4fd Update.
* conform/conformtest.pl: Fix handling of macro-str.
2001-01-26 08:46:20 +00:00