]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
gentoo: support running tests under sandbox
authorStephanie J. Lockwood-Childs <wormo@gentoo.org>
Fri, 16 Aug 2013 19:03:41 +0000 (15:03 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 9 Feb 2015 14:57:24 +0000 (09:57 -0500)
when glibc runs its tests, it does so by invoking the local library loader.
in Gentoo, we build/run inside of our "sandbox" which itself is linked against
libdl (so that it can load libraries and pull out symbols).  the trouble
is that when you upgrade from an older glibc to the new one, often times
internal symbols change name or abi.  this is normally OK as you cannot use
libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
we always say "keep all of the glibc libraries from the same build".  but
when glibc runs its tests, it uses dynamic paths to point to its new local
copies of libraries.  if the test doesnt use libdl, then glibc doesnt add
its path, and when sandbox triggers the loading of libdl, glibc does so
from the host system system.  this gets us into the case of all libraries
are from the locally compiled version of glibc except for libdl.so.

http://bugs.gentoo.org/56898

Makeconfig
iconvdata/run-iconv-test.sh
nptl/tst-tls6.sh

index 751e9ffa32149ba8854cc6fb7404a5902305dc37..0f74abf950c5e458cd4c5e4a197c4905e3a233dc 100644 (file)
@@ -616,7 +616,7 @@ comma = ,
 sysdep-library-path = \
 $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
                                       $(filter -Wl$(comma)-rpath-link=%,\
-                                               $(sysdep-LDFLAGS)))))
+                                               $(sysdep-LDFLAGS)))) $(common-objpfx)/dlfcn)
 # $(run-via-rtld-prefix) is a command that, when prepended to the name
 # of a program built with the newly built library, produces a command
 # that, executed on the host for which the library is built, runs that
index 557db6b0acf85fce93176eb3f203a792e16c34dd..23c2c35e802aab817223c663f5b77ee138220d99 100755 (executable)
@@ -31,7 +31,7 @@ temp2=$codir/iconvdata/iconv-test.yyy
 trap "rm -f $temp1 $temp2" 1 2 3 15
 
 # We have to have some directories in the library path.
-LIBPATH=$codir:$codir/iconvdata
+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
 
 # How the start the iconv(1) program.
 ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
index 3533474a084a3c6238afbd5ae7984de20bce0c8a..e58f3f6ffa4b37274f794f3b480cc8145758ff97 100755 (executable)
@@ -26,7 +26,7 @@ run_program_env=$1; shift
 logfile=$common_objpfx/nptl/tst-tls6.out
 
 # We have to find libc and nptl
-library_path=${common_objpfx}:${common_objpfx}nptl
+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
 tst_tls5="${test_via_rtld_prefix} ${common_objpfx}/nptl/tst-tls5"
 
 > $logfile