1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Adjust name of ld.so in test-container.c.

The test-container.c file assumes that ld.so is always named
something like /elf/ld-linux-*.
But e.g. on s390x it is named ld64.so.1 or ld.so.1 on s390.
There are other architectures like power or mips with similar names.

This patch introduces the new global variable support_objdir_elf_ldso
which contains the absolute path to the runtime linker used by the
testsuite, e.g. OBJDIR_PATH/elf/ld-linux-x86-64.so.2.
The check in test-container.c is now comparing against this path.
Without this patch, test-container.c is searching invalid files / directories
and fails to find glibc/nss/tst-nss-test3.root/tst-nss-test3.script.
Then the test tst-nss-test3 fails!

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

ChangeLog:

	* support/support.h (support_objdir_elf_ldso): New variable.
	* support/support_paths.c (support_objdir_elf_ldso): Likewise.
	* support/Makefile (CFLAGS-support_paths.c): Add definition
	for OBJDIR_ELF_LDSO_PATH.
	* support/test-container.c (main): Search for the ld.so
	which is also used by the testsuite.
This commit is contained in:
Stefan Liebler
2018-10-04 13:07:29 +02:00
parent dae3ed958c
commit e7624d708d
5 changed files with 23 additions and 2 deletions

View File

@ -36,6 +36,14 @@ const char support_objdir_root[] = OBJDIR_PATH;
# error please -DOBJDIR_PATH=something in the Makefile
#endif
#ifdef OBJDIR_ELF_LDSO_PATH
/* Corresponds to the path to the runtime linker used by the testsuite,
e.g. OBJDIR_PATH/elf/ld-linux-x86-64.so.2 */
const char support_objdir_elf_ldso[] = OBJDIR_ELF_LDSO_PATH;
#else
# error please -DOBJDIR_ELF_LDSO_PATH=something in the Makefile
#endif
#ifdef INSTDIR_PATH
/* Corresponds to the --prefix= passed to configure. */
const char support_install_prefix[] = INSTDIR_PATH;