aboutsummaryrefslogtreecommitdiffstats
path: root/libio
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2024-06-19 11:48:05 -0400
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-07-01 17:20:30 +0200
commita7fe3e805d2ee128ac5f43b2a24201726d41cc04 (patch)
tree0b1908eb5001e30028839ae6c007fb865488a1bd /libio
parentsignal/Makefile: Split and sort tests (diff)
downloadglibc-a7fe3e805d2ee128ac5f43b2a24201726d41cc04.tar.xz
glibc-a7fe3e805d2ee128ac5f43b2a24201726d41cc04.zip
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>
Diffstat (limited to 'libio')
-rw-r--r--libio/Makefile42
1 files changed, 31 insertions, 11 deletions
diff --git a/libio/Makefile b/libio/Makefile
index f607edbefb..8720381fdc 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -261,15 +261,28 @@ tst-bz22415-ENV = MALLOC_TRACE=$(objpfx)tst-bz22415.mtrace \
tst-bz24228-ENV = MALLOC_TRACE=$(objpfx)tst-bz24228.mtrace \
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
+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)
-generated += tst-bz24228.mtrace tst-bz24228.check
aux += oldfileops oldstdfiles
tests += \
tst-stderr-compat \
@@ -286,16 +299,23 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \
ifeq ($(run-built-tests),yes)
tests-special += \
- $(objpfx)test-fmemopen-mem.out \
$(objpfx)test-freopen.out \
- $(objpfx)tst-bz22415-mem.out \
- $(objpfx)tst-fdopen-seek-failure-mem.out \
# tests-special
ifeq (yes,$(build-shared))
# Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared
# library is enabled since they depend on tst-fopenloc.out.
-tests-special += $(objpfx)tst-fopenloc-cmp.out $(objpfx)tst-fopenloc-mem.out \
- $(objpfx)tst-bz24228-mem.out
+tests-special += $(objpfx)tst-fopenloc-cmp.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
tests += \