mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
Fix conditionals on mtrace-based tests (bug 31892)
The conditionals for several mtrace-based tests in catgets, elf, libio, malloc, misc, nptl, posix, and stdio-common were incorrect leading to test failures when bootstrapping glibc without perl. The correct conditional for mtrace-based tests requires three checks: first checking for run-built-tests, then build-shared, and lastly that PERL is not equal to "no" (missing perl). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
4f7eb238d0
commit
a7fe3e805d
@ -43,8 +43,12 @@ tests-special += \
|
|||||||
$(objpfx)test-gencat.out \
|
$(objpfx)test-gencat.out \
|
||||||
$(objpfx)test1.cat \
|
$(objpfx)test1.cat \
|
||||||
$(objpfx)test2.cat \
|
$(objpfx)test2.cat \
|
||||||
$(objpfx)tst-catgets-mem.out
|
|
||||||
# tests-special
|
# tests-special
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
ifneq ($(PERL),no)
|
||||||
|
tests-special += $(objpfx)tst-catgets-mem.out
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gencat-modules = xmalloc
|
gencat-modules = xmalloc
|
||||||
@ -68,9 +72,17 @@ generated += \
|
|||||||
test1.h \
|
test1.h \
|
||||||
test2.cat \
|
test2.cat \
|
||||||
test2.h \
|
test2.h \
|
||||||
|
# generated
|
||||||
|
ifeq ($(run-built-tests),yes)
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
ifneq ($(PERL),no)
|
||||||
|
generated += \
|
||||||
tst-catgets-mem.out \
|
tst-catgets-mem.out \
|
||||||
tst-catgets.mtrace \
|
tst-catgets.mtrace \
|
||||||
# generated
|
# generated
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
generated-dirs += \
|
generated-dirs += \
|
||||||
de \
|
de \
|
||||||
|
10
elf/Makefile
10
elf/Makefile
@ -632,13 +632,19 @@ $(objpfx)tst-rtld-does-not-exist.out: tst-rtld-does-not-exist.sh $(objpfx)ld.so
|
|||||||
tests += $(tests-execstack-$(have-z-execstack))
|
tests += $(tests-execstack-$(have-z-execstack))
|
||||||
ifeq ($(run-built-tests),yes)
|
ifeq ($(run-built-tests),yes)
|
||||||
tests-special += \
|
tests-special += \
|
||||||
$(objpfx)noload-mem.out \
|
|
||||||
$(objpfx)tst-ldconfig-X.out \
|
$(objpfx)tst-ldconfig-X.out \
|
||||||
$(objpfx)tst-ldconfig-p.out \
|
$(objpfx)tst-ldconfig-p.out \
|
||||||
$(objpfx)tst-ldconfig-soname.out \
|
$(objpfx)tst-ldconfig-soname.out \
|
||||||
$(objpfx)tst-leaks1-mem.out \
|
|
||||||
$(objpfx)tst-rtld-help.out \
|
$(objpfx)tst-rtld-help.out \
|
||||||
# tests-special
|
# tests-special
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
ifneq ($(PERL),no)
|
||||||
|
tests-special += \
|
||||||
|
$(objpfx)noload-mem.out \
|
||||||
|
$(objpfx)tst-leaks1-mem.out \
|
||||||
|
# tests-special
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||||
tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||||
|
@ -261,15 +261,28 @@ tst-bz22415-ENV = MALLOC_TRACE=$(objpfx)tst-bz22415.mtrace \
|
|||||||
tst-bz24228-ENV = MALLOC_TRACE=$(objpfx)tst-bz24228.mtrace \
|
tst-bz24228-ENV = MALLOC_TRACE=$(objpfx)tst-bz24228.mtrace \
|
||||||
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
||||||
|
|
||||||
generated += test-fmemopen.mtrace test-fmemopen.check
|
|
||||||
generated += tst-fdopen-seek-failure.mtrace tst-fdopen-seek-failure.check
|
|
||||||
generated += tst-fopenloc.mtrace tst-fopenloc.check
|
|
||||||
generated += tst-bz22415.mtrace tst-bz22415.check
|
|
||||||
|
|
||||||
aux := fileops genops stdfiles stdio strops
|
aux := fileops genops stdfiles stdio strops
|
||||||
|
|
||||||
|
ifeq ($(run-built-tests),yes)
|
||||||
|
ifeq ($(build-shared),yes)
|
||||||
|
ifneq ($(PERL),no)
|
||||||
|
generated += \
|
||||||
|
test-fmemopen.check \
|
||||||
|
test-fmemopen.mtrace \
|
||||||
|
tst-bz22415.check \
|
||||||
|
tst-bz22415.mtrace \
|
||||||
|
tst-bz24228.check \
|
||||||
|
tst-bz24228.mtrace \
|
||||||
|
tst-fdopen-seek-failure.check \
|
||||||
|
tst-fdopen-seek-failure.mtrace \
|
||||||
|
tst-fopenloc.check \
|
||||||
|
tst-fopenloc.mtrace \
|
||||||
|
# generated
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(build-shared),yes)
|
ifeq ($(build-shared),yes)
|
||||||
generated += tst-bz24228.mtrace tst-bz24228.check
|
|
||||||
aux += oldfileops oldstdfiles
|
aux += oldfileops oldstdfiles
|
||||||
tests += \
|
tests += \
|
||||||
tst-stderr-compat \
|
tst-stderr-compat \
|
||||||
@ -286,16 +299,23 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \
|
|||||||
|
|
||||||
ifeq ($(run-built-tests),yes)
|
ifeq ($(run-built-tests),yes)
|
||||||
tests-special += \
|
tests-special += \
|
||||||
$(objpfx)test-fmemopen-mem.out \
|
|
||||||
$(objpfx)test-freopen.out \
|
$(objpfx)test-freopen.out \
|
||||||
$(objpfx)tst-bz22415-mem.out \
|
|
||||||
$(objpfx)tst-fdopen-seek-failure-mem.out \
|
|
||||||
# tests-special
|
# tests-special
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
# Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared
|
# Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared
|
||||||
# library is enabled since they depend on tst-fopenloc.out.
|
# library is enabled since they depend on tst-fopenloc.out.
|
||||||
tests-special += $(objpfx)tst-fopenloc-cmp.out $(objpfx)tst-fopenloc-mem.out \
|
tests-special += $(objpfx)tst-fopenloc-cmp.out
|
||||||
$(objpfx)tst-bz24228-mem.out
|
ifeq ($(build-shared),yes)
|
||||||
|
ifneq ($(PERL),no)
|
||||||
|
tests-special += \
|
||||||
|
$(objpfx)test-fmemopen-mem.out \
|
||||||
|
$(objpfx)tst-bz22415-mem.out \
|
||||||
|
$(objpfx)tst-bz24228-mem.out \
|
||||||
|
$(objpfx)tst-fdopen-seek-failure-mem.out \
|
||||||
|
$(objpfx)tst-fopenloc-mem.out \
|
||||||
|
# tests-special
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
tests += \
|
tests += \
|
||||||
|
@ -214,12 +214,18 @@ routines_no_fortify += \
|
|||||||
syslog \
|
syslog \
|
||||||
# routines_no_fortify
|
# routines_no_fortify
|
||||||
|
|
||||||
|
ifeq ($(run-built-tests),yes)
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
ifneq ($(PERL),no)
|
||||||
generated += \
|
generated += \
|
||||||
tst-allocate_once-mem.out \
|
tst-allocate_once-mem.out \
|
||||||
tst-allocate_once.mtrace \
|
tst-allocate_once.mtrace \
|
||||||
tst-error1-mem.out \
|
tst-error1-mem.out \
|
||||||
tst-error1.mtrace \
|
tst-error1.mtrace \
|
||||||
# generated
|
# generated
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
aux := init-misc
|
aux := init-misc
|
||||||
install-lib := libg.a
|
install-lib := libg.a
|
||||||
@ -285,8 +291,14 @@ tests-internal += tst-fd_to_filename
|
|||||||
tests-static += tst-fd_to_filename
|
tests-static += tst-fd_to_filename
|
||||||
|
|
||||||
ifeq ($(run-built-tests),yes)
|
ifeq ($(run-built-tests),yes)
|
||||||
tests-special += $(objpfx)tst-error1-mem.out \
|
ifeq (yes,$(build-shared))
|
||||||
$(objpfx)tst-allocate_once-mem.out
|
ifneq ($(PERL),no)
|
||||||
|
tests-special += \
|
||||||
|
$(objpfx)tst-allocate_once-mem.out \
|
||||||
|
$(objpfx)tst-error1-mem.out \
|
||||||
|
# tests-special
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
tests-container := \
|
tests-container := \
|
||||||
|
@ -556,10 +556,12 @@ xtests-static += tst-setuid1-static
|
|||||||
ifeq ($(run-built-tests),yes)
|
ifeq ($(run-built-tests),yes)
|
||||||
tests-special += \
|
tests-special += \
|
||||||
$(objpfx)tst-oddstacklimit.out \
|
$(objpfx)tst-oddstacklimit.out \
|
||||||
$(objpfx)tst-stack3-mem.out \
|
|
||||||
# tests-special
|
# tests-special
|
||||||
ifeq ($(build-shared),yes)
|
ifeq ($(build-shared),yes)
|
||||||
tests-special += $(objpfx)tst-tls6.out
|
tests-special += $(objpfx)tst-tls6.out
|
||||||
|
ifneq ($(PERL),no)
|
||||||
|
tests-special += $(objpfx)tst-stack3-mem.out
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -617,10 +619,17 @@ tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace \
|
|||||||
$(objpfx)tst-stack3-mem.out: $(objpfx)tst-stack3.out
|
$(objpfx)tst-stack3-mem.out: $(objpfx)tst-stack3.out
|
||||||
$(common-objpfx)malloc/mtrace $(objpfx)tst-stack3.mtrace > $@; \
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-stack3.mtrace > $@; \
|
||||||
$(evaluate-test)
|
$(evaluate-test)
|
||||||
|
|
||||||
|
ifeq ($(run-built-tests),yes)
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
ifneq ($(PERL),no)
|
||||||
generated += \
|
generated += \
|
||||||
tst-stack3-mem.out \
|
tst-stack3-mem.out \
|
||||||
tst-stack3.mtrace \
|
tst-stack3.mtrace \
|
||||||
# generated
|
# generated
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
tst-stack4mod.sos=$(shell for i in 0 1 2 3 4 5 6 7 8 9 10 \
|
tst-stack4mod.sos=$(shell for i in 0 1 2 3 4 5 6 7 8 9 10 \
|
||||||
11 12 13 14 15 16 17 18 19; do \
|
11 12 13 14 15 16 17 18 19; do \
|
||||||
|
@ -418,6 +418,17 @@ generated += \
|
|||||||
$(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
|
$(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
|
||||||
annexc \
|
annexc \
|
||||||
annexc.out \
|
annexc.out \
|
||||||
|
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 += \
|
||||||
bug-ga2-mem.out \
|
bug-ga2-mem.out \
|
||||||
bug-ga2.mtrace \
|
bug-ga2.mtrace \
|
||||||
bug-glob2-mem.out \
|
bug-glob2-mem.out \
|
||||||
@ -430,23 +441,22 @@ generated += \
|
|||||||
bug-regex21.mtrace \
|
bug-regex21.mtrace \
|
||||||
bug-regex31-mem.out \
|
bug-regex31-mem.out \
|
||||||
bug-regex31.mtrace \
|
bug-regex31.mtrace \
|
||||||
|
bug-regex36-mem.out \
|
||||||
bug-regex36.mtrace \
|
bug-regex36.mtrace \
|
||||||
getconf.speclist \
|
|
||||||
ptestcases.h \
|
|
||||||
testcases.h \
|
|
||||||
tst-boost-mem.out \
|
tst-boost-mem.out \
|
||||||
tst-boost.mtrace \
|
tst-boost.mtrace \
|
||||||
tst-fnmatch-mem.out \
|
tst-fnmatch-mem.out \
|
||||||
tst-fnmatch.mtrace \
|
tst-fnmatch.mtrace \
|
||||||
tst-getconf.out \
|
|
||||||
tst-pcre-mem.out \
|
tst-pcre-mem.out \
|
||||||
tst-pcre.mtrace \
|
tst-pcre.mtrace \
|
||||||
tst-rxspencer-no-utf8-mem.out \
|
tst-rxspencer-no-utf8-mem.out \
|
||||||
tst-rxspencer-no-utf8.mtrace \
|
tst-rxspencer-no-utf8.mtrace \
|
||||||
tst-vfork3-mem.out \
|
tst-vfork3-mem.out \
|
||||||
tst-vfork3.mtrace \
|
tst-vfork3.mtrace \
|
||||||
wordexp-tst.out \
|
|
||||||
# generated
|
# generated
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(run-built-tests),yes)
|
ifeq ($(run-built-tests),yes)
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
@ -461,6 +471,9 @@ endif
|
|||||||
# XXX Please note that for now we ignore the result of this test.
|
# XXX Please note that for now we ignore the result of this test.
|
||||||
tests-special += $(objpfx)annexc.out
|
tests-special += $(objpfx)annexc.out
|
||||||
ifeq ($(run-built-tests),yes)
|
ifeq ($(run-built-tests),yes)
|
||||||
|
tests-special += $(objpfx)tst-getconf.out
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
ifneq ($(PERL),no)
|
||||||
tests-special += \
|
tests-special += \
|
||||||
$(objpfx)bug-ga2-mem.out \
|
$(objpfx)bug-ga2-mem.out \
|
||||||
$(objpfx)bug-glob2-mem.out \
|
$(objpfx)bug-glob2-mem.out \
|
||||||
@ -471,13 +484,14 @@ tests-special += \
|
|||||||
$(objpfx)bug-regex36-mem.out \
|
$(objpfx)bug-regex36-mem.out \
|
||||||
$(objpfx)tst-boost-mem.out \
|
$(objpfx)tst-boost-mem.out \
|
||||||
$(objpfx)tst-fnmatch-mem.out \
|
$(objpfx)tst-fnmatch-mem.out \
|
||||||
$(objpfx)tst-getconf.out \
|
|
||||||
$(objpfx)tst-glob-tilde-mem.out \
|
$(objpfx)tst-glob-tilde-mem.out \
|
||||||
$(objpfx)tst-pcre-mem.out \
|
$(objpfx)tst-pcre-mem.out \
|
||||||
$(objpfx)tst-rxspencer-no-utf8-mem.out \
|
$(objpfx)tst-rxspencer-no-utf8-mem.out \
|
||||||
$(objpfx)tst-vfork3-mem.out \
|
$(objpfx)tst-vfork3-mem.out \
|
||||||
# tests-special
|
# tests-special
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
include ../Rules
|
include ../Rules
|
||||||
|
|
||||||
|
@ -229,10 +229,6 @@ tests := \
|
|||||||
tst-popen \
|
tst-popen \
|
||||||
tst-popen2 \
|
tst-popen2 \
|
||||||
tst-printf-binary \
|
tst-printf-binary \
|
||||||
tst-printf-bz18872 \
|
|
||||||
tst-printf-bz25691 \
|
|
||||||
tst-printf-fp-free \
|
|
||||||
tst-printf-fp-leak \
|
|
||||||
tst-printf-intn \
|
tst-printf-intn \
|
||||||
tst-printf-oct \
|
tst-printf-oct \
|
||||||
tst-printf-round \
|
tst-printf-round \
|
||||||
@ -261,7 +257,6 @@ tests := \
|
|||||||
tst-vfprintf-mbs-prec \
|
tst-vfprintf-mbs-prec \
|
||||||
tst-vfprintf-user-type \
|
tst-vfprintf-user-type \
|
||||||
tst-vfprintf-width-i18n \
|
tst-vfprintf-width-i18n \
|
||||||
tst-vfprintf-width-prec \
|
|
||||||
tst-vfprintf-width-prec-alloc \
|
tst-vfprintf-width-prec-alloc \
|
||||||
tst-wc-printf \
|
tst-wc-printf \
|
||||||
tstdiomisc \
|
tstdiomisc \
|
||||||
@ -270,6 +265,20 @@ tests := \
|
|||||||
xbug \
|
xbug \
|
||||||
# tests
|
# tests
|
||||||
|
|
||||||
|
ifeq ($(run-built-tests),yes)
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
ifneq ($(PERL),no)
|
||||||
|
tests += \
|
||||||
|
tst-printf-bz18872 \
|
||||||
|
tst-printf-bz25691 \
|
||||||
|
tst-printf-fp-free \
|
||||||
|
tst-printf-fp-leak \
|
||||||
|
tst-vfprintf-width-prec \
|
||||||
|
# tests
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
tests-container += \
|
tests-container += \
|
||||||
tst-popen3
|
tst-popen3
|
||||||
# tests-container
|
# tests-container
|
||||||
@ -293,14 +302,19 @@ test-srcs = \
|
|||||||
|
|
||||||
ifeq ($(run-built-tests),yes)
|
ifeq ($(run-built-tests),yes)
|
||||||
tests-special += \
|
tests-special += \
|
||||||
$(objpfx)tst-printf-bz18872-mem.out \
|
|
||||||
$(objpfx)tst-printf-bz25691-mem.out \
|
|
||||||
$(objpfx)tst-printf-fp-free-mem.out \
|
|
||||||
$(objpfx)tst-printf-fp-leak-mem.out \
|
|
||||||
$(objpfx)tst-printf.out \
|
$(objpfx)tst-printf.out \
|
||||||
$(objpfx)tst-printfsz-islongdouble.out \
|
$(objpfx)tst-printfsz-islongdouble.out \
|
||||||
$(objpfx)tst-setvbuf1-cmp.out \
|
$(objpfx)tst-setvbuf1-cmp.out \
|
||||||
$(objpfx)tst-unbputc.out \
|
$(objpfx)tst-unbputc.out \
|
||||||
|
# tests-special
|
||||||
|
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
ifneq ($(PERL),no)
|
||||||
|
tests-special += \
|
||||||
|
$(objpfx)tst-printf-bz18872-mem.out \
|
||||||
|
$(objpfx)tst-printf-bz25691-mem.out \
|
||||||
|
$(objpfx)tst-printf-fp-free-mem.out \
|
||||||
|
$(objpfx)tst-printf-fp-leak-mem.out \
|
||||||
$(objpfx)tst-vfprintf-width-prec-mem.out \
|
$(objpfx)tst-vfprintf-width-prec-mem.out \
|
||||||
# tests-special
|
# tests-special
|
||||||
|
|
||||||
@ -317,6 +331,8 @@ generated += \
|
|||||||
tst-vfprintf-width-prec-mem.out \
|
tst-vfprintf-width-prec-mem.out \
|
||||||
tst-vfprintf-width-prec.mtrace \
|
tst-vfprintf-width-prec.mtrace \
|
||||||
# generated
|
# generated
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif # $(run-built-tests)
|
endif # $(run-built-tests)
|
||||||
|
|
||||||
tests-special += $(objpfx)tst-errno-manual.out
|
tests-special += $(objpfx)tst-errno-manual.out
|
||||||
|
Loading…
Reference in New Issue
Block a user