]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Stop test-in-container trying to run other-OS binaries.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 4 Dec 2018 16:52:39 +0000 (16:52 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 4 Dec 2018 16:52:39 +0000 (16:52 +0000)
I noticed that, now that build-many-glibcs.py no longer copies glibc
sources, I was getting core dumps in my glibc source directories.  The
cause appears to be, from the i686-gnu build:

for dso in ` env LD_TRACE_LOADED_OBJECTS=1  \
        /scratch/jmyers/glibc-bot/build/glibcs/i686-gnu/glibc/elf/ld.so.1 \
        /scratch/jmyers/glibc-bot/build/glibcs/i686-gnu/glibc/testroot.pristine/bin/sh \
[...]
Segmentation fault (core dumped)

In this case, the x86 architecture means the binary executes, but
dumps core rather than actually working.

Anything involving running the newly built glibc should only be done
ifeq ($(run-built-tests),yes).  This patch conditions the relevant
part of the testroot setup accordingly.

Tested for x86_64, and with build-many-glibcs.py for i686-gnu.

* Makefile ($(objpfx)testroot.pristine/install.stamp): Do not run
dynamic linker unless [$(run-built-tests) = yes].

ChangeLog
Makefile

index b15107894e40a6700b495dd428e4f089e9816e93..4138a08b4e1d94a7de08ffa210e388b97637a6bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-04  Joseph Myers  <joseph@codesourcery.com>
+
+       * Makefile ($(objpfx)testroot.pristine/install.stamp): Do not run
+       dynamic linker unless [$(run-built-tests) = yes].
+
 2018-12-03  DJ Delorie  <dj@delorie.com>
 
        * support/test-container.c (check_for_unshare_hints): New.
index b4703e48fec93075cd5e3ddd83469705d2fee8f8..fd73d9bae39563e66414e190408b619360ed5109 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -374,6 +374,7 @@ $(objpfx)testroot.pristine/install.stamp :
        cp $(objpfx)support/shell-container $(objpfx)testroot.pristine/bin/sh
        cp $(objpfx)support/echo-container $(objpfx)testroot.pristine/bin/echo
        cp $(objpfx)support/true-container $(objpfx)testroot.pristine/bin/true
+ifeq ($(run-built-tests),yes)
        # Copy these DSOs first so we can overwrite them with our own.
        for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1  \
                $(objpfx)elf/$(rtld-installed-name) \
@@ -393,6 +394,7 @@ $(objpfx)testroot.pristine/install.stamp :
              mkdir -p `dirname $(objpfx)testroot.pristine$$dso` ;\
            $(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
          done
+endif
        $(MAKE) install DESTDIR=$(objpfx)testroot.pristine
        touch $(objpfx)testroot.pristine/install.stamp