about summary refs log tree commit diff
path: root/Makeconfig
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-12-09 08:18:27 +0100
committerFlorian Weimer <fweimer@redhat.com>2016-12-09 08:18:27 +0100
commitc23de0aacbeaa7a091609b35764bed931475a16d (patch)
treebe4396f71292ee7a509912d70e74323d1587d227 /Makeconfig
parentc03073774f915fe7841c2b551fe304544143470f (diff)
downloadglibc-c23de0aacbeaa7a091609b35764bed931475a16d.tar.gz
glibc-c23de0aacbeaa7a091609b35764bed931475a16d.tar.xz
glibc-c23de0aacbeaa7a091609b35764bed931475a16d.zip
support: Introduce new subdirectory for test infrastructure
The new test driver in <support/test-driver.c> has feature parity with
the old one.  The main difference is that its hooking mechanism is
based on functions and function pointers instead of macros.  This
commit also implements a new environment variable, TEST_COREDUMPS,
which disables the code which disables coredumps (that is, it enables
them if the invocation environment has not disabled them).

<test-skeleton.c> defines wrapper functions so that it is possible to
use existing macros with the new-style hook functionality.

This commit changes only a few test cases to the new test driver, to
make sure that it works as expected.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig26
1 files changed, 18 insertions, 8 deletions
diff --git a/Makeconfig b/Makeconfig
index e9d8da9d60..be45c3a0b9 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -394,6 +394,9 @@ ifndef after-link
 after-link =
 endif
 
+# Additional libraries to link into every test.
+link-extra-libs-tests = $(libsupport)
+
 # Command for linking PIE programs with the C library.
 ifndef +link-pie
 +link-pie-before-libc = $(CC) -pie -Wl,-O1 -nostdlib -nostartfiles -o $@ \
@@ -412,8 +415,8 @@ $(+link-pie-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-pie-after-libc)
 $(call after-link,$@)
 endef
 define +link-pie-tests
-$(+link-pie-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
-			 $(+link-pie-after-libc)
+$(+link-pie-before-libc) $(link-extra-libs-tests) \
+  $(rtld-tests-LDFLAGS) $(link-libc-tests) $(+link-pie-after-libc)
 $(call after-link,$@)
 endef
 define +link-pie-printers-tests
@@ -439,7 +442,8 @@ $(+link-static-before-libc) $(link-libc-static) $(+link-static-after-libc)
 $(call after-link,$@)
 endef
 define +link-static-tests
-$(+link-static-before-libc) $(link-libc-static-tests) $(+link-static-after-libc)
+$(+link-static-before-libc) $(link-extra-libs-tests) \
+  $(link-libc-static-tests) $(+link-static-after-libc)
 $(call after-link,$@)
 endef
 endif
@@ -468,8 +472,8 @@ $(+link-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-after-libc)
 $(call after-link,$@)
 endef
 define +link-tests
-$(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
-		     $(+link-after-libc)
+$(+link-before-libc) $(link-extra-libs-tests) \
+  $(rtld-tests-LDFLAGS) $(link-libc-tests) $(+link-after-libc)
 $(call after-link,$@)
 endef
 define +link-printers-tests
@@ -545,7 +549,7 @@ link-libc-printers-tests = $(link-libc-rpath) \
 			   $(link-libc-tests-after-rpath-link)
 
 # This is how to find at build-time things that will be installed there.
-rpath-dirs = math elf dlfcn nss nis rt resolv crypt mathvec
+rpath-dirs = math elf dlfcn nss nis rt resolv crypt mathvec support
 rpath-link = \
 $(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
 else  # build-static
@@ -892,7 +896,7 @@ libio-include = -I$(..)libio
 # List of non-library modules that we build.
 built-modules = iconvprogs iconvdata ldconfig lddlibc4 libmemusage \
 		libSegFault libpcprofile librpcsvc locale-programs \
-		memusagestat nonlib nscd extramodules libnldbl
+		memusagestat nonlib nscd extramodules libnldbl libsupport
 
 in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \
 				    $(libof-$(<F)) \
@@ -1133,6 +1137,12 @@ libm = $(common-objpfx)math/libm.a
 libmvec = $(common-objpfx)mathvec/libmvec.a
 endif
 
+ifeq ($(build-shared),yes)
+libsupport = $(common-objpfx)support/libsupport_nonshared.a
+else
+libsupport = $(common-objpfx)support/libsupport.a
+endif
+
 # These are the subdirectories containing the library source.  The order
 # is more or less arbitrary.  The sorting step will take care of the
 # dependencies.
@@ -1140,7 +1150,7 @@ all-subdirs = csu assert ctype locale intl catgets math setjmp signal	    \
 	      stdlib stdio-common libio malloc string wcsmbs time dirent    \
 	      grp pwd posix io termios resource misc socket sysvipc gmon    \
 	      gnulib iconv iconvdata wctype manual shadow gshadow po argp   \
-	      crypt localedata timezone rt conform debug mathvec	    \
+	      crypt localedata timezone rt conform debug mathvec support    \
 	      $(add-on-subdirs) dlfcn elf
 
 ifndef avoid-generated