2024-01-02 02:12:26 +08:00
|
|
|
# Copyright (C) 1991-2024 Free Software Foundation, Inc.
|
1995-02-18 09:27:10 +08: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 12:58:11 +08: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 09:27:10 +08: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 12:58:11 +08:00
|
|
|
# Lesser General Public License for more details.
|
1995-02-18 09:27:10 +08:00
|
|
|
|
2001-07-06 12:58:11 +08:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
2012-02-10 07:18:22 +08: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 13:40:42 +08:00
|
|
|
# <https://www.gnu.org/licenses/>.
|
1995-02-18 09:27:10 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Sub-makefile for POSIX portion of the library.
|
|
|
|
#
|
|
|
|
subdir := posix
|
|
|
|
|
2014-02-27 07:12:03 +08:00
|
|
|
include ../Makeconfig
|
|
|
|
|
2023-04-19 00:58:18 +08:00
|
|
|
headers := \
|
|
|
|
bits/confname.h \
|
|
|
|
bits/cpu-set.h \
|
|
|
|
bits/environments.h \
|
|
|
|
bits/getopt_core.h \
|
|
|
|
bits/getopt_ext.h \
|
|
|
|
bits/getopt_posix.h \
|
|
|
|
bits/local_lim.h \
|
|
|
|
bits/mman_ext.h \
|
|
|
|
bits/posix1_lim.h \
|
|
|
|
bits/posix2_lim.h \
|
|
|
|
bits/posix_opt.h \
|
|
|
|
bits/pthreadtypes-arch.h \
|
|
|
|
bits/pthreadtypes.h \
|
|
|
|
bits/sched.h \
|
2023-08-25 00:42:17 +08:00
|
|
|
bits/spawn_ext.h \
|
2023-04-19 00:58:18 +08:00
|
|
|
bits/thread-shared-types.h \
|
|
|
|
bits/types.h \
|
|
|
|
bits/types/idtype_t.h \
|
|
|
|
bits/types/struct_sched_param.h \
|
|
|
|
bits/typesizes.h \
|
2023-04-26 17:45:11 +08:00
|
|
|
bits/unistd-decl.h \
|
2023-04-19 00:58:18 +08:00
|
|
|
bits/unistd.h \
|
|
|
|
bits/unistd_ext.h \
|
|
|
|
bits/utsname.h \
|
|
|
|
bits/waitflags.h \
|
|
|
|
bits/waitstatus.h \
|
|
|
|
cpio.h \
|
|
|
|
fnmatch.h \
|
|
|
|
getopt.h \
|
|
|
|
glob.h \
|
|
|
|
re_comp.h \
|
|
|
|
regex.h \
|
|
|
|
sched.h \
|
|
|
|
spawn.h \
|
|
|
|
sys/times.h \
|
|
|
|
sys/types.h \
|
|
|
|
sys/unistd.h \
|
|
|
|
sys/utsname.h \
|
|
|
|
sys/wait.h \
|
|
|
|
tar.h \
|
|
|
|
unistd.h \
|
|
|
|
wait.h \
|
|
|
|
wordexp.h \
|
|
|
|
# headers
|
|
|
|
|
|
|
|
routines := \
|
|
|
|
_Fork \
|
|
|
|
_exit \
|
|
|
|
alarm \
|
|
|
|
bsd-getpgrp \
|
|
|
|
confstr \
|
|
|
|
execl \
|
|
|
|
execle \
|
|
|
|
execlp \
|
|
|
|
execv \
|
|
|
|
execve \
|
|
|
|
execveat \
|
|
|
|
execvp \
|
|
|
|
execvpe \
|
|
|
|
fexecve \
|
|
|
|
fnmatch \
|
|
|
|
fork \
|
|
|
|
fpathconf \
|
|
|
|
gai_strerror \
|
|
|
|
get_child_max \
|
|
|
|
getegid \
|
|
|
|
geteuid \
|
|
|
|
getgid \
|
|
|
|
getgroups \
|
|
|
|
getopt \
|
|
|
|
getopt1 \
|
|
|
|
getpgid \
|
|
|
|
getpgrp \
|
|
|
|
getpid \
|
|
|
|
getppid \
|
|
|
|
getresgid \
|
|
|
|
getresuid \
|
|
|
|
getsid \
|
|
|
|
getuid \
|
|
|
|
glob \
|
|
|
|
glob-lstat-compat \
|
|
|
|
glob64 \
|
|
|
|
glob64-lstat-compat \
|
|
|
|
glob64-time64 \
|
|
|
|
glob_pattern_p \
|
|
|
|
globfree \
|
|
|
|
globfree64 \
|
|
|
|
globfree64-time64 \
|
|
|
|
group_member \
|
|
|
|
nanosleep \
|
|
|
|
pathconf \
|
|
|
|
pause \
|
|
|
|
posix_madvise \
|
|
|
|
pread \
|
|
|
|
pread64 \
|
|
|
|
pwrite \
|
|
|
|
pwrite64 \
|
|
|
|
regex \
|
|
|
|
register-atfork \
|
|
|
|
sched_cpualloc \
|
|
|
|
sched_cpucount \
|
|
|
|
sched_cpufree \
|
|
|
|
sched_getaffinity \
|
|
|
|
sched_getp \
|
|
|
|
sched_gets \
|
|
|
|
sched_primax \
|
|
|
|
sched_primin \
|
|
|
|
sched_rr_gi \
|
|
|
|
sched_setaffinity \
|
|
|
|
sched_setp \
|
|
|
|
sched_sets \
|
|
|
|
sched_yield \
|
|
|
|
setgid \
|
2023-10-02 20:55:15 +08:00
|
|
|
setgroups \
|
2023-04-19 00:58:18 +08:00
|
|
|
setpgid \
|
|
|
|
setpgrp \
|
|
|
|
setresgid \
|
|
|
|
setresuid \
|
|
|
|
setsid \
|
|
|
|
setuid \
|
|
|
|
shm-directory \
|
|
|
|
sleep \
|
|
|
|
spawn \
|
|
|
|
spawn_faction_addchdir \
|
|
|
|
spawn_faction_addclose \
|
|
|
|
spawn_faction_addclosefrom \
|
|
|
|
spawn_faction_adddup2 \
|
|
|
|
spawn_faction_addfchdir \
|
|
|
|
spawn_faction_addopen \
|
|
|
|
spawn_faction_addtcsetpgrp_np \
|
|
|
|
spawn_faction_destroy \
|
|
|
|
spawn_faction_init \
|
|
|
|
spawn_valid_fd \
|
|
|
|
spawnattr_destroy \
|
|
|
|
spawnattr_getdefault \
|
|
|
|
spawnattr_getflags \
|
|
|
|
spawnattr_getpgroup \
|
|
|
|
spawnattr_getschedparam \
|
|
|
|
spawnattr_getschedpolicy \
|
|
|
|
spawnattr_getsigmask \
|
|
|
|
spawnattr_init \
|
|
|
|
spawnattr_setdefault \
|
|
|
|
spawnattr_setflags \
|
|
|
|
spawnattr_setpgroup \
|
|
|
|
spawnattr_setschedparam \
|
|
|
|
spawnattr_setschedpolicy \
|
|
|
|
spawnattr_setsigmask \
|
|
|
|
spawni \
|
|
|
|
spawnp \
|
|
|
|
streams-compat \
|
|
|
|
sysconf \
|
|
|
|
times \
|
|
|
|
uname \
|
|
|
|
vfork \
|
|
|
|
wait \
|
|
|
|
wait3 \
|
|
|
|
wait4 \
|
|
|
|
waitid \
|
|
|
|
waitpid \
|
|
|
|
wordexp \
|
|
|
|
# routines
|
|
|
|
|
2023-03-17 17:17:28 +08:00
|
|
|
# Exclude fortified routines from being built with _FORTIFY_SOURCE
|
|
|
|
routines_no_fortify += \
|
|
|
|
confstr \
|
|
|
|
getgroups \
|
|
|
|
pread \
|
|
|
|
pread64 \
|
|
|
|
# routines_no_fortify
|
|
|
|
|
2023-04-19 00:58:18 +08:00
|
|
|
aux := \
|
|
|
|
environ \
|
|
|
|
init-posix \
|
|
|
|
# aux
|
|
|
|
|
|
|
|
tests := \
|
|
|
|
bug-ga1 \
|
|
|
|
bug-getopt1 \
|
|
|
|
bug-getopt2 \
|
|
|
|
bug-getopt3 \
|
|
|
|
bug-getopt4 \
|
|
|
|
bug-getopt5 \
|
|
|
|
bug-glob2 \
|
|
|
|
bug-glob3 \
|
|
|
|
bug-regex1 \
|
2023-05-19 04:20:29 +08:00
|
|
|
bug-regex2 \
|
|
|
|
bug-regex3 \
|
|
|
|
bug-regex4 \
|
|
|
|
bug-regex6 \
|
|
|
|
bug-regex7 \
|
|
|
|
bug-regex8 \
|
|
|
|
bug-regex9 \
|
2023-04-19 00:58:18 +08:00
|
|
|
bug-regex10 \
|
|
|
|
bug-regex11 \
|
|
|
|
bug-regex12 \
|
|
|
|
bug-regex13 \
|
|
|
|
bug-regex14 \
|
|
|
|
bug-regex15 \
|
|
|
|
bug-regex16 \
|
|
|
|
bug-regex17 \
|
|
|
|
bug-regex18 \
|
|
|
|
bug-regex19 \
|
|
|
|
bug-regex21 \
|
|
|
|
bug-regex22 \
|
|
|
|
bug-regex23 \
|
|
|
|
bug-regex24 \
|
|
|
|
bug-regex25 \
|
|
|
|
bug-regex26 \
|
|
|
|
bug-regex27 \
|
|
|
|
bug-regex28 \
|
|
|
|
bug-regex29 \
|
|
|
|
bug-regex30 \
|
|
|
|
bug-regex31 \
|
|
|
|
bug-regex32 \
|
|
|
|
bug-regex34 \
|
|
|
|
bug-regex35 \
|
|
|
|
bug-regex36 \
|
|
|
|
bug-regex37 \
|
|
|
|
bug-regex38 \
|
|
|
|
regexbug1 \
|
|
|
|
runptests \
|
|
|
|
runtests \
|
|
|
|
test-errno \
|
|
|
|
test-ssize-max \
|
|
|
|
test-vfork \
|
|
|
|
testfnm \
|
|
|
|
transbug \
|
|
|
|
tst-boost \
|
|
|
|
tst-chmod \
|
|
|
|
tst-cpucount \
|
|
|
|
tst-cpuset \
|
|
|
|
tst-dir \
|
|
|
|
tst-execl1 \
|
|
|
|
tst-execl2 \
|
|
|
|
tst-execle1 \
|
|
|
|
tst-execle2 \
|
|
|
|
tst-execlp1 \
|
|
|
|
tst-execlp2 \
|
|
|
|
tst-execv1 \
|
|
|
|
tst-execv2 \
|
|
|
|
tst-execve1 \
|
|
|
|
tst-execve2 \
|
|
|
|
tst-execveat \
|
|
|
|
tst-execvp1 \
|
|
|
|
tst-execvp2 \
|
|
|
|
tst-execvp3 \
|
|
|
|
tst-execvp4 \
|
|
|
|
tst-execvpe1 \
|
|
|
|
tst-execvpe2 \
|
|
|
|
tst-execvpe3 \
|
|
|
|
tst-execvpe4 \
|
|
|
|
tst-execvpe5 \
|
|
|
|
tst-execvpe6 \
|
|
|
|
tst-fexecve \
|
|
|
|
tst-fnmatch \
|
|
|
|
tst-fnmatch2 \
|
|
|
|
tst-fnmatch3 \
|
|
|
|
tst-fnmatch4 \
|
|
|
|
tst-fnmatch5 \
|
|
|
|
tst-fnmatch6 \
|
|
|
|
tst-fnmatch7 \
|
|
|
|
tst-fork \
|
2023-06-13 18:08:28 +08:00
|
|
|
tst-gai_strerror \
|
2023-04-19 00:58:18 +08:00
|
|
|
tst-getopt_long1 \
|
|
|
|
tst-glob-tilde \
|
|
|
|
tst-glob_symlinks \
|
|
|
|
tst-gnuglob \
|
|
|
|
tst-gnuglob64 \
|
|
|
|
tst-mmap \
|
|
|
|
tst-mmap-offset \
|
|
|
|
tst-nanosleep \
|
|
|
|
tst-nice \
|
|
|
|
tst-pathconf \
|
|
|
|
tst-pcre \
|
|
|
|
tst-posix_fadvise \
|
|
|
|
tst-posix_fadvise64 \
|
|
|
|
tst-posix_spawn-fd \
|
|
|
|
tst-posix_spawn-setsid \
|
|
|
|
tst-preadwrite \
|
|
|
|
tst-preadwrite64 \
|
|
|
|
tst-regcomp-truncated \
|
|
|
|
tst-regex \
|
|
|
|
tst-regex2 \
|
|
|
|
tst-regexloc \
|
|
|
|
tst-rxspencer \
|
|
|
|
tst-rxspencer-no-utf8 \
|
|
|
|
tst-sched_getaffinity \
|
|
|
|
tst-spawn-chdir \
|
|
|
|
tst-spawn4 \
|
|
|
|
tst-spawn5 \
|
|
|
|
tst-spawn6 \
|
|
|
|
tst-spawn7 \
|
|
|
|
tst-sysconf \
|
|
|
|
tst-sysconf-empty-chroot \
|
|
|
|
tst-truncate \
|
|
|
|
tst-truncate64 \
|
|
|
|
tst-vfork1 \
|
|
|
|
tst-vfork2 \
|
|
|
|
tst-wait3 \
|
|
|
|
tst-wait4 \
|
|
|
|
tst-waitid \
|
|
|
|
tst-wordexp-nocmd \
|
|
|
|
tstgetopt \
|
|
|
|
# tests
|
2021-03-10 04:07:24 +08:00
|
|
|
|
|
|
|
# Test for the glob symbol version that was replaced in glibc 2.27.
|
|
|
|
ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes)
|
2023-04-19 00:58:18 +08:00
|
|
|
tests += \
|
|
|
|
tst-glob_lstat_compat
|
|
|
|
# tests
|
2021-03-10 04:07:24 +08:00
|
|
|
endif
|
|
|
|
|
2021-03-10 04:07:24 +08:00
|
|
|
# Test for the posix_spawn, posix_spawnp symbol versions replaced in
|
|
|
|
# glibc 2.15.
|
|
|
|
ifeq ($(have-GLIBC_2.14)$(build-shared),yesyes)
|
2023-04-19 00:58:18 +08:00
|
|
|
tests += \
|
|
|
|
tst-spawn4-compat \
|
|
|
|
# tests
|
2021-03-10 04:07:24 +08:00
|
|
|
endif
|
|
|
|
|
2023-04-19 00:58:18 +08:00
|
|
|
tests-internal := \
|
2023-05-19 04:20:29 +08:00
|
|
|
bug-regex5 \
|
2023-04-19 00:58:18 +08:00
|
|
|
bug-regex20 \
|
|
|
|
bug-regex33 \
|
|
|
|
# tests-internal
|
|
|
|
|
|
|
|
tests-container := \
|
|
|
|
bug-ga2 \
|
|
|
|
tst-vfork3 \
|
|
|
|
# tests-container
|
|
|
|
|
|
|
|
tests-time64 := \
|
|
|
|
tst-gnuglob64-time64 \
|
|
|
|
tst-wait3-time64 \
|
|
|
|
tst-wait4-time64 \
|
|
|
|
# tests-time64
|
|
|
|
|
|
|
|
xtests := \
|
|
|
|
tst-sched_rr_get_interval \
|
|
|
|
# xtests
|
|
|
|
|
|
|
|
xtests-time64 := \
|
|
|
|
tst-sched_rr_get_interval-time64 \
|
|
|
|
# xtests-time64
|
|
|
|
|
1999-03-21 01:16:44 +08:00
|
|
|
ifeq (yes,$(build-shared))
|
2023-04-19 00:58:18 +08:00
|
|
|
test-srcs := \
|
|
|
|
globtest
|
|
|
|
# tests-src
|
|
|
|
tests += \
|
|
|
|
tst-exec \
|
|
|
|
tst-spawn \
|
|
|
|
tst-spawn2 \
|
|
|
|
tst-spawn3 \
|
|
|
|
wordexp-test \
|
|
|
|
# tests
|
1999-03-21 01:16:44 +08:00
|
|
|
endif
|
2023-04-19 00:58:18 +08:00
|
|
|
|
getopt: clean up error reporting
getopt can print a whole bunch of error messages, and when used
standalone (from gnulib) it uses fprintf to do that. But fprintf is a
cancellation point and getopt isn't, and also applying fprintf to a
stream in wide-character mode is not allowed.
glibc has an internal function called __fxprintf that writes a narrow
format string to a stream regardless of mode, but it only handles
ASCII format strings, and it's still a cancellation point. getopt's
messages are translated, so they might not be ASCII. So getopt has an
error message to an asprintf buffer, monkeys with internal flag bits
on stderr to disable cancellation, and then calls
__fxprintf(stderr, "%s", buffer). There isn't even a helper function,
the code is duplicated every time.
This patch fixes __fxprintf to handle arbitrary multibyte format
strings, and adds a variant __fxprintf_nocancel that does the same
thing but also isn't a cancellation point. (It still _works_ by
monkeying with internal flag bits on the FILE, but that's not really a
layering violation for code in stdio-common.) All of the #ifdef _LIBC
blocks can then be reduced to their standalone versions with a little
help from some macros at the top of the file.
I also wrote a test case to verify that getopt really isn't a
cancellation point, and I'm glad I did, because it found two bugs, one
of which wasn't even to do with cancellation (see previous patch).
* stdio-common/fxprintf.c (__fxprintf_nocancel): New function.
(locked_vfxprintf): New helper function. Handle arbitrary
multibyte strings, not just ASCII.
* include/stdio.h: Declare __fxprintf_nocancel.
* posix/getopt.c: When _LIBC is defined, define fprintf to
__fxprintf_nocancel, flockfile to _IO_flockfile, and
funlockfile to _IO_funlockfile. When neither _LIBC nor
_POSIX_THREAD_SAFE_FUNCTIONS is defined, define flockfile and
funlockfile as no-ops. (_getopt_internal_r): Remove all
internal #ifdef _LIBC blocks; the standalone error-printing
code can now be used for libc as well. Add an
flockfile/funlockfile pair around one case where the error
message is printed in several chunks. Don't use fputc.
* posix/tst-getopt-cancel.c: New test.
* posix/Makefile: Run it.
2017-04-01 22:17:44 +08:00
|
|
|
ifeq (yesyes,$(build-shared)$(have-thread-library))
|
2023-04-19 00:58:18 +08:00
|
|
|
tests += \
|
|
|
|
tst-_Fork \
|
|
|
|
tst-getopt-cancel \
|
|
|
|
# tests
|
getopt: clean up error reporting
getopt can print a whole bunch of error messages, and when used
standalone (from gnulib) it uses fprintf to do that. But fprintf is a
cancellation point and getopt isn't, and also applying fprintf to a
stream in wide-character mode is not allowed.
glibc has an internal function called __fxprintf that writes a narrow
format string to a stream regardless of mode, but it only handles
ASCII format strings, and it's still a cancellation point. getopt's
messages are translated, so they might not be ASCII. So getopt has an
error message to an asprintf buffer, monkeys with internal flag bits
on stderr to disable cancellation, and then calls
__fxprintf(stderr, "%s", buffer). There isn't even a helper function,
the code is duplicated every time.
This patch fixes __fxprintf to handle arbitrary multibyte format
strings, and adds a variant __fxprintf_nocancel that does the same
thing but also isn't a cancellation point. (It still _works_ by
monkeying with internal flag bits on the FILE, but that's not really a
layering violation for code in stdio-common.) All of the #ifdef _LIBC
blocks can then be reduced to their standalone versions with a little
help from some macros at the top of the file.
I also wrote a test case to verify that getopt really isn't a
cancellation point, and I'm glad I did, because it found two bugs, one
of which wasn't even to do with cancellation (see previous patch).
* stdio-common/fxprintf.c (__fxprintf_nocancel): New function.
(locked_vfxprintf): New helper function. Handle arbitrary
multibyte strings, not just ASCII.
* include/stdio.h: Declare __fxprintf_nocancel.
* posix/getopt.c: When _LIBC is defined, define fprintf to
__fxprintf_nocancel, flockfile to _IO_flockfile, and
funlockfile to _IO_funlockfile. When neither _LIBC nor
_POSIX_THREAD_SAFE_FUNCTIONS is defined, define flockfile and
funlockfile as no-ops. (_getopt_internal_r): Remove all
internal #ifdef _LIBC blocks; the standalone error-printing
code can now be used for libc as well. Add an
flockfile/funlockfile pair around one case where the error
message is printed in several chunks. Don't use fputc.
* posix/tst-getopt-cancel.c: New test.
* posix/Makefile: Run it.
2017-04-01 22:17:44 +08:00
|
|
|
endif
|
1995-02-18 09:27:10 +08:00
|
|
|
|
2023-04-19 00:58:18 +08:00
|
|
|
tests-static = \
|
|
|
|
tst-exec-static \
|
|
|
|
tst-spawn-static \
|
|
|
|
# tests-static
|
|
|
|
|
|
|
|
tests += \
|
|
|
|
$(tests-static)
|
|
|
|
# tests
|
|
|
|
|
|
|
|
others := \
|
|
|
|
getconf \
|
|
|
|
# others
|
|
|
|
|
|
|
|
install-bin := \
|
|
|
|
getconf \
|
|
|
|
# getconf
|
|
|
|
|
|
|
|
install-others-programs := \
|
|
|
|
$(inst_libexecdir)/getconf \
|
|
|
|
# install-others-programs
|
|
|
|
|
|
|
|
before-compile += \
|
|
|
|
$(objpfx)posix-conf-vars-def.h \
|
|
|
|
# before-compile
|
Update.
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
* argp/argp-ba.c (argp_program_bug_address): Make `const'.
* argp/argp-eexst.c: New file. Define exit status variable.
* argp/argp-help.c (__argp_state_help): Use argp_err_exit_status
variable instead of always exiting with value 1.
* argp/argp-pv.c (argp_program_version): Make `const'.
* argp/argp.h: Declare argp_err_exit_status.
Patches by Miles Bader <miles@gnu.ai.mit.edu>.
* locale/programs/localedef.c: Use argp_err_exit_status to
terminate with correct value.
* inet/rcmd.c (iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
* libio/vsnprintf.c: Change implementation to follow ISO C 9X
proposal. The return value now is always the number of characters
which would be written if enough space is available.
* manual/stdio.texi: Update description for new behaviour.
* locale/locale.h (__locale_t): Don't use __locale_t for struct
name and pointer to struct since old gccs cannot keep the namespaces
apart. Rename struct to __locale_struct.
* locale/duplocale.h: Likewise.
* locale/newlocale.h: Likewise.
* math/Makefile (headers): Add complex.h and cmathcalls.h.
(routines): Remove w_cabs. Add conj, cimag, creal, and cabs.
* math/math.h: Undefine __MATHDECL_1, __MATHDECL, and __MATHCALL
after use.
(signgam): Move declaration to here from mathcalls.h.
* math/mathcalls.h (cabs, __cabs_complex, signgam): Remove definition.
Correct comment for fmin and fmax.
Start implementing complex math function from ISO C 9X.
* math/complex.h: New file.
* math/cmathcalls.h: New file.
* math/cabs.c: New file.
* math/cabsf.c: New file.
* math/cabsl.c: New file.
* math/cimag.c: New file.
* math/cimagf.c: New file.
* math/cimagl.c: New file.
* math/conj.c: New file.
* math/conjf.c: New file.
* math/conjl.c: New file.
* math/creal.c: New file.
* math/crealf.c: New file.
* math/creall.c: New file.
* sysdeps/libm-ieee754/w_cabs.c: Removed.
* sysdeps/libm-ieee754/w_cabsf.c: Removed.
* sysdeps/libm-ieee754/w_cabsl.c: Removed.
* posix/regex.c: Merge with regex sources from Arnold Robbins'
version in GNU awk.
* posix/regex.h: Likewise.
Add regex test suite by Tom Lord.
* posix/Makefile (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
* posix/TESTS: New file.
* posix/TESTS2C.sed.: New file.
* posix/runtests.c: New file.
* posix/testcases.h: New file.
* sysdeps/unix/sysv/linux/poll.c: Test whether poll syscall is
available and use fall-back implementation if not.
* sysdeps/unix/sysv/linux/syscalls.list: Sort entries.
* time/ialloc.c: Update from tzcode1997c.
* time/private.h: Likewise.
* time/scheck.c: Likewise.
* time/tzselect.ksh: Likewise.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/tzfile.c: Pretty print.
1997-03-06 07:37 Geoff Keating <geoffk@ozemail.com.au>
Port to powerpc-*-linux-gnu. Slightly tested, under MkLinux,
on a 601.
* sysdeps/powerpc/Implies: Added.
* sysdeps/powerpc/__longjmp.S: Added.
* sysdeps/powerpc/__math.h: Added.
* sysdeps/powerpc/bsd-_setjmp.S: Added.
* sysdeps/powerpc/bsd-setjmp.S: Added.
* sysdeps/powerpc/dl-machine.h: Added.
* sysdeps/powerpc/ffs.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/powerpc/setjmp.S: Added.
* sysdeps/powerpc/strlen.s: Added.
* sysdeps/powerpc/elf/start.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/unix/sysv/linux/powerpc/Dist: Added.
* sysdeps/unix/sysv/linux/powerpc/_exit.S: Added.
* sysdeps/unix/sysv/linux/powerpc/brk.c: Added.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Added.
* sysdeps/unix/sysv/linux/powerpc/init-first.h: Added.
* sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Added.
* sysdeps/unix/sysv/linux/powerpc/profil.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sigreturn.S: Added.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscall.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Added.
* sysdeps/unix/sysv/linux/powerpc/termbits.h: Added.
* sysdeps/unix/sysv/linux/powerpc/sys/syscall.h: Added.
1997-03-05 05:24 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-runtime.c (fixup): Add ELF_FIXUP_RETURNS_ADDRESS switch,
because knowing the first instruction of a PowerPC PLT trampoline
is not very helpful.
1997-03-04 08:04 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-load.c (ELF_PREFERRED_ADDRESS, ELF_PREFERRED_ADDRESS_DATA,
ELF_FIXED_ADDRESS): Added. These are for dl-machine.h to indicate
a preference as to where executables should be loaded.
1997-02-28 08:50 Geoff Keating <geoffk@ozemail.com.au>
* elf/elf.h: Add in all those PowerPC reloc types.
1997-02-24 07:12 Geoff Keating <geoffk@ozemail.com.au>
* stdio-common/vfscanf.c: Use __va_copy if available.
1997-03-06 13:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/malloc.c (mprotect) [_LIBC]: Define as __mprotect to
clean up namespace.
1997-03-07 14:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Also
recognize cache entries with flag == 3.
1997-03-06 01:05 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h (INADDR_NONE): Cast to unsigned int.
(INADDR_LOOPBACK): Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* manual/socket.texi: Correct types of INADDR_* constants from
unsigned long to unsigned.
1997-03-05 23:14 Ulrich Drepper <drepper@cygnus.com>
* time/antarctica: Update from tzdata1997c.
* time/asia: Likewise.
* time/zone.tab: Likewise.
1997-03-05 00:43 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (libc_cv_asm_symver_directive,
libc_cv_ld_version_script_option): Remove unknown instruction from
assembler test file.
1997-03-04 19:14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Update feature tests to use
__USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-04 10:11 H.J. Lu <hjl@lucon.org>
* sunrpc/Makefile ($(objpfx)rpc-proto.c): Create subdir before
generating file.
1997-03-05 03:59 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (__ivaliduser): Don't use getline, but __getline
instead to avoid namespace problems.
Reported by David Mosberger-Tang <davidm@AZStarNet.COM>.
1997-03-03 19:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/utmp_file.c: Fix previous change. Make portable by
checking the _HAVE_UT_* feature macros.
* libio/fileops.c (_IO_file_finish): Likewise.
1997-03-08 13:28:20 +08:00
|
|
|
|
1998-05-08 23:16:22 +08:00
|
|
|
# So they get cleaned up.
|
2023-04-19 00:58:18 +08:00
|
|
|
generated += \
|
|
|
|
$(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
|
|
|
|
annexc \
|
|
|
|
annexc.out \
|
2024-06-19 23:48:05 +08:00
|
|
|
getconf.speclist \
|
|
|
|
ptestcases.h \
|
|
|
|
testcases.h \
|
|
|
|
tst-getconf.out \
|
|
|
|
wordexp-tst.out \
|
|
|
|
# generated
|
|
|
|
|
|
|
|
ifeq ($(run-built-tests),yes)
|
|
|
|
ifeq (yes,$(build-shared))
|
|
|
|
ifneq ($(PERL),no)
|
|
|
|
generated += \
|
2023-04-19 00:58:18 +08:00
|
|
|
bug-ga2-mem.out \
|
|
|
|
bug-ga2.mtrace \
|
|
|
|
bug-glob2-mem.out \
|
|
|
|
bug-glob2.mtrace \
|
|
|
|
bug-regex14-mem.out \
|
|
|
|
bug-regex14.mtrace \
|
|
|
|
bug-regex2-mem.out \
|
|
|
|
bug-regex2.mtrace \
|
|
|
|
bug-regex21-mem.out \
|
|
|
|
bug-regex21.mtrace \
|
|
|
|
bug-regex31-mem.out \
|
|
|
|
bug-regex31.mtrace \
|
2024-06-19 23:48:05 +08:00
|
|
|
bug-regex36-mem.out \
|
2023-04-19 00:58:18 +08:00
|
|
|
bug-regex36.mtrace \
|
|
|
|
tst-boost-mem.out \
|
|
|
|
tst-boost.mtrace \
|
|
|
|
tst-fnmatch-mem.out \
|
|
|
|
tst-fnmatch.mtrace \
|
|
|
|
tst-pcre-mem.out \
|
|
|
|
tst-pcre.mtrace \
|
|
|
|
tst-rxspencer-no-utf8-mem.out \
|
|
|
|
tst-rxspencer-no-utf8.mtrace \
|
|
|
|
tst-vfork3-mem.out \
|
|
|
|
tst-vfork3.mtrace \
|
|
|
|
# generated
|
2024-06-19 23:48:05 +08:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
1998-05-08 23:16:22 +08:00
|
|
|
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-07 06:35:33 +08:00
|
|
|
ifeq ($(run-built-tests),yes)
|
|
|
|
ifeq (yes,$(build-shared))
|
2023-04-19 00:58:18 +08:00
|
|
|
tests-special += \
|
|
|
|
$(objpfx)globtest.out \
|
|
|
|
$(objpfx)wordexp-tst.out \
|
|
|
|
# tests-special
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-07 06:35:33 +08:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Run a test on the header files we use.
|
|
|
|
# XXX Please note that for now we ignore the result of this test.
|
|
|
|
tests-special += $(objpfx)annexc.out
|
|
|
|
ifeq ($(run-built-tests),yes)
|
2024-06-19 23:48:05 +08:00
|
|
|
tests-special += $(objpfx)tst-getconf.out
|
|
|
|
ifeq (yes,$(build-shared))
|
|
|
|
ifneq ($(PERL),no)
|
2023-04-19 00:58:18 +08:00
|
|
|
tests-special += \
|
|
|
|
$(objpfx)bug-ga2-mem.out \
|
|
|
|
$(objpfx)bug-glob2-mem.out \
|
|
|
|
$(objpfx)bug-regex14-mem.out \
|
|
|
|
$(objpfx)bug-regex2-mem.out \
|
|
|
|
$(objpfx)bug-regex21-mem.out \
|
|
|
|
$(objpfx)bug-regex31-mem.out \
|
|
|
|
$(objpfx)bug-regex36-mem.out \
|
|
|
|
$(objpfx)tst-boost-mem.out \
|
|
|
|
$(objpfx)tst-fnmatch-mem.out \
|
|
|
|
$(objpfx)tst-glob-tilde-mem.out \
|
|
|
|
$(objpfx)tst-pcre-mem.out \
|
|
|
|
$(objpfx)tst-rxspencer-no-utf8-mem.out \
|
|
|
|
$(objpfx)tst-vfork3-mem.out \
|
|
|
|
# tests-special
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-07 06:35:33 +08:00
|
|
|
endif
|
2024-06-19 23:48:05 +08:00
|
|
|
endif
|
|
|
|
endif
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-07 06:35:33 +08:00
|
|
|
|
1995-02-18 09:27:10 +08:00
|
|
|
include ../Rules
|
|
|
|
|
2012-10-24 08:08:46 +08:00
|
|
|
ifeq ($(run-built-tests),yes)
|
1999-03-21 01:16:44 +08:00
|
|
|
# globtest and wordexp-test currently only works with shared libraries
|
|
|
|
ifeq (yes,$(build-shared))
|
2000-07-23 09:23:29 +08:00
|
|
|
$(objpfx)globtest.out: globtest.sh $(objpfx)globtest
|
2013-01-11 23:14:18 +08:00
|
|
|
$(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
|
2020-10-01 21:42:38 +08:00
|
|
|
'$(test-program-prefix)' '$(test-wrapper-env)'; \
|
2014-02-22 05:48:08 +08:00
|
|
|
$(evaluate-test)
|
2000-07-23 09:23:29 +08:00
|
|
|
$(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
|
Don't require test wrappers to preserve environment variables, use more consistent environment.
One wart in the original support for test wrappers for cross testing,
as noted in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00722.html>, is the
requirement for test wrappers to pass a poorly-defined set of
environment variables from the build system to the system running the
glibc under test. Although some variables are passed explicitly via
$(test-wrapper-env), including LD_* variables that simply can't be
passed implicitly because of the side effects they'd have on the build
system's dynamic linker, others are passed implicitly, including
variables such as GCONV_PATH and LOCPATH that could potentially affect
the build system's libc (so effectively relying on any such effects
not breaking the wrappers). In addition, the code in
cross-test-ssh.sh for preserving environment variables is fragile (it
depends on how bash formats a list of exported variables, and could
well break for multi-line variable definitions where the contents
contain things looking like other variable definitions).
This patch moves to explicitly passing environment variables via
$(test-wrapper-env). Makefile variables that previously used
$(test-wrapper) are split up into -before-env and -after-env parts
that can be passed separately to the various .sh files used in
testing, so those files can then insert environment settings between
the two parts.
The common default environment settings in make-test-out are made into
a separate makefile variable that can also be passed to scripts,
rather than many scripts duplicating those settings (for testing an
installed glibc, it is desirable to have the GCONV_PATH setting on
just one place, so just that one place needs to support it pointing to
an installed sysroot instead of the build tree). The default settings
are included in the variables such as $(test-program-prefix), so that
if tests do not need any non-default settings they can continue to use
single variables rather than the split-up variables.
Although this patch cleans up LC_ALL=C settings (that being part of
the common defaults), various LANG=C and LANGUAGE=C settings remain.
Those are generally unnecessary and I propose a subsequent cleanup to
remove them. LC_ALL takes precedence over LANG, and while LANGUAGE
takes precedence over LC_ALL, it only does so for settings other than
LC_ALL=C. So LC_ALL=C on its own is sufficient to ensure the C
locale, and anything that gets LC_ALL=C does not need the other
settings.
While preparing this patch I noticed some tests with .sh files that
appeared to do nothing beyond what the generic makefile support for
tests can do (localedata/tst-wctype.sh - the makefiles support -ENV
variables and .input files - and localedata/tst-mbswcs.sh - just runs
five tests that could be run individually from the makefile). So I
propose another subsequent cleanup to move those to using the generic
support instead of special .sh files.
Tested x86_64 (native) and powerpc32 (cross).
* Makeconfig (run-program-env): New variable.
(run-program-prefix-before-env): Likewise.
(run-program-prefix-after-env): Likewise.
(run-program-prefix): Define in terms of new variables.
(built-program-cmd-before-env): New variable.
(built-program-cmd-after-env): Likewise.
(built-program-cmd): Define in terms of new variables.
(test-program-prefix-before-env): New variable.
(test-program-prefix-after-env): Likewise.
(test-program-prefix): Define in terms of new variables.
(test-program-cmd-before-env): New variable.
(test-program-cmd-after-env): Likewise.
(test-program-cmd): Define in terms of new variables.
* Rules (make-test-out): Use $(run-program-env).
* scripts/cross-test-ssh.sh (env_blacklist): Remove variable.
(help): Do not mention environment variables. Mention
--timeoutfactor option.
(timeoutfactor): New variable.
(blacklist_exports): Remove function.
(exports): Remove variable.
(command): Do not include ${exports}.
* manual/install.texi (Configuring and compiling): Do not mention
test wrappers preserving environment variables. Mention that last
assignment to a variable must take precedence.
* INSTALL: Regenerated.
* benchtests/Makefile (run-bench): Use $(run-program-env).
* catgets/Makefile ($(objpfx)test1.cat): Use
$(built-program-cmd-before-env), $(run-program-env) and
$(built-program-cmd-after-env).
($(objpfx)test2.cat): Do not specify environment variables
explicitly.
($(objpfx)de/libc.cat): Use $(built-program-cmd-before-env),
$(run-program-env) and $(built-program-cmd-after-env).
($(objpfx)test-gencat.out): Use $(test-program-cmd-before-env),
$(run-program-env) and $(test-program-cmd-after-env).
($(objpfx)sample.SJIS.cat): Do not specify environment variables
explicitly.
* catgets/test-gencat.sh: Use test_program_cmd_before_env,
run_program_env and test_program_cmd_after_env arguments.
* elf/Makefile ($(objpfx)tst-pathopt.out): Use $(run-program-env).
* elf/tst-pathopt.sh: Use run_program_env argument.
* iconvdata/Makefile ($(objpfx)iconv-test.out): Use
$(test-wrapper-env) and $(run-program-env).
* iconvdata/run-iconv-test.sh: Use test_wrapper_env and
run_program_env arguments.
* iconvdata/tst-table.sh: Do not set GCONV_PATH explicitly.
* intl/Makefile ($(objpfx)tst-gettext.out): Use
$(test-program-prefix-before-env), $(run-program-env) and
$(test-program-prefix-after-env).
($(objpfx)tst-gettext2.out): Likewise.
* intl/tst-gettext.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
* intl/tst-gettext2.sh: Likewise.
* intl/tst-gettext4.sh: Do not set environment variables
explicitly.
* intl/tst-gettext6.sh: Likewise.
* intl/tst-translit.sh: Likewise.
* malloc/Makefile ($(objpfx)tst-mtrace.out): Use
$(test-program-prefix-before-env), $(run-program-env) and
$(test-program-prefix-after-env).
* malloc/tst-mtrace.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
* math/Makefile (run-regen-ulps): Use $(run-program-env).
* nptl/Makefile ($(objpfx)tst-tls6.out): Use $(run-program-env).
* nptl/tst-tls6.sh: Use run_program_env argument. Set LANG=C
explicitly with each use of ${test_wrapper_env}.
* posix/Makefile ($(objpfx)wordexp-tst.out): Use
$(test-program-prefix-before-env), $(run-program-env) and
$(test-program-prefix-after-env).
* posix/tst-getconf.sh: Do not set environment variables
explicitly.
* posix/wordexp-tst.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
* stdio-common/tst-printf.sh: Do not set environment variables
explicitly.
* stdlib/Makefile ($(objpfx)tst-fmtmsg.out): Use
$(test-program-prefix-before-env), $(run-program-env) and
$(test-program-prefix-after-env).
* stdlib/tst-fmtmsg.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
Split $test calls into $test_pre and $test.
* timezone/Makefile (build-testdata): Use
$(built-program-cmd-before-env), $(run-program-env) and
$(built-program-cmd-after-env).
localedata/ChangeLog:
* Makefile ($(addprefix $(objpfx),$(CTYPE_FILES))): Use
$(built-program-cmd-before-env), $(run-program-env) and
$(built-program-cmd-after-env).
($(objpfx)sort-test.out): Use $(test-program-prefix-before-env),
$(run-program-env) and $(test-program-prefix-after-env).
($(objpfx)tst-fmon.out): Use $(run-program-prefix-before-env),
$(run-program-env) and $(run-program-prefix-after-env).
($(objpfx)tst-locale.out): Use $(built-program-cmd-before-env),
$(run-program-env) and $(built-program-cmd-after-env).
($(objpfx)tst-trans.out): Use $(run-program-prefix-before-env),
$(run-program-env), $(run-program-prefix-after-env),
$(test-program-prefix-before-env) and
$(test-program-prefix-after-env).
($(objpfx)tst-ctype.out): Use $(test-program-cmd-before-env),
$(run-program-env) and $(test-program-cmd-after-env).
($(objpfx)tst-wctype.out): Likewise.
($(objpfx)tst-langinfo.out): Likewise.
($(objpfx)tst-langinfo-static.out): Likewise.
* gen-locale.sh: Use localedef_before_env, run_program_env and
localedef_after_env arguments.
* sort-test.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
* tst-ctype.sh: Use tst_ctype_before_env, run_program_env and
tst_ctype_after_env arguments.
* tst-fmon.sh: Use run_program_prefix_before_env, run_program_env
and run_program_prefix_after_env arguments.
* tst-langinfo.sh: Use tst_langinfo_before_env, run_program_env
and tst_langinfo_after_env arguments.
* tst-locale.sh: Use localedef_before_env, run_program_env and
localedef_after_env arguments.
* tst-mbswcs.sh: Do not set environment variables explicitly.
* tst-numeric.sh: Likewise.
* tst-rpmatch.sh: Likewise.
* tst-trans.sh: Use run_program_prefix_before_env,
run_program_env, run_program_prefix_after_env,
test_program_prefix_before_env and test_program_prefix_after_env
arguments.
* tst-wctype.sh: Use tst_wctype_before_env, run_program_env and
tst_wctype_after_env arguments.
2014-06-07 06:19:27 +08:00
|
|
|
$(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
|
2020-10-01 21:42:38 +08:00
|
|
|
'$(run-program-env)' '$(test-program-prefix-after-env)'; \
|
2014-02-22 05:48:08 +08:00
|
|
|
$(evaluate-test)
|
1997-09-16 08:42:43 +08:00
|
|
|
endif
|
2015-10-12 18:24:41 +08:00
|
|
|
|
Add generic C.UTF-8 locale (Bug 17318)
We add a new C.UTF-8 locale. This locale is not builtin to glibc, but
is provided as a distinct locale. The locale provides full support for
UTF-8 and this includes full code point sorting via STRCMP-based
collation (strcmp or wcscmp).
The collation uses a new keyword 'codepoint_collation' which drops all
collation rules and generates an empty zero rules collation to enable
STRCMP usage in collation. This ensures that we get full code point
sorting for C.UTF-8 with a minimal 1406 bytes of overhead (LC_COLLATE
structure information and ASCII collating tables).
The new locale is added to SUPPORTED. Minimal test data for specific
code points (minus those not supported by collate-test) is provided in
C.UTF-8.in, and this verifies code point sorting is working reasonably
across the range. The locale was tested manually with the full set of
code points without failure.
The locale is harmonized with locales already shipping in various
downstream distributions. A new tst-iconv9 test is added which verifies
the C.UTF-8 locale is generally usable.
Testing for fnmatch, regexec, and recomp is provided by extending
bug-regex1, bugregex19, bug-regex4, bug-regex6, transbug, tst-fnmatch,
tst-regcomp-truncated, and tst-regex to use C.UTF-8.
Tested on x86_64 or i686 without regression.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2021-09-02 03:19:19 +08:00
|
|
|
LOCALES := \
|
2023-05-19 04:20:29 +08:00
|
|
|
C.UTF-8 \
|
|
|
|
cs_CZ.ISO-8859-2 \
|
|
|
|
cs_CZ.UTF-8 \
|
|
|
|
da_DK.ISO-8859-1 \
|
|
|
|
de_DE.ISO-8859-1 \
|
|
|
|
de_DE.UTF-8 \
|
|
|
|
en_US.UTF-8 \
|
|
|
|
es_US.ISO-8859-1 \
|
|
|
|
es_US.UTF-8 \
|
|
|
|
ja_JP.EUC-JP \
|
|
|
|
tr_TR.UTF-8 \
|
|
|
|
# LOCALES
|
2015-10-12 18:24:41 +08:00
|
|
|
include ../gen-locales.mk
|
|
|
|
|
|
|
|
$(objpfx)bug-regex1.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex4.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex5.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex6.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex17.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex18.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex19.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex20.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex22.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex23.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex25.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex26.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex30.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex32.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex33.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex34.out: $(gen-locales)
|
|
|
|
$(objpfx)bug-regex35.out: $(gen-locales)
|
|
|
|
$(objpfx)tst-fnmatch.out: $(gen-locales)
|
|
|
|
$(objpfx)tst-fnmatch4.out: $(gen-locales)
|
|
|
|
$(objpfx)tst-fnmatch5.out: $(gen-locales)
|
2020-09-16 18:41:14 +08:00
|
|
|
$(objpfx)tst-fnmatch6.out: $(gen-locales)
|
2015-10-12 18:24:41 +08:00
|
|
|
$(objpfx)tst-regex.out: $(gen-locales)
|
|
|
|
$(objpfx)tst-regex2.out: $(gen-locales)
|
|
|
|
$(objpfx)tst-regexloc.out: $(gen-locales)
|
|
|
|
$(objpfx)tst-rxspencer.out: $(gen-locales)
|
|
|
|
$(objpfx)tst-rxspencer-no-utf8.out: $(gen-locales)
|
2018-08-28 18:57:46 +08:00
|
|
|
$(objpfx)tst-regcomp-truncated.out: $(gen-locales)
|
1999-03-21 01:16:44 +08:00
|
|
|
endif
|
1997-09-16 08:42:43 +08:00
|
|
|
|
2010-08-25 02:55:53 +08:00
|
|
|
# If we will use the generic uname implementation, we must figure out what
|
|
|
|
# it will say by examining the system, and write the results in config-name.h.
|
|
|
|
uname.c: $(objpfx)config-name.h
|
|
|
|
$(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make
|
2012-09-29 05:48:17 +08:00
|
|
|
$(make-target-directory)
|
2010-08-25 02:55:53 +08:00
|
|
|
$< '$(config-os)' '$(config-release)' \
|
|
|
|
'$(config-machine)-$(config-vendor)' > $@.new
|
|
|
|
mv -f $@.new $@
|
|
|
|
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
|
2022-03-11 21:40:44 +08:00
|
|
|
CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
|
2022-03-11 21:40:44 +08:00
|
|
|
CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-sleep.c += -fexceptions
|
|
|
|
CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-waitid.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables
|
2019-12-20 20:59:11 +08:00
|
|
|
CFLAGS-wait4.c += -fexceptions -fasynchronous-unwind-tables
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-getopt.c += -fexceptions
|
|
|
|
CFLAGS-wordexp.c += -fexceptions
|
2005-01-23 12:42:14 +08:00
|
|
|
CFLAGS-wordexp.os = -fomit-frame-pointer
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-sysconf.c += -fexceptions -DGETCONF_DIR='"$(libexecdir)/getconf"'
|
|
|
|
CFLAGS-pathconf.c += -fexceptions
|
|
|
|
CFLAGS-fpathconf.c += -fexceptions
|
|
|
|
CFLAGS-spawn.c += -fexceptions
|
2005-01-23 12:42:14 +08:00
|
|
|
CFLAGS-spawn.os = -fomit-frame-pointer
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-spawnp.c += -fexceptions
|
2005-01-23 12:42:14 +08:00
|
|
|
CFLAGS-spawnp.os = -fomit-frame-pointer
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-spawni.c += -fexceptions
|
2005-01-23 12:42:14 +08:00
|
|
|
CFLAGS-spawni.os = -fomit-frame-pointer
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-glob.c += $(uses-callbacks) -fexceptions
|
|
|
|
CFLAGS-glob64.c += $(uses-callbacks) -fexceptions
|
|
|
|
CFLAGS-getconf.c += -DGETCONF_DIR='"$(libexecdir)/getconf"'
|
2005-01-23 12:42:14 +08:00
|
|
|
CFLAGS-execve.os = -fomit-frame-pointer
|
|
|
|
CFLAGS-fexecve.os = -fomit-frame-pointer
|
|
|
|
CFLAGS-execv.os = -fomit-frame-pointer
|
|
|
|
CFLAGS-execle.os = -fomit-frame-pointer
|
|
|
|
CFLAGS-execl.os = -fomit-frame-pointer
|
|
|
|
CFLAGS-execvp.os = -fomit-frame-pointer
|
|
|
|
CFLAGS-execlp.os = -fomit-frame-pointer
|
2017-12-12 05:11:16 +08:00
|
|
|
CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
|
2022-03-11 21:40:44 +08:00
|
|
|
CFLAGS-fork.c = $(libio-mtsafe) $(config-cflags-wno-ignored-attributes)
|
Update.
2003-06-15 Ulrich Drepper <drepper@redhat.com>
Fix cancellation point handling wrt exception based cleanup.
* io/Makefile: Compile fcntl.c, poll.c, and lockf.c with exceptions.
* misc/Makefile: Compile pselect.c, readv.c, writev.c, and usleep.c
with exceptions.
* posix/Makefile: Compile pread.c, pread64.c, pwrite.c, pwrite64.c,
sleep.c, wait.c, waitid.c, and waitpid.c with exceptions.
* rt/Makefile: Compile aio_suspend.c and clock_nanosleep.c with
exceptions.
* signal/Makefile: Compile sigpause.c, sigsuspend.c, sigtimedwait.c,
sigwait.c, and sigwaitinfo.c with exceptions.
* stdlib/Makefile: Compile system.c with exceptions.
* sysvipc/Makefile: Compile msgrcv.c and msgsnd.c with exceptions.
* termios/Makefile: Compile tcdrain.c with exceptions.
* sysdeps/generic/lockf.c: Add comment explaining the cancellation
situation.
* sysdeps/generic/pselect.c: Likewise.
* sysdeps/posix/sigpause.c: Likewise.
* sysdeps/posix/system.c: Likewise.
* sysdeps/posix/waitid.c: Likewise.
* sysdeps/unix/sysv/linux/sleep.c: Likewise.
* sysdeps/unix/sysv/linux/usleep.c: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h: Major rewrite of
INTERNAL_SYSCALL to not use push inside asm statement so that
unwind info is correct around the syscall.
* sysdeps/unix/clock_nanosleep.c: Add cancellation support.
* sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise.
2003-06-16 05:22:26 +08:00
|
|
|
|
2000-05-17 19:04:21 +08:00
|
|
|
tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
|
2000-09-07 02:07:07 +08:00
|
|
|
--none random --col --color --colour
|
Wed Jan 24 04:18:36 1996 Paul Eggert <eggert@twinsun.com>
* strftime.c (strftime):
When invoking self, check whether the subsidiary invocation failed.
Use "???" (not "") to denote unknown time zone information.
Make this source file portable to standalone contexts (e.g. GNU Emacs).
<config.h>: Include if HAVE_CONFIG_H is defined.
(HAVE_LIMITS_H, HAVE_MBLEN, HAVE_TM_ZONE, STDC_HEADERS): New symbols,
defined if _LIBC or if <config.h> defines them.
<ansidecl.h>, "../locale/localeinfo.h": Include only if _LIBC.
<sys/types.h>: New include; some hosts require it for `time_t'.
<ctype.h>: Include only if HAVE_MBLEN (since it's only needed then).
<limits.h>: Include only if HAVE_LIMITS_H.
<stddef.h, stdlib.h, string.h>: Include only if STDC_HEADERS.
(memcpy): Define in terms of bcopy if !STDC_HEADERS.
(__P, PTR): Define if not already defined.
(__tzname, __daylight, __timezone): Remove macros; no longer needed.
(add, strftime): Don't use NULL, for portability to some weird hosts.
(fmt): If !_LIBC, don't assume sprintf returns a count.
(week, strftime): Use old-style function declarations.
(weekday_name, month_name): New constants.
(strftime): Use traditional C values if locale support isn't available.
Use `const' instead of CONST. For time zones, use tm_zone if
possible, then fall back on tzname. Don't check for multibyte
characters unless mblen is supported. Use formats like %02d instead
of %.2d, for portability to older hosts.
Wed Jan 24 04:18:36 1996 Paul Eggert <eggert@twinsun.com>
* strftime.c (strftime):
When invoking self, check whether the subsidiary invocation failed.
Use "???" (not "") to denote unknown time zone information.
Make this source file portable to standalone contexts (e.g. GNU Emacs).
<config.h>: Include if HAVE_CONFIG_H is defined.
(HAVE_LIMITS_H, HAVE_MBLEN, HAVE_TM_ZONE, STDC_HEADERS): New symbols,
defined if _LIBC or if <config.h> defines them.
<ansidecl.h>, "../locale/localeinfo.h": Include only if _LIBC.
<sys/types.h>: New include; some hosts require it for `time_t'.
<ctype.h>: Include only if HAVE_MBLEN (since it's only needed then).
<limits.h>: Include only if HAVE_LIMITS_H.
<stddef.h, stdlib.h, string.h>: Include only if STDC_HEADERS.
(memcpy): Define in terms of bcopy if !STDC_HEADERS.
(__P, PTR): Define if not already defined.
(__tzname, __daylight, __timezone): Remove macros; no longer needed.
(add, strftime): Don't use NULL, for portability to some weird hosts.
(fmt): If !_LIBC, don't assume sprintf returns a count.
(week, strftime): Use old-style function declarations.
(weekday_name, month_name): New constants.
(strftime): Use traditional C values if locale support isn't available.
Use `const' instead of CONST. For time zones, use tm_zone if
possible, then fall back on tzname. Don't check for multibyte
characters unless mblen is supported. Use formats like %02d instead
of %.2d, for portability to older hosts.
Wed Jan 24 00:07:52 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* stdio-common/vfscanf.c (GROUP, MALLOC): New flag macros.
(__vfscanf): Eliminate flag vars that were redundant with FLAGS bits.
Fix bug in recognition of %ll flag for long long.
Fix overeager checks for conflicting type modifiers.
With ' flag, match thousands separators for decimal numbers.
Tue Jan 23 22:02:40 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/Makefile (CFLAGS-locfile-lex.c): New variable.
* resolv/Makefile (CFLAGS): Disable some warnings.
* sysdeps/generic/Makefile (elided-routines): Removed hypot.
(+gccwarn): Set with override.
* stdio-common/Makefile (CFLAGS-tst-printf.c): New variable.
* posix/Makefile (CFLAGS-regex.c): New variable.
* malloc/Makefile (CFLAGS-obstack.c): New variable.
* io/Makefile (CFLAGS-fts.c): New variable.
* io/fts.c (fts_open): Use prototypes for COMPAR decl.
Tue Jan 23 21:35:32 1996 Miles Bader <miles@gnu.ai.mit.edu>
* sysdeps/mach/hurd/bind.c (bind): Ensure NAME for the AF_LOCAL
case is '\0'-terminated.
Tue Jan 23 19:49:54 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* elf/rtld.c (dl_main): Support additional args in --list mode for
debugging: look them up as symbol names and print values.
* misc/getttyent.c (skip, value): Declare with prototypes in file
scope.
* csu/initfini.c (_init): Explicitly set a variable that is
pointer to volatile with the address of __gmon_start__, to avoid
the test being optimized out.
1996-01-24 14:03:37 +08:00
|
|
|
|
2013-01-11 23:14:18 +08:00
|
|
|
tst-exec-ARGS = -- $(host-test-program-cmd)
|
2013-01-11 06:14:55 +08:00
|
|
|
tst-exec-static-ARGS = $(tst-exec-ARGS)
|
posix: execvpe cleanup
This patch removes all the dynamic allocation on execvpe code and
instead use direct stack allocation. This is QoI approach to make
it possible use in scenarios where memory is shared with parent
(vfork or clone with CLONE_VM).
For default process spawn (script file without a shebang), stack
allocation is bounded by NAME_MAX plus PATH_MAX plus 1. Large
file arguments returns an error (ENAMETOOLONG). This differs than
current GLIBC pratice in general, but it used to limit stack
allocation for large inputs. Also, path in PATH environment variable
larger than PATH_MAX are ignored.
The shell direct execution exeception, where execve returns ENOEXEC,
might requires a large stack allocation due large input argument list.
Tested on i686, x86_64, powerpc64le, and aarch64.
* posix/execvpe.c (__execvpe): Remove dynamic allocation.
* posix/Makefile (tests): Add tst-execvpe{1,2,3,4,5,6}.
* posix/tst-execvp1.c (do_test): Use a macro to call execvp.
* posix/tst-execvp2.c (do_test): Likewise.
* posix/tst-execvp3.c (do_test): Likewise.
* posix/tst-execvp4.c (do_test): Likewise.
* posix/tst-execvpe1.c: New file.
* posix/tst-execvpe2.c: Likewise.
* posix/tst-execvpe3.c: Likewise.
* posix/tst-execvpe4.c: Likewise.
* posix/tst-execvpe5.c: Likewise.
* posix/tst-execvpe6.c: Likewise.
2016-01-22 19:58:49 +08:00
|
|
|
tst-execvpe5-ARGS = -- $(host-test-program-cmd)
|
2013-01-11 23:14:18 +08:00
|
|
|
tst-spawn-ARGS = -- $(host-test-program-cmd)
|
2013-01-11 06:14:55 +08:00
|
|
|
tst-spawn-static-ARGS = $(tst-spawn-ARGS)
|
2021-03-10 23:26:33 +08:00
|
|
|
tst-spawn5-ARGS = -- $(host-test-program-cmd)
|
posix: Add terminal control setting support for posix_spawn
Currently there is no proper way to set the controlling terminal through
posix_spawn in race free manner [1]. This forces shell implementations
to keep using fork+exec when launching background process groups,
even when using posix_spawn yields better performance.
This patch adds a new GNU extension so the creating process can
configure the created process terminal group. This is done with a new
flag, POSIX_SPAWN_TCSETPGROUP, along with two new attribute functions:
posix_spawnattr_tcsetpgrp_np, and posix_spawnattr_tcgetpgrp_np.
The function sets a new attribute, spawn-tcgroupfd, that references to
the controlling terminal.
The controlling terminal is set after the spawn-pgroup attribute, and
uses the spawn-tcgroupfd along with current creating process group
(so it is composable with POSIX_SPAWN_SETPGROUP).
To create a process and set the controlling terminal, one can use the
following sequence:
posix_spawnattr_t attr;
posix_spawnattr_init (&attr);
posix_spawnattr_setflags (&attr, POSIX_SPAWN_TCSETPGROUP);
posix_spawnattr_tcsetpgrp_np (&attr, tcfd);
If the idea is also to create a new process groups:
posix_spawnattr_t attr;
posix_spawnattr_init (&attr);
posix_spawnattr_setflags (&attr, POSIX_SPAWN_TCSETPGROUP
| POSIX_SPAWN_SETPGROUP);
posix_spawnattr_tcsetpgrp_np (&attr, tcfd);
posix_spawnattr_setpgroup (&attr, 0);
The controlling terminal file descriptor is ignored if the new flag is
not set.
This interface is slight different than the one provided by QNX [2],
which only provides the POSIX_SPAWN_TCSETPGROUP flag. The QNX
documentation does not specify how the controlling terminal is obtained
nor how it iteracts with POSIX_SPAWN_SETPGROUP. Since a glibc
implementation is library based, it is more straightforward and avoid
requires additional file descriptor operations to request the caller
to setup the controlling terminal file descriptor (and it also allows
a bit less error handling by posix_spawn).
Checked on x86_64-linux-gnu and i686-linux-gnu.
[1] https://github.com/ksh93/ksh/issues/79
[2] https://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/p/posix_spawn.html
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-15 01:41:31 +08:00
|
|
|
tst-spawn6-ARGS = -- $(host-test-program-cmd)
|
2023-01-12 21:58:51 +08:00
|
|
|
tst-spawn7-ARGS = -- $(host-test-program-cmd)
|
posix: Add pidfd_spawn and pidfd_spawnp (BZ 30349)
Returning a pidfd allows a process to keep a race-free handle for a
child process, otherwise, the caller will need to either use pidfd_open
(which still might be subject to TOCTOU) or keep the old racy interface
base on pid_t.
To correct use pifd_spawn, the kernel must support not only returning
the pidfd with clone/clone3 but also waitid (P_PIDFD) (added on Linux
5.4). If kernel does not support the waitid, pidfd return ENOSYS.
It avoids the need to racy workarounds, such as reading the procfs
fdinfo to get the pid to use along with other wait interfaces.
These interfaces are similar to the posix_spawn and posix_spawnp, with
the only difference being it returns a process file descriptor (int)
instead of a process ID (pid_t). Their prototypes are:
int pidfd_spawn (int *restrict pidfd,
const char *restrict file,
const posix_spawn_file_actions_t *restrict facts,
const posix_spawnattr_t *restrict attrp,
char *const argv[restrict],
char *const envp[restrict])
int pidfd_spawnp (int *restrict pidfd,
const char *restrict path,
const posix_spawn_file_actions_t *restrict facts,
const posix_spawnattr_t *restrict attrp,
char *const argv[restrict_arr],
char *const envp[restrict_arr]);
A new symbol is used instead of a posix_spawn extension to avoid
possible issues with language bindings that might track the return
argument lifetime. Although on Linux pid_t and int are interchangeable,
POSIX only states that pid_t should be a signed integer.
Both symbols reuse the posix_spawn posix_spawn_file_actions_t and
posix_spawnattr_t, to void rehash posix_spawn API or add a new one. It
also means that both interfaces support the same attribute and file
actions, and a new flag or file action on posix_spawn is also added
automatically for pidfd_spawn.
Also, using posix_spawn plumbing allows the reusing of most of the
current testing with some changes:
- waitid is used instead of waitpid since it is a more generic
interface.
- tst-posix_spawn-setsid.c is adapted to take into consideration that
the caller can check for session id directly. The test now spawns
itself and writes the session id as a file instead.
- tst-spawn3.c need to know where pidfd_spawn is used so it keeps an
extra file description unused.
Checked on x86_64-linux-gnu on Linux 4.15 (no CLONE_PIDFD or waitid
support), Linux 5.4 (full support), and Linux 6.2.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2023-08-25 00:42:18 +08:00
|
|
|
tst-posix_spawn-setsid-ARGS = -- $(host-test-program-cmd)
|
2000-11-10 03:22:09 +08:00
|
|
|
tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
|
2010-04-10 04:59:34 +08:00
|
|
|
tst-chmod-ARGS = $(objdir)
|
2007-01-04 07:02:17 +08:00
|
|
|
tst-vfork3-ARGS = --test-dir=$(objpfx)
|
2000-05-29 12:40:43 +08:00
|
|
|
|
2003-11-21 07:36:40 +08:00
|
|
|
tst-rxspencer-ARGS = --utf8 rxspencer/tests
|
Split up rules for tests using mtrace and something else.
Most glibc tests that use mtrace to verify that there were no memory
leaks from the glibc facilities used in a given test depend on the
.out file of the previous test so that the mtrace test runs mtrace and
nothing else.
Two, however, have a single target combining mtrace with something
else. In the case of libio/tst-fopenloc.check, the test both compares
the output with an expected baseline and runs mtrace. In the case of
posix/tst-rxspencer-mem, the test is run (with different command line
from the main run) and then mtrace is run, from the same makefile
target.
This patch splits both of these tests up to use separate makefile
targets for each thing tested; in the tst-rxspencer case, a file
tst-rxspencer-no-utf8.c is created that just includes tst-rxspencer.c,
as is usual for tests where the same code gets tested in different
compile-time or runtime configurations.
Adding $(evaluate-test) to test commands, as in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html>, will no
longer need to insert && between multiple commands, as all tests will
either have just a single command or already use &&.
Tested x86_64.
* libio/Makefile ($(objpfx)tst-fopenloc.check): Split into
separate $(objpfx)tst-fopenloc-cmp.out and
$(objpfx)tst-fopenloc-mem.out targets.
(tests): Update dependencies.
* posix/Makefile (tests variable): Add tst-rxspencer-no-utf8.
(generated): Change tst-rxspencer-mem and tst-rxspencer.mtrace to
tst-rxspencer-no-utf8-mem and tst-rxspencer-no-utf8.mtrace.
(tst-rxspencer-no-utf8-ARGS): New variable.
(tst-rxspencer-no-utf8-ENV): Likewise.
(tests target): Depend on $(objpfx)tst-rxspencer-no-utf8-mem
instead of $(objpfx)tst-rxspencer-mem.
($(objpfx)tst-rxspencer-mem): Change target to
$(objpfx)tst-rxspencer-no-utf8-mem. Depend on
$(objpfx)tst-rxspencer-no-utf8.out instead of running test program.
* posix/tst-rxspencer-no-utf8.c: New file.
2014-02-14 21:45:14 +08:00
|
|
|
tst-rxspencer-no-utf8-ARGS = rxspencer/tests
|
2003-12-04 16:04:57 +08:00
|
|
|
tst-pcre-ARGS = PCRE.tests
|
|
|
|
tst-boost-ARGS = BOOST.tests
|
2004-10-01 07:13:17 +08:00
|
|
|
bug-glob1-ARGS = "$(objpfx)"
|
2005-04-15 05:20:51 +08:00
|
|
|
tst-execvp3-ARGS = --test-dir=$(objpfx)
|
Fix hardcoded /tmp paths in testing (bug 13888).
As noted in bug 13888, and as I noted previously in
<https://sourceware.org/ml/libc-alpha/2000-10/msg00111.html>, various
tests used hardcoded paths in /tmp, so posing issues for simultaneous
test runs from different build directories.
This patch fixes such uses of hardcoded file names to put them in the
build directory instead (in the case of stdio-common/bug5 the file
names are changed as well, to avoid a conflict with the name bug5.out
also used for the automatic test output redirection). It also fixes
test-installation.pl likewise (that was using filenames with $$ in
them rather than strictly hardcoded names, but that's still not good
practice for temporary file naming).
Note that my list of files changed is not identical to that in bug
13888. I added tst-spawn3.c and test-installation.pl, and removed
some tests that seem to me (now) to create temporary files securely
(simply using /tmp is not itself a problem if the temporary files are
handled properly with mkstemp; I haven't checked whether those tests
used to do things insecurely). conformtest is not changed because the
makefiles always pass a --tmpdir option so the /tmp default is
irrelevant, and for the same reason there is no actual problem with
nptl/tst-umask1.c because again the makefiles always override the
default.
nptl/sockperf.c is ignored because there is no code to run it;
probably that file should actually be removed.
Some tests use the mktemp function, but I think they all use it in a
way that *is* secure (for generating names for directories / sockets /
fifos / symlinks, where the operation using the name will not follow
symlinks and so there is no potential for a symlink attack on the
account running the testsuite).
Some tests use the tmpnam function to generate temporary file names.
This is in principle insecure, but not addressed by this patch (I
consider it a separate issue from the fully hardcoded paths).
Tested for x86_64.
[BZ #13888]
* posix/Makefile (CFLAGS-tst-spawn3.c): New variable.
* posix/tst-spawn3.c (do_test): Put tst-spwan3.pid in OBJPFX, not
/tmp.
* scripts/test-installation.pl: Put temporary files in build
directory, not /tmp.
* stdio-common/Makefile (CFLAGS-bug3.c): New variable.
(CFLAGS-bug4.c): Likewise.
(CFLAGS-bug5.c): Likewise.
(CFLAGS-test-fseek.c): Likewise.
(CFLAGS-test-popen.c): Likewise.
(CFLAGS-test_rdwr.c): Likewise.
* stdio-common/bug3.c (main): Put temporary file in OBJPFX, not
/tmp.
* stdio-common/bug4.c (main): Likewise.
* stdio-common/bug5.c (main): Likewise.
* stdio-common/test-fseek.c (TESTFILE): Likewise.
* stdio-common/test-popen.c (do_test): Likewise.
* stdio-common/test_rdwr.c (main): Likewise.
2018-06-27 05:48:48 +08:00
|
|
|
CFLAGS-tst-spawn3.c += -DOBJPFX=\"$(objpfx)\"
|
2000-07-04 16:14:33 +08:00
|
|
|
|
2023-03-17 17:17:28 +08:00
|
|
|
# Test voluntarily overflows struct dirent
|
|
|
|
CFLAGS-bug-glob2.c += $(no-fortify-source)
|
|
|
|
|
2018-11-29 20:51:25 +08:00
|
|
|
$(objpfx)testcases.h: TESTS TESTS2C.sed
|
2013-03-09 12:31:23 +08:00
|
|
|
LC_ALL=C sed -f TESTS2C.sed < $< > $@T
|
2018-11-29 20:51:25 +08:00
|
|
|
mv $@T $@
|
|
|
|
$(objpfx)runtests.o: $(objpfx)testcases.h
|
1998-05-17 23:44:39 +08:00
|
|
|
|
2018-11-29 20:51:25 +08:00
|
|
|
$(objpfx)ptestcases.h: PTESTS PTESTS2C.sed
|
2013-03-09 12:31:23 +08:00
|
|
|
LC_ALL=C sed -f PTESTS2C.sed < $< > $@T
|
2018-11-29 20:51:25 +08:00
|
|
|
mv $@T $@
|
|
|
|
$(objpfx)runptests.o: $(objpfx)ptestcases.h
|
1998-06-30 20:09:42 +08:00
|
|
|
|
getopt: clean up error reporting
getopt can print a whole bunch of error messages, and when used
standalone (from gnulib) it uses fprintf to do that. But fprintf is a
cancellation point and getopt isn't, and also applying fprintf to a
stream in wide-character mode is not allowed.
glibc has an internal function called __fxprintf that writes a narrow
format string to a stream regardless of mode, but it only handles
ASCII format strings, and it's still a cancellation point. getopt's
messages are translated, so they might not be ASCII. So getopt has an
error message to an asprintf buffer, monkeys with internal flag bits
on stderr to disable cancellation, and then calls
__fxprintf(stderr, "%s", buffer). There isn't even a helper function,
the code is duplicated every time.
This patch fixes __fxprintf to handle arbitrary multibyte format
strings, and adds a variant __fxprintf_nocancel that does the same
thing but also isn't a cancellation point. (It still _works_ by
monkeying with internal flag bits on the FILE, but that's not really a
layering violation for code in stdio-common.) All of the #ifdef _LIBC
blocks can then be reduced to their standalone versions with a little
help from some macros at the top of the file.
I also wrote a test case to verify that getopt really isn't a
cancellation point, and I'm glad I did, because it found two bugs, one
of which wasn't even to do with cancellation (see previous patch).
* stdio-common/fxprintf.c (__fxprintf_nocancel): New function.
(locked_vfxprintf): New helper function. Handle arbitrary
multibyte strings, not just ASCII.
* include/stdio.h: Declare __fxprintf_nocancel.
* posix/getopt.c: When _LIBC is defined, define fprintf to
__fxprintf_nocancel, flockfile to _IO_flockfile, and
funlockfile to _IO_funlockfile. When neither _LIBC nor
_POSIX_THREAD_SAFE_FUNCTIONS is defined, define flockfile and
funlockfile as no-ops. (_getopt_internal_r): Remove all
internal #ifdef _LIBC blocks; the standalone error-printing
code can now be used for libc as well. Add an
flockfile/funlockfile pair around one case where the error
message is printed in several chunks. Don't use fputc.
* posix/tst-getopt-cancel.c: New test.
* posix/Makefile: Run it.
2017-04-01 22:17:44 +08:00
|
|
|
$(objpfx)tst-getopt-cancel: $(shared-thread-library)
|
2021-01-19 20:26:31 +08:00
|
|
|
$(objpfx)tst-_Fork: $(shared-thread-library)
|
getopt: clean up error reporting
getopt can print a whole bunch of error messages, and when used
standalone (from gnulib) it uses fprintf to do that. But fprintf is a
cancellation point and getopt isn't, and also applying fprintf to a
stream in wide-character mode is not allowed.
glibc has an internal function called __fxprintf that writes a narrow
format string to a stream regardless of mode, but it only handles
ASCII format strings, and it's still a cancellation point. getopt's
messages are translated, so they might not be ASCII. So getopt has an
error message to an asprintf buffer, monkeys with internal flag bits
on stderr to disable cancellation, and then calls
__fxprintf(stderr, "%s", buffer). There isn't even a helper function,
the code is duplicated every time.
This patch fixes __fxprintf to handle arbitrary multibyte format
strings, and adds a variant __fxprintf_nocancel that does the same
thing but also isn't a cancellation point. (It still _works_ by
monkeying with internal flag bits on the FILE, but that's not really a
layering violation for code in stdio-common.) All of the #ifdef _LIBC
blocks can then be reduced to their standalone versions with a little
help from some macros at the top of the file.
I also wrote a test case to verify that getopt really isn't a
cancellation point, and I'm glad I did, because it found two bugs, one
of which wasn't even to do with cancellation (see previous patch).
* stdio-common/fxprintf.c (__fxprintf_nocancel): New function.
(locked_vfxprintf): New helper function. Handle arbitrary
multibyte strings, not just ASCII.
* include/stdio.h: Declare __fxprintf_nocancel.
* posix/getopt.c: When _LIBC is defined, define fprintf to
__fxprintf_nocancel, flockfile to _IO_flockfile, and
funlockfile to _IO_funlockfile. When neither _LIBC nor
_POSIX_THREAD_SAFE_FUNCTIONS is defined, define flockfile and
funlockfile as no-ops. (_getopt_internal_r): Remove all
internal #ifdef _LIBC blocks; the standalone error-printing
code can now be used for libc as well. Add an
flockfile/funlockfile pair around one case where the error
message is printed in several chunks. Don't use fputc.
* posix/tst-getopt-cancel.c: New test.
* posix/Makefile: Run it.
2017-04-01 22:17:44 +08:00
|
|
|
|
2014-02-27 11:25:27 +08:00
|
|
|
test-xfail-annexc = yes
|
2000-07-23 09:23:29 +08:00
|
|
|
$(objpfx)annexc.out: $(objpfx)annexc
|
2014-02-27 11:25:27 +08:00
|
|
|
$(dir $<)$(notdir $<) '$(CC)' \
|
2014-02-22 05:48:08 +08:00
|
|
|
'$(patsubst %,-I../%,$(sorted-subdirs)) -I../include $(+sysdep-includes) $(sysincludes) -I..' > $@; \
|
|
|
|
$(evaluate-test)
|
1998-06-30 20:09:42 +08:00
|
|
|
|
2001-09-13 02:50:25 +08:00
|
|
|
annexc-CFLAGS = -O
|
1998-06-30 20:09:42 +08:00
|
|
|
$(objpfx)annexc: annexc.c
|
|
|
|
$(native-compile)
|
2001-02-10 14:19:01 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
tst-fnmatch-ENV += MALLOC_TRACE=$(objpfx)tst-fnmatch.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2010-11-12 16:51:28 +08:00
|
|
|
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)tst-fnmatch-mem.out: $(objpfx)tst-fnmatch.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-fnmatch.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2010-11-12 16:51:28 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2001-02-10 14:19:01 +08:00
|
|
|
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)bug-regex2-mem.out: $(objpfx)bug-regex2.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex2.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2001-04-23 01:37:40 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
bug-regex14-ENV = MALLOC_TRACE=$(objpfx)bug-regex14.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2002-10-24 08:22:27 +08:00
|
|
|
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)bug-regex14-mem.out: $(objpfx)bug-regex14.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex14.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2002-10-24 08:22:27 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
bug-regex21-ENV = MALLOC_TRACE=$(objpfx)bug-regex21.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
Update.
2003-11-19 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (extend_buffers): Don't allocate
twice as big state_log as needed. Don't modify pstr->valid_len
for mb_cur_max == 1 !icase !trans.
* posix/regcomp.c (free_bin_tree): Removed.
(create_tree): Add dfa argument. Don't call re_malloc for
each tree, instead allocate from str_tree_storage.
(re_dfa_add_tree_node): New function.
(free_dfa_content): Handle freeing if dfa->nodes == NULL
or dfa->state_table == NULL.
(re_compile_internal): Call free_dfa_content if init_dfa
fails. Call free_workarea_compile, re_string_destruct
and free_dfa_content for most of the other failure paths.
(init_dfa): Initialize str_tree_storage_idx.
Don't clear any fields on allocation failure.
(free_workarea_compile): Free str_tree_storage chunks
instead of free_bin_tree (dfa->str_tree).
(parse): Call re_dfa_add_tree_node instead of re_dfa_add_node
followed by create_tree. Add dfa argument to remaining
create_tree calls. Remove new_idx variable. Remove calls
to free_bin_tree.
(parse_reg_exp, parse_branch, parse_expression, parse_sub_exp,
parse_dup_op, parse_bracket_exp, build_charclass_op): Likewise.
(duplicate_tree): Remove calls to free_bin_tree, add dfa
argument to create_tree.
* posix/regex_internal.h (BIN_TREE_STORAGE_SIZE): Define.
(bin_tree_storage_t): New type.
(re_dfa_t): Add str_tree_storage and str_tree_storage_idx
fields.
* posix/Makefile (tests): Add bug-regex21.
(generated): Add bug-regex21-mem, bug-regex21.mtrace,
tst-rxspencer-mem and tst-rxspencer.mtrace.
(tests): Depend on $(objpfx)bug-regex21-mem
and $(objpfx)tst-rxspencer-mem.
(bug-regex21-ENV, tst-rxspencer-ENV): Set.
($(objpfx)bug-regex21-mem, $(objpfx)tst-rxspencer-mem): New.
* posix/tst-rxspencer.c (main): Add call to mtrace.
Free line at the end.
* posix/bug-regex21.c: New test.
* posix/regexec.c (get_subexp): After calling get_subexp_sub
2003-11-20 03:37:31 +08:00
|
|
|
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)bug-regex21-mem.out: $(objpfx)bug-regex21.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
Update.
2003-11-19 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (extend_buffers): Don't allocate
twice as big state_log as needed. Don't modify pstr->valid_len
for mb_cur_max == 1 !icase !trans.
* posix/regcomp.c (free_bin_tree): Removed.
(create_tree): Add dfa argument. Don't call re_malloc for
each tree, instead allocate from str_tree_storage.
(re_dfa_add_tree_node): New function.
(free_dfa_content): Handle freeing if dfa->nodes == NULL
or dfa->state_table == NULL.
(re_compile_internal): Call free_dfa_content if init_dfa
fails. Call free_workarea_compile, re_string_destruct
and free_dfa_content for most of the other failure paths.
(init_dfa): Initialize str_tree_storage_idx.
Don't clear any fields on allocation failure.
(free_workarea_compile): Free str_tree_storage chunks
instead of free_bin_tree (dfa->str_tree).
(parse): Call re_dfa_add_tree_node instead of re_dfa_add_node
followed by create_tree. Add dfa argument to remaining
create_tree calls. Remove new_idx variable. Remove calls
to free_bin_tree.
(parse_reg_exp, parse_branch, parse_expression, parse_sub_exp,
parse_dup_op, parse_bracket_exp, build_charclass_op): Likewise.
(duplicate_tree): Remove calls to free_bin_tree, add dfa
argument to create_tree.
* posix/regex_internal.h (BIN_TREE_STORAGE_SIZE): Define.
(bin_tree_storage_t): New type.
(re_dfa_t): Add str_tree_storage and str_tree_storage_idx
fields.
* posix/Makefile (tests): Add bug-regex21.
(generated): Add bug-regex21-mem, bug-regex21.mtrace,
tst-rxspencer-mem and tst-rxspencer.mtrace.
(tests): Depend on $(objpfx)bug-regex21-mem
and $(objpfx)tst-rxspencer-mem.
(bug-regex21-ENV, tst-rxspencer-ENV): Set.
($(objpfx)bug-regex21-mem, $(objpfx)tst-rxspencer-mem): New.
* posix/tst-rxspencer.c (main): Add call to mtrace.
Free line at the end.
* posix/bug-regex21.c: New test.
* posix/regexec.c (get_subexp): After calling get_subexp_sub
2003-11-20 03:37:31 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2010-10-12 00:34:53 +08:00
|
|
|
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)bug-regex31-mem.out: $(objpfx)bug-regex31.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2010-10-12 00:34:53 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
bug-regex36-ENV = MALLOC_TRACE=$(objpfx)bug-regex36.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2014-06-19 21:38:03 +08:00
|
|
|
|
|
|
|
$(objpfx)bug-regex36-mem.out: $(objpfx)bug-regex36.out
|
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex36.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2007-01-04 07:02:17 +08:00
|
|
|
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)tst-vfork3-mem.out: $(objpfx)tst-vfork3.out
|
2021-07-22 21:08:02 +08:00
|
|
|
{ test -r $(objpfx)tst-vfork3.mtrace \
|
|
|
|
|| ( echo "tst-vfork3.mtrace does not exist"; exit 77; ) \
|
|
|
|
&& $(common-objpfx)malloc/mtrace $(objpfx)tst-vfork3.mtrace; } > $@; \
|
2014-02-22 05:48:08 +08:00
|
|
|
$(evaluate-test)
|
2007-01-04 07:02:17 +08:00
|
|
|
|
Split up rules for tests using mtrace and something else.
Most glibc tests that use mtrace to verify that there were no memory
leaks from the glibc facilities used in a given test depend on the
.out file of the previous test so that the mtrace test runs mtrace and
nothing else.
Two, however, have a single target combining mtrace with something
else. In the case of libio/tst-fopenloc.check, the test both compares
the output with an expected baseline and runs mtrace. In the case of
posix/tst-rxspencer-mem, the test is run (with different command line
from the main run) and then mtrace is run, from the same makefile
target.
This patch splits both of these tests up to use separate makefile
targets for each thing tested; in the tst-rxspencer case, a file
tst-rxspencer-no-utf8.c is created that just includes tst-rxspencer.c,
as is usual for tests where the same code gets tested in different
compile-time or runtime configurations.
Adding $(evaluate-test) to test commands, as in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html>, will no
longer need to insert && between multiple commands, as all tests will
either have just a single command or already use &&.
Tested x86_64.
* libio/Makefile ($(objpfx)tst-fopenloc.check): Split into
separate $(objpfx)tst-fopenloc-cmp.out and
$(objpfx)tst-fopenloc-mem.out targets.
(tests): Update dependencies.
* posix/Makefile (tests variable): Add tst-rxspencer-no-utf8.
(generated): Change tst-rxspencer-mem and tst-rxspencer.mtrace to
tst-rxspencer-no-utf8-mem and tst-rxspencer-no-utf8.mtrace.
(tst-rxspencer-no-utf8-ARGS): New variable.
(tst-rxspencer-no-utf8-ENV): Likewise.
(tests target): Depend on $(objpfx)tst-rxspencer-no-utf8-mem
instead of $(objpfx)tst-rxspencer-mem.
($(objpfx)tst-rxspencer-mem): Change target to
$(objpfx)tst-rxspencer-no-utf8-mem. Depend on
$(objpfx)tst-rxspencer-no-utf8.out instead of running test program.
* posix/tst-rxspencer-no-utf8.c: New file.
2014-02-14 21:45:14 +08:00
|
|
|
# tst-rxspencer.mtrace is not generated, only
|
|
|
|
# tst-rxspencer-no-utf8.mtrace, since otherwise the file has almost
|
|
|
|
# 100M and takes very long time to process.
|
2021-07-22 21:07:59 +08:00
|
|
|
tst-rxspencer-no-utf8-ENV += \
|
|
|
|
MALLOC_TRACE=$(objpfx)tst-rxspencer-no-utf8.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)tst-rxspencer-no-utf8-mem.out: $(objpfx)tst-rxspencer-no-utf8.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-rxspencer-no-utf8.mtrace \
|
|
|
|
> $@; \
|
|
|
|
$(evaluate-test)
|
Update.
2003-11-19 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (extend_buffers): Don't allocate
twice as big state_log as needed. Don't modify pstr->valid_len
for mb_cur_max == 1 !icase !trans.
* posix/regcomp.c (free_bin_tree): Removed.
(create_tree): Add dfa argument. Don't call re_malloc for
each tree, instead allocate from str_tree_storage.
(re_dfa_add_tree_node): New function.
(free_dfa_content): Handle freeing if dfa->nodes == NULL
or dfa->state_table == NULL.
(re_compile_internal): Call free_dfa_content if init_dfa
fails. Call free_workarea_compile, re_string_destruct
and free_dfa_content for most of the other failure paths.
(init_dfa): Initialize str_tree_storage_idx.
Don't clear any fields on allocation failure.
(free_workarea_compile): Free str_tree_storage chunks
instead of free_bin_tree (dfa->str_tree).
(parse): Call re_dfa_add_tree_node instead of re_dfa_add_node
followed by create_tree. Add dfa argument to remaining
create_tree calls. Remove new_idx variable. Remove calls
to free_bin_tree.
(parse_reg_exp, parse_branch, parse_expression, parse_sub_exp,
parse_dup_op, parse_bracket_exp, build_charclass_op): Likewise.
(duplicate_tree): Remove calls to free_bin_tree, add dfa
argument to create_tree.
* posix/regex_internal.h (BIN_TREE_STORAGE_SIZE): Define.
(bin_tree_storage_t): New type.
(re_dfa_t): Add str_tree_storage and str_tree_storage_idx
fields.
* posix/Makefile (tests): Add bug-regex21.
(generated): Add bug-regex21-mem, bug-regex21.mtrace,
tst-rxspencer-mem and tst-rxspencer.mtrace.
(tests): Depend on $(objpfx)bug-regex21-mem
and $(objpfx)tst-rxspencer-mem.
(bug-regex21-ENV, tst-rxspencer-ENV): Set.
($(objpfx)bug-regex21-mem, $(objpfx)tst-rxspencer-mem): New.
* posix/tst-rxspencer.c (main): Add call to mtrace.
Free line at the end.
* posix/bug-regex21.c: New test.
* posix/regexec.c (get_subexp): After calling get_subexp_sub
2003-11-20 03:37:31 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
tst-pcre-ENV = MALLOC_TRACE=$(objpfx)tst-pcre.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)tst-pcre-mem.out: $(objpfx)tst-pcre.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-pcre.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2003-12-04 16:04:57 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
tst-boost-ENV = MALLOC_TRACE=$(objpfx)tst-boost.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)tst-boost-mem.out: $(objpfx)tst-boost.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-boost.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2003-12-04 16:04:57 +08:00
|
|
|
|
2001-04-23 01:37:40 +08:00
|
|
|
$(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
|
2020-10-01 21:42:38 +08:00
|
|
|
$(SHELL) $< $(common-objpfx) '$(built-program-cmd)'; \
|
2014-02-22 05:48:08 +08:00
|
|
|
$(evaluate-test)
|
2001-06-28 00:15:39 +08:00
|
|
|
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)bug-ga2-mem.out: $(objpfx)bug-ga2.out
|
2020-11-25 15:30:17 +08:00
|
|
|
{ test -r $(objpfx)bug-ga2.mtrace \
|
|
|
|
|| ( echo "bug-ga2.mtrace does not exist"; exit 77; ) \
|
|
|
|
&& $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace; } > $@; \
|
2014-02-22 05:48:08 +08:00
|
|
|
$(evaluate-test)
|
2004-02-24 03:54:06 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
bug-ga2-ENV = MALLOC_TRACE=$(objpfx)bug-ga2.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2004-10-28 02:23:53 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
bug-glob2-ENV = MALLOC_TRACE=$(objpfx)bug-glob2.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2004-10-28 02:23:53 +08:00
|
|
|
|
2014-03-07 11:29:23 +08:00
|
|
|
$(objpfx)bug-glob2-mem.out: $(objpfx)bug-glob2.out
|
2014-02-22 05:48:08 +08:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2004-11-26 16:16:33 +08:00
|
|
|
|
2021-07-22 21:07:59 +08:00
|
|
|
tst-glob-tilde-ENV = MALLOC_TRACE=$(objpfx)tst-glob-tilde.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2017-10-22 00:03:30 +08:00
|
|
|
|
|
|
|
$(objpfx)tst-glob-tilde-mem.out: $(objpfx)tst-glob-tilde.out
|
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-glob-tilde.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
|
2007-08-02 17:59:18 +08:00
|
|
|
$(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
|
|
|
|
$(objpfx)getconf.speclist FORCE
|
2004-11-26 16:16:33 +08:00
|
|
|
$(addprefix $(..)./scripts/mkinstalldirs ,\
|
|
|
|
$(filter-out $(wildcard $@),$@))
|
2007-08-02 17:59:18 +08:00
|
|
|
while read spec; do \
|
|
|
|
ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
|
|
|
|
mv -f $@/$$spec.new $@/$$spec; \
|
|
|
|
done < $(objpfx)getconf.speclist
|
|
|
|
|
2012-11-17 09:49:19 +08:00
|
|
|
$(objpfx)getconf.speclist: getconf-speclist.c posix-envs.def
|
|
|
|
$(compile.c) -E -o - \
|
|
|
|
| sed -n -e '/@@@PRESENT_/s/@@@PRESENT_//p' > $@.new
|
2007-08-05 04:48:38 +08:00
|
|
|
mv -f $@.new $@
|
2013-01-10 08:05:32 +08:00
|
|
|
|
|
|
|
# This file is only actually needed at install time. But forcing it to
|
|
|
|
# be built both makes it available for eyeball inspection and avoids the
|
|
|
|
# surprise of things that look like compilation being done by 'make install'.
|
|
|
|
others: $(objpfx)getconf.speclist
|
2014-12-29 20:07:54 +08:00
|
|
|
|
|
|
|
$(objpfx)posix-conf-vars-def.h: $(..)scripts/gen-posix-conf-vars.awk \
|
|
|
|
posix-conf-vars.list Makefile
|
|
|
|
$(make-target-directory)
|
|
|
|
$(AWK) -f $(filter-out Makefile, $^) > $@.tmp
|
|
|
|
mv -f $@.tmp $@
|