2024-01-01 18:12:26 +00:00
|
|
|
# Copyright (C) 1991-2024 Free Software Foundation, Inc.
|
1995-02-18 01:27:10 +00:00
|
|
|
# This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
# 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.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
# 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
|
2001-07-06 04:58:11 +00:00
|
|
|
# Lesser General Public License for more details.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
# License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
# <https://www.gnu.org/licenses/>.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Sub-makefile for misc portion of the library.
|
|
|
|
#
|
|
|
|
|
|
|
|
subdir := misc
|
|
|
|
|
2014-02-26 23:12:03 +00:00
|
|
|
include ../Makeconfig
|
|
|
|
|
2023-05-11 11:04:11 +00:00
|
|
|
headers := \
|
|
|
|
sys/uio.h \
|
|
|
|
bits/uio-ext.h \
|
|
|
|
bits/uio_lim.h \
|
|
|
|
sys/ioctl.h \
|
|
|
|
bits/ioctls.h \
|
|
|
|
bits/ioctl-types.h \
|
|
|
|
sys/ptrace.h \
|
|
|
|
sys/file.h \
|
|
|
|
sys/dir.h \
|
|
|
|
sys/cdefs.h \
|
|
|
|
ar.h \
|
|
|
|
a.out.h \
|
|
|
|
libgen.h \
|
|
|
|
stab.h \
|
|
|
|
bits/stab.def \
|
|
|
|
sgtty.h \
|
|
|
|
ttyent.h \
|
|
|
|
paths.h \
|
|
|
|
sys/reboot.h \
|
|
|
|
sys/mman.h \
|
|
|
|
sys/param.h \
|
|
|
|
bits/param.h \
|
|
|
|
fstab.h \
|
|
|
|
mntent.h \
|
|
|
|
search.h \
|
|
|
|
err.h \
|
|
|
|
error.h \
|
|
|
|
sys/queue.h \
|
|
|
|
sysexits.h \
|
|
|
|
syscall.h \
|
|
|
|
sys/syscall.h \
|
|
|
|
sys/swap.h \
|
|
|
|
sys/select.h \
|
|
|
|
sys/sysinfo.h \
|
|
|
|
regexp.h \
|
|
|
|
bits/select.h \
|
|
|
|
bits/mman.h \
|
|
|
|
sys/xattr.h \
|
|
|
|
syslog.h \
|
|
|
|
sys/syslog.h \
|
2023-04-26 09:59:08 +00:00
|
|
|
bits/syslog-decl.h \
|
2023-05-11 11:04:11 +00:00
|
|
|
bits/syslog.h \
|
|
|
|
bits/syslog-ldbl.h \
|
|
|
|
bits/syslog-path.h \
|
|
|
|
bits/error.h \
|
2023-04-26 09:48:56 +00:00
|
|
|
bits/select-decl.h \
|
2023-05-11 11:04:11 +00:00
|
|
|
bits/select2.h \
|
|
|
|
bits/hwcap.h \
|
|
|
|
sys/auxv.h \
|
|
|
|
sys/sysmacros.h \
|
|
|
|
bits/sysmacros.h \
|
|
|
|
bits/types/struct_iovec.h \
|
|
|
|
bits/err-ldbl.h \
|
|
|
|
bits/error-ldbl.h \
|
|
|
|
sys/single_threaded.h \
|
|
|
|
# headers
|
|
|
|
|
|
|
|
routines := \
|
|
|
|
acct \
|
|
|
|
allocate_once \
|
|
|
|
atomic_wide_counter \
|
|
|
|
brk \
|
|
|
|
chflags \
|
|
|
|
chroot \
|
|
|
|
daemon \
|
|
|
|
dirname \
|
|
|
|
efgcvt \
|
|
|
|
efgcvt_r \
|
|
|
|
err \
|
|
|
|
error \
|
|
|
|
fchflags \
|
|
|
|
fd_to_filename \
|
|
|
|
fdatasync \
|
|
|
|
fgetxattr \
|
|
|
|
flistxattr \
|
|
|
|
fremovexattr \
|
|
|
|
fsetxattr \
|
|
|
|
fstab \
|
|
|
|
fsync \
|
|
|
|
ftruncate \
|
|
|
|
ftruncate64 \
|
|
|
|
futimes \
|
|
|
|
futimesat \
|
|
|
|
getauxval \
|
|
|
|
getclktck \
|
|
|
|
getdomain \
|
|
|
|
getdtsz \
|
|
|
|
gethostid \
|
|
|
|
gethostname \
|
|
|
|
getloadavg \
|
|
|
|
getpagesize \
|
|
|
|
getpass \
|
|
|
|
getsysstats \
|
|
|
|
getttyent \
|
|
|
|
getusershell \
|
|
|
|
getxattr \
|
|
|
|
gtty \
|
|
|
|
hsearch \
|
|
|
|
hsearch_r \
|
|
|
|
ifunc-impl-list \
|
|
|
|
insremque \
|
|
|
|
ioctl \
|
|
|
|
lgetxattr \
|
|
|
|
listxattr \
|
|
|
|
llistxattr \
|
|
|
|
lremovexattr \
|
|
|
|
lsearch \
|
|
|
|
lsetxattr \
|
|
|
|
lutimes \
|
|
|
|
madvise \
|
|
|
|
makedev \
|
|
|
|
mincore \
|
|
|
|
mkdtemp \
|
|
|
|
mkostemp \
|
|
|
|
mkostemp64 \
|
|
|
|
mkostemps \
|
|
|
|
mkostemps64 \
|
|
|
|
mkstemp \
|
|
|
|
mkstemp64 \
|
|
|
|
mkstemps \
|
|
|
|
mkstemps64 \
|
|
|
|
mktemp \
|
|
|
|
mlock \
|
|
|
|
mlockall \
|
|
|
|
mmap \
|
|
|
|
mmap64 \
|
|
|
|
mntent \
|
|
|
|
mntent_r \
|
|
|
|
mprotect \
|
|
|
|
msync \
|
|
|
|
munlock \
|
|
|
|
munlockall \
|
|
|
|
munmap \
|
|
|
|
preadv \
|
|
|
|
preadv2 \
|
2023-05-17 13:34:24 +00:00
|
|
|
preadv64 \
|
2023-05-11 11:04:11 +00:00
|
|
|
preadv64v2 \
|
|
|
|
pselect \
|
|
|
|
ptrace \
|
|
|
|
pwritev \
|
|
|
|
pwritev2 \
|
2023-05-17 13:34:24 +00:00
|
|
|
pwritev64 \
|
2023-05-11 11:04:11 +00:00
|
|
|
pwritev64v2 \
|
|
|
|
qefgcvt \
|
|
|
|
qefgcvt_r \
|
|
|
|
readv \
|
|
|
|
reboot \
|
|
|
|
regexp \
|
|
|
|
remap_file_pages \
|
|
|
|
removexattr \
|
|
|
|
revoke \
|
|
|
|
sbrk \
|
|
|
|
select \
|
|
|
|
setdomain \
|
|
|
|
setegid \
|
|
|
|
seteuid \
|
|
|
|
sethostid \
|
|
|
|
sethostname \
|
|
|
|
setregid \
|
|
|
|
setreuid \
|
|
|
|
setxattr \
|
|
|
|
single_threaded \
|
|
|
|
sstk \
|
|
|
|
stty \
|
|
|
|
swapoff \
|
|
|
|
swapon \
|
|
|
|
sync \
|
|
|
|
syncfs \
|
|
|
|
syscall \
|
|
|
|
syslog \
|
|
|
|
truncate \
|
|
|
|
truncate64 \
|
|
|
|
tsearch \
|
|
|
|
ttyslot \
|
|
|
|
ualarm \
|
|
|
|
unwind-link \
|
|
|
|
usleep \
|
|
|
|
ustat \
|
|
|
|
utimes \
|
|
|
|
vhangup \
|
|
|
|
writev \
|
|
|
|
# routines
|
2023-03-17 09:17:28 +00:00
|
|
|
|
|
|
|
# Exclude fortified routines from being built with _FORTIFY_SOURCE
|
|
|
|
routines_no_fortify += \
|
|
|
|
getdomain \
|
|
|
|
gethostname \
|
|
|
|
syslog \
|
|
|
|
# routines_no_fortify
|
2023-05-11 11:04:11 +00:00
|
|
|
|
|
|
|
generated += \
|
|
|
|
tst-allocate_once-mem.out \
|
|
|
|
tst-allocate_once.mtrace \
|
|
|
|
tst-error1-mem.out \
|
|
|
|
tst-error1.mtrace \
|
|
|
|
# generated
|
2005-07-19 23:46:55 +00:00
|
|
|
|
1996-01-21 10:01:05 +00:00
|
|
|
aux := init-misc
|
2013-12-17 18:11:48 +00:00
|
|
|
install-lib := libg.a
|
1995-02-18 01:27:10 +00:00
|
|
|
|
2023-05-11 11:04:11 +00:00
|
|
|
gpl2lgpl := \
|
|
|
|
error.c \
|
|
|
|
error.h \
|
|
|
|
# gpl2lgpl
|
|
|
|
|
|
|
|
tests := \
|
|
|
|
bug-hsearch1 \
|
|
|
|
bug18240 \
|
|
|
|
tst-dbl-efgcvt \
|
|
|
|
tst-dirname \
|
|
|
|
tst-empty \
|
|
|
|
tst-error1 \
|
|
|
|
tst-fdset \
|
|
|
|
tst-hsearch \
|
|
|
|
tst-insremque \
|
|
|
|
tst-ioctl \
|
|
|
|
tst-ldbl-efgcvt \
|
|
|
|
tst-ldbl-error \
|
|
|
|
tst-ldbl-errorfptr \
|
|
|
|
tst-ldbl-warn \
|
|
|
|
tst-makedev \
|
|
|
|
tst-mntent \
|
|
|
|
tst-mntent-autofs \
|
|
|
|
tst-mntent-blank-corrupt \
|
|
|
|
tst-mntent-blank-passno \
|
|
|
|
tst-mntent-escape \
|
|
|
|
tst-mntent2 \
|
|
|
|
tst-preadvwritev \
|
|
|
|
tst-preadvwritev2 \
|
2023-05-17 13:34:24 +00:00
|
|
|
tst-preadvwritev64 \
|
2023-05-11 11:04:11 +00:00
|
|
|
tst-preadvwritev64v2 \
|
|
|
|
tst-pselect \
|
|
|
|
tst-select \
|
|
|
|
tst-syscalls \
|
|
|
|
tst-tsearch \
|
|
|
|
tst-warn-wide \
|
|
|
|
# tests
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
|
y2038: Add test coverage
It is enabled through a new rule, tests-y2038, which is built only
when the ABI supports the comapt 64-bit time_t (defined by the
header time64-compat.h, which also enables the creation of the
symbol Version for Linux). It means the tests are not built
for ABI which already provide default 64-bit time_t.
The new rule already adds the required LFS and 64-bit time_t
compiler flags.
The current coverage is:
* libc:
- adjtime tst-adjtime-time64
- adjtimex tst-adjtimex-time64
- clock_adjtime tst-clock_adjtime-time64
- clock_getres tst-clock-time64, tst-cpuclock1-time64
- clock_gettime tst-clock-time64, tst-clock2-time64,
tst-cpuclock1-time64
- clock_nanosleep tst-clock_nanosleep-time64,
tst-cpuclock1-time64
- clock_settime tst-clock2-time64
- cnd_timedwait tst-cnd-timedwait-time64
- ctime tst-ctime-time64
- ctime_r tst-ctime-time64
- difftime tst-difftime-time64
- fstat tst-stat-time64
- fstatat tst-stat-time64
- futimens tst-futimens-time64
- futimes tst-futimes-time64
- futimesat tst-futimesat-time64
- fts_* tst-fts-time64
- getitimer tst-itimer-timer64
- getrusage
- gettimeofday tst-clock_nanosleep-time64
- glob / globfree tst-gnuglob64-time64
- gmtime tst-gmtime-time64
- gmtime_r tst-gmtime-time64
- lstat tst-stat-time64
- localtime tst-y2039-time64
- localtime_t tst-y2039-time64
- lutimes tst-lutimes-time64
- mktime tst-mktime4-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- msgctl test-sysvmsg-time64
- mtx_timedlock tst-mtx-timedlock-time64
- nanosleep tst-cpuclock{12}-time64,
tst-mqueue8-time64, tst-clock-time64
- nftw / ftw ftwtest-time64
- ntp_adjtime tst-ntp_adjtime-time64
- ntp_gettime tst-ntp_gettime-time64
- ntp_gettimex tst-ntp_gettimex-time64
- ppoll tst-ppoll-time64
- pselect tst-pselect-time64
- pthread_clockjoin_np tst-join14-time64
- pthread_cond_clockwait tst-cond11-time64
- pthread_cond_timedwait tst-abstime-time64
- pthread_mutex_clocklock tst-abstime-time64
- pthread_mutex_timedlock tst-abstime-time64
- pthread_rwlock_clockrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_clockwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_timedjoin_np tst-join14-time64
- recvmmsg tst-cancel4_2-time64
- sched_rr_get_interval tst-sched_rr_get_interval-time64
- select tst-select-time64
- sem_clockwait tst-sem5-time64
- sem_timedwait tst-sem5-time64
- semctl test-sysvsem-time64
- semtimedop test-sysvsem-time64
- setitimer tst-mqueue2-time64, tst-itimer-timer64
- settimeofday tst-settimeofday-time64
- shmctl test-sysvshm-time64
- sigtimedwait tst-sigtimedwait-time64
- stat tst-stat-time64
- thrd_sleep tst-thrd-sleep-time64
- time tst-mqueue{1248}-time64
- timegm tst-timegm-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
- timerfd_gettime tst-timerfd-time64
- timerfd_settime tst-timerfd-time64
- timespec_get tst-timespec_get-time64
- timespec_getres tst-timespec_getres-time64
- utime tst-utime-time64
- utimensat tst-utimensat-time64
- utimes tst-utimes-time64
- wait3 tst-wait3-time64
- wait4 tst-wait4-time64
* librt:
- aio_suspend tst-aio6-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
* libanl:
- gai_suspend
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-02-17 18:59:34 +00:00
|
|
|
tests-time64 := \
|
2021-07-21 09:42:31 +00:00
|
|
|
tst-ioctl-time64 \
|
2023-05-11 11:04:11 +00:00
|
|
|
tst-pselect-time64 \
|
|
|
|
tst-select-time64 \
|
2021-07-21 09:42:31 +00:00
|
|
|
# tests-time64
|
y2038: Add test coverage
It is enabled through a new rule, tests-y2038, which is built only
when the ABI supports the comapt 64-bit time_t (defined by the
header time64-compat.h, which also enables the creation of the
symbol Version for Linux). It means the tests are not built
for ABI which already provide default 64-bit time_t.
The new rule already adds the required LFS and 64-bit time_t
compiler flags.
The current coverage is:
* libc:
- adjtime tst-adjtime-time64
- adjtimex tst-adjtimex-time64
- clock_adjtime tst-clock_adjtime-time64
- clock_getres tst-clock-time64, tst-cpuclock1-time64
- clock_gettime tst-clock-time64, tst-clock2-time64,
tst-cpuclock1-time64
- clock_nanosleep tst-clock_nanosleep-time64,
tst-cpuclock1-time64
- clock_settime tst-clock2-time64
- cnd_timedwait tst-cnd-timedwait-time64
- ctime tst-ctime-time64
- ctime_r tst-ctime-time64
- difftime tst-difftime-time64
- fstat tst-stat-time64
- fstatat tst-stat-time64
- futimens tst-futimens-time64
- futimes tst-futimes-time64
- futimesat tst-futimesat-time64
- fts_* tst-fts-time64
- getitimer tst-itimer-timer64
- getrusage
- gettimeofday tst-clock_nanosleep-time64
- glob / globfree tst-gnuglob64-time64
- gmtime tst-gmtime-time64
- gmtime_r tst-gmtime-time64
- lstat tst-stat-time64
- localtime tst-y2039-time64
- localtime_t tst-y2039-time64
- lutimes tst-lutimes-time64
- mktime tst-mktime4-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- msgctl test-sysvmsg-time64
- mtx_timedlock tst-mtx-timedlock-time64
- nanosleep tst-cpuclock{12}-time64,
tst-mqueue8-time64, tst-clock-time64
- nftw / ftw ftwtest-time64
- ntp_adjtime tst-ntp_adjtime-time64
- ntp_gettime tst-ntp_gettime-time64
- ntp_gettimex tst-ntp_gettimex-time64
- ppoll tst-ppoll-time64
- pselect tst-pselect-time64
- pthread_clockjoin_np tst-join14-time64
- pthread_cond_clockwait tst-cond11-time64
- pthread_cond_timedwait tst-abstime-time64
- pthread_mutex_clocklock tst-abstime-time64
- pthread_mutex_timedlock tst-abstime-time64
- pthread_rwlock_clockrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_clockwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_timedjoin_np tst-join14-time64
- recvmmsg tst-cancel4_2-time64
- sched_rr_get_interval tst-sched_rr_get_interval-time64
- select tst-select-time64
- sem_clockwait tst-sem5-time64
- sem_timedwait tst-sem5-time64
- semctl test-sysvsem-time64
- semtimedop test-sysvsem-time64
- setitimer tst-mqueue2-time64, tst-itimer-timer64
- settimeofday tst-settimeofday-time64
- shmctl test-sysvshm-time64
- sigtimedwait tst-sigtimedwait-time64
- stat tst-stat-time64
- thrd_sleep tst-thrd-sleep-time64
- time tst-mqueue{1248}-time64
- timegm tst-timegm-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
- timerfd_gettime tst-timerfd-time64
- timerfd_settime tst-timerfd-time64
- timespec_get tst-timespec_get-time64
- timespec_getres tst-timespec_getres-time64
- utime tst-utime-time64
- utimensat tst-utimensat-time64
- utimes tst-utimes-time64
- wait3 tst-wait3-time64
- wait4 tst-wait4-time64
* librt:
- aio_suspend tst-aio6-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
* libanl:
- gai_suspend
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-02-17 18:59:34 +00:00
|
|
|
|
2018-09-20 10:03:01 +00:00
|
|
|
# Tests which need libdl.
|
|
|
|
ifeq (yes,$(build-shared))
|
|
|
|
tests += tst-gethostid
|
|
|
|
endif
|
|
|
|
|
2023-05-11 11:04:11 +00:00
|
|
|
tests-internal := \
|
|
|
|
tst-allocate_once \
|
|
|
|
tst-atomic \
|
|
|
|
tst-atomic-long \
|
|
|
|
# tests-internal
|
2016-12-21 10:52:19 +00:00
|
|
|
tests-static := tst-empty
|
|
|
|
|
2020-02-18 12:02:37 +00:00
|
|
|
# Test for the internal, non-exported __fd_to_filename function.
|
|
|
|
tests-internal += tst-fd_to_filename
|
|
|
|
tests-static += tst-fd_to_filename
|
|
|
|
|
2012-10-24 00:08:46 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
2018-05-23 12:16:18 +00:00
|
|
|
tests-special += $(objpfx)tst-error1-mem.out \
|
|
|
|
$(objpfx)tst-allocate_once-mem.out
|
2005-07-19 23:46:55 +00:00
|
|
|
endif
|
Mon Mar 27 02:23:15 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/unistd.h [__USE_BSD] (ttyslot): Declare it.
* posix/unistd.h [__USE_BSD] (L_SET, L_INCR, L_XTND): Define
unless L_SET already defined.
* misc/sys/file.h (L_SET, L_INCR, L_XTND): Don't define if L_SET
already defined.
Incorporated -lutil library from 4.4-Lite.
* misc/Makefile (extra-libs, libutil-routines): New variables.
* misc/login.c, misc/login_tty.c, misc/logout.c, misc/logwtmp.c,
sysdeps/generic/pty.c: New files for -lutil incorporated from 4.4-Lite.
Support simple, light-weight unwind-protect mechanism for longjmp.
* setjmp/longjmp.c: Call _longjmp_unwind first thing.
* sysdeps/mach/hurd/jmp-unwind.c: New file.
* sysdeps/stub/jmp-unwind.c: New file.
* sysdeps/i386/jmp_buf.h (_JMPBUF_UNWINDS): New macro.
* sysdeps/mips/jmp_buf.h (_JMPBUF_UNWINDS): New macro.
* setjmp/Makefile (routines): Add jmp-unwind.
* hurd/hurd/userlink.h (struct hurd_userlink): Move `next' and
`prevp' members into new substructure `resource'; add another such
substructure `thread' and members `cleanup' (function ptr) and
`cleanup_data' (generic ptr).
(_hurd_userlink_link, _hurd_userlink_unlink): Insert/remove LINK
into the `_hurd_self_sigstate ()->active_resources' list via the
`thread' substructure.
* hurd/hurd/port.h (_hurd_port_cleanup): Declare it.
(_hurd_port_locked_get): Set LINK->cleanup to _hurd_port_cleanup and
LINK->cleanup_data' to the port extracted.
* hurd/hurd/signal.h (struct hurd_sigstate): New member
`active_resources'.
* hurd/port-cleanup.c: New file.
* hurd/Makefile (routines): Add port-cleanup.
* malloc/malloc.c: Include errno.h.
Sat Mar 25 18:24:21 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/loadlocale.c (_nl_load_locale): Avoid */ inside comment.
1995-03-27 10:00:09 +00:00
|
|
|
|
2021-04-09 11:34:22 +00:00
|
|
|
tests-container := tst-syslog
|
|
|
|
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-select.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-tsearch.c += $(uses-callbacks)
|
|
|
|
CFLAGS-lsearch.c += $(uses-callbacks)
|
|
|
|
CFLAGS-pselect.c += -fexceptions
|
|
|
|
CFLAGS-readv.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-writev.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-preadv.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-preadv64.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-pwritev.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-pwritev64.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-preadv2.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-preadv64v2.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-pwritev2.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-pwritev64v2.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-usleep.c += -fexceptions
|
|
|
|
CFLAGS-syslog.c += -fexceptions
|
|
|
|
CFLAGS-error.c += -fexceptions
|
|
|
|
CFLAGS-getpass.c += -fexceptions
|
|
|
|
CFLAGS-mkstemp.c += -fexceptions
|
|
|
|
CFLAGS-mkstemp64.c += -fexceptions
|
|
|
|
CFLAGS-getsysstats.c += -fexceptions
|
|
|
|
CFLAGS-getusershell.c += -fexceptions
|
|
|
|
CFLAGS-err.c += -fexceptions
|
|
|
|
CFLAGS-tst-tsearch.c += $(stack-align-test-flags)
|
|
|
|
CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-fsync.c += -fexceptions -fasynchronous-unwind-tables
|
2022-03-11 13:40:44 +00:00
|
|
|
CFLAGS-makedev.c += $(config-cflags-wno-ignored-attributes)
|
|
|
|
CFLAGS-mmap64.c += $(config-cflags-wno-ignored-attributes)
|
Update.
1998-06-26 14:37 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Check for -fexceptions.
* config.make.in: Define exceptions, not no-exceptions.
* misc/sys/cdefs.h: Define __PMS. When using modern g++ define
__P to use throw().
* misc/Makefile: Define CFLAGS-tsearch.c and CFLAGS-lsearch.c to
$(exceptions).
* stdlib/Makefile: Likewise for bsearch.c, msort.c, and qsort.c.
* misc/search.h: Use __PMS in tsearch, tfind, tdelete, twalk, tdestroy,
lfind, and lsearch prototpypes.
* stdlib/stdlib.h: Likewise for bsearch and qsort.
1998-06-26 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/fpu/bits/mathinline.h (__finite): Use C code, not asm.
1998-06-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (remove-old-headers): Make phony.
* configure.in: Substitute @old_glibc_headers@.
1998-06-26 Ulrich Drepper <drepper@cygnus.com>
* libc.map: Remove __libc_uid.
1998-06-24 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/terminal.texi (Allocation, Pseudo-Terminal Pairs): Fix
typos.
1998-06-26 Ulrich Drepper <drepper@cygnus.com>
* libc.map: Add Alpha-specific io function from protected namespace.
1998-06-26 14:47:05 +00:00
|
|
|
|
2016-12-26 09:08:45 +00:00
|
|
|
# Called during static library initialization, so turn stack-protection
|
|
|
|
# off for non-shared builds.
|
|
|
|
CFLAGS-sbrk.o = $(no-stack-protector)
|
|
|
|
CFLAGS-sbrk.op = $(no-stack-protector)
|
|
|
|
CFLAGS-brk.o = $(no-stack-protector)
|
|
|
|
CFLAGS-brk.op = $(no-stack-protector)
|
2021-12-16 11:47:11 +00:00
|
|
|
CFLAGS-mmap.o = $(no-stack-protector)
|
|
|
|
CFLAGS-mmap.op = $(no-stack-protector)
|
|
|
|
CFLAGS-mmap64.o = $(no-stack-protector)
|
|
|
|
CFLAGS-mmap64.op = $(no-stack-protector)
|
2016-12-26 09:08:45 +00:00
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
include ../Rules
|
|
|
|
|
|
|
|
$(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
|
1996-08-28 00:26:07 +00:00
|
|
|
|
Use existing makefile variables for dependencies on glibc libraries.
glibc's Makeconfig defines some variables such as $(libm) and $(libdl)
for linking with libraries built by glibc, and nptl/Makeconfig
(included by the toplevel Makeconfig) defines others such as
$(shared-thread-library).
In some places glibc's Makefiles use those variables when linking
against the relevant libraries, but in other places they hardcode the
location of the libraries in the build tree. This patch cleans up
various places to use the variables that already exist (in the case of
libm, replacing several duplicate definitions of a $(link-libm)
variable in subdirectory Makefiles). (It's not necessarily exactly
equivalent to what the existing code does - in particular,
$(shared-thread-library) includes libpthread_nonshared, but is
replacing places that just referred to libpthread.so. But I think
that change is desirable on the general principle of linking things as
close as possible to the way in which they would be linked with an
installed library, unless there is a clear reason not to do so.)
To support running tests with an installed copy of glibc without
needing the full build tree from when that copy was built, I think it
will be useful to use such variables more generally and systematically
- every time the rules for building a test refer to some file from the
build tree that's also installed by glibc, use a makefile variable so
that the installed-testing case can point those variables to installed
copies of the files. This patch just deals with straightforward cases
where such variables already exist.
It's quite possible some uses of $(shared-thread-library) should
actually be a new $(thread-library) variable that's set appropriately
in the --disable-shared case, if those uses would in fact work without
shared libraries. I didn't change the status quo that those cases
hardcode use of a shared library whether or not it's actually needed
(but other uses such as $(libm) and $(libdl) would now get the static
library if the shared library isn't built, when some previously
hardcoded use of the shared library - if they actually need shared
libraries, the test itself needs an enable-shared conditional anyway).
Tested x86_64.
* benchtests/Makefile
($(addprefix $(objpfx)bench-,$(bench-math))): Depend on $(libm),
not $(common-objpfx)math/libm.so.
($(addprefix $(objpfx)bench-,$(bench-pthread))): Depend on
$(shared-thread-library), not $(common-objpfx)nptl/libpthread.so.
* elf/Makefile ($(objpfx)noload): Depend on $(libdl), not
$(common-objpfx)dlfcn/libdl.so.
($(objpfx)tst-audit8): Depend on $(libm), not
$(common-objpfx)math/libm.so.
* malloc/Makefile ($(objpfx)libmemusage.so): Depend on $(libdl),
not $(common-objpfx)dlfcn/libdl.so.
* math/Makefile
($(addprefix $(objpfx),$(filter-out $(tests-static),$(tests)))):
Depend on $(libm), not $(objpfx)libm.so. Do not condition on
[$(build-shared) = yes].
($(objpfx)test-fenv-tls): Depend on $(shared-thread-library), not
$(common-objpfx)nptl/libpthread.so.
* misc/Makefile ($(objpfx)tst-tsearch): Depend on $(libm), not
$(common-objpfx)math/libm.so$(libm.so-version) or
$(common-objpfx)math/libm.a depending on [$(build-shared) = yes].
* nptl/Makefile ($(objpfx)tst-unload): Depend on $(libdl), not
$(common-objpfx)dlfcn/libdl.so.
* setjmp/Makefile (link-libm): Remove variable.
($(objpfx)tst-setjmp-fp): Depend on $(libm), not $(link-libm).
* stdio-common/Makefile (link-libm): Remove variable.
($(objpfx)tst-printf-round): Depend on $(libm), not $(link-libm).
* stdlib/Makefile (link-libm): Remove variable.
($(objpfx)bug-getcontext): Depend on $(libm), not $(link-libm).
($(objpfx)tst-strtod-round): Likewise.
($(objpfx)tst-tininess): Likewise.
($(objpfx)tst-strtod-underflow): Likewise.
($(objpfx)tst-strtod6): Likewise.
($(objpfx)tst-tls-atexit): Depend on $(shared-thread-library) and
$(libdl), not $(common-objpfx)nptl/libpthread.so and
$(common-objpfx)dlfcn/libdl.so.
2014-05-16 21:38:08 +00:00
|
|
|
$(objpfx)tst-tsearch: $(libm)
|
Update.
2000-08-17 Greg McGary <greg@mcgary.org>
* Makeconfig (link-extra-libs-bounded): Strip `-bp' suffix
from test program name when constructing suffix for $(LDLIBS-*).
(bounded-thread-library): New variable.
* crypt/Makefile
[build-shared, build-static] (libcrypt-dep): Remove variable.
($(addprefix $(objpfx),$(tests))): Consolidate individual dependencies.
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
* linuxthreads/Makefile (libpthread, librt): Remove variables.
(librt-tests): Add variable. (tests): Use it.
[build-shared, build-static]
($(addprefix $(objpfx),$(tests)), $(addprefix $(objpfx),$(librt-tests))):
Consolidate individual dependencies.
[build-bounded]
($(tests:%=$(objpfx)%-bp), $(librt-tests:%=$(objpfx)%-bp)):
Add dependencies.
* math/Makefile (LDLIBS-*): Remove variables (they are redundant).
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
* misc/Makefile
[build-bounded] ($(objpfx)tst-tsearch-bp): Add dependencies.
* rt/Makefile
[build-shared, build-static]
($(addprefix $(objpfx),$(tests))): Consolidate individual dependencies.
[build-bounded] ($(tests:%=$(objpfx)%-bp)): Add dependencies.
2000-08-17 Greg McGary <greg@mcgary.org>
* sysdeps/generic/bp-checks.h: s/\(CHECK\w+\)opt/\1_NULL_OK/
* sysdeps/unix/make-syscalls.sh: Likewise.
* sysdeps/unix/sysv/linux/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c: Likewise.
2000-08-17 Greg McGary <greg@mcgary.org>
* sysdeps/i386/fpu/s_frexp.S: Check bounds.
Wrap extern symbols in BP_SYM ().
* sysdeps/i386/fpu/s_frexpf.S: Likewise.
* sysdeps/i386/fpu/s_frexpl.S: Likewise.
* sysdeps/i386/fpu/s_remquo.S: Likewise.
* sysdeps/i386/fpu/s_remquof.S: Likewise.
* sysdeps/i386/fpu/s_remquol.S: Likewise.
* sysdeps/i386/fpu/s_sincos.S: Likewise.
* sysdeps/i386/fpu/s_sincosf.S: Likewise.
* sysdeps/i386/fpu/s_sincosl.S: Likewise.
* sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
* sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise.
2000-08-17 07:38:02 +00:00
|
|
|
|
2021-07-22 13:07:59 +00:00
|
|
|
tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2005-07-19 23:46:55 +00:00
|
|
|
tst-error1-ARGS = $(objpfx)tst-error1.out
|
2014-03-07 03:29:23 +00:00
|
|
|
$(objpfx)tst-error1-mem.out: $(objpfx)tst-error1.out
|
2014-02-21 21:48:08 +00:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2018-05-23 12:16:18 +00:00
|
|
|
|
2021-07-22 13:07:59 +00:00
|
|
|
tst-allocate_once-ENV = MALLOC_TRACE=$(objpfx)tst-allocate_once.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2018-05-23 12:16:18 +00:00
|
|
|
$(objpfx)tst-allocate_once-mem.out: $(objpfx)tst-allocate_once.out
|
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-allocate_once.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2021-06-15 19:59:50 +00:00
|
|
|
|
2021-06-16 00:00:50 +00:00
|
|
|
$(objpfx)tst-select: $(librt)
|
|
|
|
$(objpfx)tst-select-time64: $(librt)
|
2021-06-15 19:59:50 +00:00
|
|
|
$(objpfx)tst-pselect: $(librt)
|
|
|
|
$(objpfx)tst-pselect-time64: $(librt)
|