V8 test-in-container patch
Carlos O'Donell
carlos@redhat.com
Tue Oct 9 15:26:00 GMT 2018
On 10/9/18 5:27 AM, Szabolcs Nagy wrote:
> On 16/08/18 18:59, DJ Delorie wrote:
>> +# The intention here is to do ONE install of our build into the
>> +# testroot.pristine/ directory, then rsync (internal to
>> +# support/test-container) that to testroot.root/ at the start of each
>> +# test. That way we can promise each test a "clean" install, without
>> +# having to do the install for each test.
>> +#
>> +# In addition, we have to copy some files (which we build) into this
>> +# root in addition to what glibc installs. For example, many tests
>> +# require /bin/sh be present, and any shared objects that /bin/sh
>> +# depends on. We also build a "test" program in either C or (if
>> +# available) C++ just so we can copy in any shared objects (which we
>> +# do not build) that GCC-compiled programs depend on.
>> +
>> +$(tests-container) $(addsuffix /tests,$(subdirs)) : \
>> + $(objpfx)testroot.pristine/install.stamp
>> +$(objpfx)testroot.pristine/install.stamp :
>> + test -d $(objpfx)testroot.pristine || \
>> + mkdir $(objpfx)testroot.pristine
>> + # We need a working /bin/sh for some of the tests.
>> + test -d $(objpfx)testroot.pristine/bin || \
>> + mkdir $(objpfx)testroot.pristine/bin
>> + 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
>> + # 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) \
>> + $(objpfx)testroot.pristine/bin/sh \
>> + | grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
>> + do \
>> + test -d `dirname $(objpfx)testroot.pristine$$dso` || \
>> + mkdir -p `dirname $(objpfx)testroot.pristine$$dso` ;\
>> + $(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
>> + done
>
> in the aarch64 buildbot log i see
>
> for dso in ` env LD_TRACE_LOADED_OBJECTS=1 \
> /home/szabolcs/tx1-ubuntu-aarch64/glibc-aarch64-linux/build/build/elf/ld-linux-aarch64.so.1 \
> /home/szabolcs/tx1-ubuntu-aarch64/glibc-aarch64-linux/build/build/testroot.pristine/bin/sh \
> | grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
> do \
> ...
> /home/szabolcs/tx1-ubuntu-aarch64/glibc-aarch64-linux/build/build/testroot.pristine/bin/sh: /lib/aarch64-linux-gnu/libc.so.6: version
> `GLIBC_2.27' not found (required by /home/szabolcs/tx1-ubuntu-aarch64/glibc-aarch64-linux/build/build/testroot.pristine/bin/sh)
>
> i think some --library-path should be passed here.
Agreed. There should be a --library-path to the main build directory
where libc.so.6 is present, otherwise it won't match the loader.
...
for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \
$(objpfx)elf/$(rtld-installed-name) \
--library-path $(objpfx):$(objpfx)/math:... \
^^^^^^^^^^^^^^^^^^^^^^^^^^
Adds lookup for libc.so.6 and all other libraries.
$(objpfx)testroot.pristine/bin/sh \
| grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
do \
...
The list of lookup paths needs to be dynamic and you can probably
crib the way testrun.sh knows, which I think is $(test-program-prefix)?
>> + for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \
>> + $(objpfx)elf/$(rtld-installed-name) \
>> + $(objpfx)support/links-dso-program \
>> + | grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
>> + do \
>> + test -d `dirname $(objpfx)testroot.pristine$$dso` || \
>> + mkdir -p `dirname $(objpfx)testroot.pristine$$dso` ;\
>> + $(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
>> + done
>> + $(MAKE) install DESTDIR=$(objpfx)testroot.pristine
>> + touch $(objpfx)testroot.pristine/install.stamp
>> +
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list