mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-25 20:21:07 +00:00
c3ec097256
Continuing the consolidation on Python for various miscellaneous build and test scripts, this patch moves conformtest from Perl to Python. The substance of the tests run is intended to be the same as before, except that the previous test for tags did not actually achieve the intended purpose of verifying whether a tag was already declared, so is changed to one that would actually fail for a tag that wasn't declared, and a typo in the old test for variables being available ($xyzzy instead of xyzzy) would have made that test not use the correct type (but it would have passed anyway with warnings). No attempt is made to keep the details of what the test output looks like; instead, tests are given names which are made to follow PASS: / FAIL: / XFAIL: / SKIP: / MISSING: as appropriate. In the new version, there is more consistent parsing of test lines (into a series of words, either surrounded by {} or separated by spaces) that applies for all kinds of test lines, rather than the old approach of different regular expressions for every kind of test. A few of the conform/data/ files are adjusted so their syntax works with the new script (which now requires spaces in certain cases where the old script tolerated them being missing, and does not allow stray semicolons at the end of "function" lines). Similarly, common logic is used around what happens with a second subtest if a first one fails (e.g., a test for a symbol's type if the test for availability fails), rather than such logic being replicated separately for each kind of test. Common parsing also applies for test lines both when they are lines for the header under test and when they are lines for another header specified with allow-header, again unlike the old script. Tested for x86_64, and with build-many-glibcs.py. * conform/conformtest.py: New file. * conform/conformtest.pl: Remove. * conform/GlibcConform.pm: Likewise. * conform/glibcconform.py (KEYWORDS_C90): New constant. (KEYWORDS_C99): Likewise. (KEYWORDS): Likewise. * conform/Makefile ($(conformtest-header-tests)): Use conformtest.py instead of conformtest.pl. Do not pass --tmpdir option. Use --header instead of --headers. * conform/data/arpa/inet.h-data: Remove trailing semicolons on function entries. * conform/data/spawn.h-data: Likewise. * conform/data/fcntl.h-data (openat): Add space after function name. * conform/data/wchar.h-data (wcscasecmp): Likewise. (wcscasecmp_l): Likewise. * conform/data/termios.h-data (c_cc): Add space after element name.
136 lines
2.6 KiB
Plaintext
136 lines
2.6 KiB
Plaintext
#if !defined ISO && !defined ISO99 && !defined ISO11
|
|
constant F_DUPFD
|
|
constant F_GETFD
|
|
constant F_SETFD
|
|
constant F_GETFL
|
|
constant F_SETFL
|
|
constant F_GETLK
|
|
constant F_SETLK
|
|
constant F_SETLKW
|
|
#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
|
|
constant F_GETOWN
|
|
constant F_SETOWN
|
|
#endif
|
|
|
|
constant FD_CLOEXEC
|
|
|
|
constant F_RDLCK
|
|
constant F_UNLCK
|
|
constant F_WRLCK
|
|
|
|
#if defined POSIX
|
|
allow SEEK_SET
|
|
allow SEEK_CUR
|
|
allow SEEK_END
|
|
#else
|
|
constant SEEK_SET
|
|
constant SEEK_CUR
|
|
constant SEEK_END
|
|
#endif
|
|
|
|
constant O_CREAT
|
|
constant O_EXCL
|
|
constant O_NOCTTY
|
|
constant O_TRUNC
|
|
|
|
constant O_APPEND
|
|
constant O_NONBLOCK
|
|
constant O_SYNC
|
|
#if !defined XPG4 && !defined XPG42
|
|
constant O_DSYNC
|
|
constant O_RSYNC
|
|
#endif
|
|
|
|
constant O_ACCMODE
|
|
|
|
constant O_RDONLY
|
|
constant O_RDWR
|
|
constant O_WRONLY
|
|
|
|
#if !defined POSIX
|
|
constant S_IRWXU
|
|
constant S_IRUSR
|
|
constant S_IWUSR
|
|
constant S_IXUSR
|
|
constant S_IRWXG
|
|
constant S_IRGRP
|
|
constant S_IWGRP
|
|
constant S_IXGRP
|
|
constant S_IRWXO
|
|
constant S_IROTH
|
|
constant S_IWOTH
|
|
constant S_IXOTH
|
|
constant S_ISUID
|
|
constant S_ISGID
|
|
#if !defined POSIX2008
|
|
constant S_ISVTX
|
|
#endif
|
|
#endif
|
|
|
|
#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
|
|
constant POSIX_FADV_NORMAL
|
|
constant POSIX_FADV_SEQUENTIAL
|
|
constant POSIX_FADV_RANDOM
|
|
constant POSIX_FADV_WILLNEED
|
|
constant POSIX_FADV_DONTNEED
|
|
constant POSIX_FADV_NOREUSE
|
|
#endif
|
|
|
|
type {struct flock}
|
|
|
|
// Bug 23081: l_type and l_whence members of flock structure have type int instead of short
|
|
xfail[i386-gnu]-element {struct flock} short l_type
|
|
xfail[i386-gnu]-element {struct flock} short l_whence
|
|
element {struct flock} off_t l_start
|
|
element {struct flock} off_t l_len
|
|
element {struct flock} pid_t l_pid
|
|
|
|
#if !defined POSIX
|
|
# if !defined UNIX98
|
|
type mode_t
|
|
# endif
|
|
type off_t
|
|
type pid_t
|
|
#endif
|
|
|
|
function int creat (const char*, mode_t)
|
|
function int fcntl (int, int, ...)
|
|
function int open (const char*, int, ...)
|
|
#if defined XOPEN2K8 || defined POSIX2008
|
|
function int openat (int, const char*, int, ...)
|
|
#endif
|
|
#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
|
|
function int posix_fadvise (int, off_t, off_t, int)
|
|
function int posix_fallocate (int, off_t, off_t)
|
|
#endif
|
|
|
|
#if defined XOPEN2K8 || defined POSIX2008
|
|
// Bug 18228: O_TTY_INIT, O_EXEC, O_SEARCH missing.
|
|
xfail-constant O_TTY_INIT
|
|
constant O_CLOEXEC
|
|
xfail-constant O_EXEC
|
|
xfail-constant O_SEARCH
|
|
constant O_DIRECTORY
|
|
constant O_NOFOLLOW
|
|
constant F_DUPFD_CLOEXEC
|
|
constant AT_FDCWD
|
|
constant AT_EACCESS
|
|
constant AT_SYMLINK_NOFOLLOW
|
|
constant AT_SYMLINK_FOLLOW
|
|
constant AT_REMOVEDIR
|
|
|
|
function int openat (int, const char*, int, ...)
|
|
#endif
|
|
|
|
#if !defined POSIX
|
|
allow-header sys/stat.h
|
|
allow-header unistd.h
|
|
#endif
|
|
|
|
allow l_*
|
|
allow F_*
|
|
allow O_*
|
|
allow S_*
|
|
allow *_t
|
|
#endif
|