[PATCH 3/3] Isolate test case execution from external environment
Siddhesh Poyarekar
siddhesh@redhat.com
Fri Apr 6 14:49:00 GMT 2012
Hi,
Currently the testsuite only works correctly for prefixes that have a
valid sysroot and uses the ld.so.cache in the sysroot to pick up
dependencies for test cases. Ideally test case execution should be
controlled and should not be affected by the prefix the result is going
to be installed to.
This patch does two things: first, use --inhibit-ldcache to prevent
ld.so from using any ld.so.cache in the test cases and second, create
symlinks for external dependencies within the build environment so that
the test case executions don't need any search paths outside the build
directory.
There are two dinstinct changes in this:
1) libgcc_s.so.1 is dynmically loaded by pthreads and hence it cannot
be detected as a dependency. It would have to be found and symlinked
into the build directory before test cases are executed
2) Dependencies of running test case binaries as well as shared
libraries that they may link to.
I have tested the patch with a make check on x86 shared build. Fully
static build is broken in glibc due to which I could not test it, see bz
13679.
Regards,
Siddhesh
ChangeLog:
2012-04-06 Siddhesh Poyarekar <siddhesh@redhat.com>
* Makeconfig (run-program-prefix): Use --inhibit-ldcache.
(list-deps-cmd): Define.
(rtld-verify-binary): Define.
* Makerules: Call $(symlink-deps) for built modules. Remove
the tests/lib directory on cleanup.
* Rules (tests-init): New target. Perform tasks before
executing test cases.
(libgcc-symlinked): New target. Link in libgcc_s.so.1 into
build directory. Use rtld-verify-binary.
(symlink-deps): Define. Use list-deps-cmd.
* posix/tst-exec.c (do_test): Adjust for --inhibit-ldcache.
* posix/tst-spawn.c (do_test): Adjust for --inhibit-ldcache.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-symlink-deps.patch
Type: text/x-patch
Size: 7956 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120406/4d9c57f9/attachment.bin>
More information about the Libc-alpha
mailing list