glibc/scripts
Chung-Lin Tang e6fd79f379 elf: Testing infrastructure for ld.so DSO sorting (BZ #17645)
This is the first of a 2-part patch set that fixes slow DSO sorting behavior in
the dynamic loader, as reported in BZ #17645. In order to facilitate such a
large modification to the dynamic loader, this first patch implements a testing
framework for validating shared object sorting behavior, to enable comparison
between old/new sorting algorithms, and any later enhancements.

This testing infrastructure consists of a Python script
scripts/dso-ordering-test.py' which takes in a description language, consisting
of strings that describe a set of link dependency relations between DSOs, and
generates testcase programs and Makefile fragments to automatically test the
described situation, for example:

  a->b->c->d          # four objects linked one after another

  a->[bc]->d;b->c     # a depends on b and c, which both depend on d,
                      # b depends on c (b,c linked to object a in fixed order)

  a->b->c;{+a;%a;-a}  # a, b, c serially dependent, main program uses
                      # dlopen/dlsym/dlclose on object a

  a->b->c;{}!->[abc]  # a, b, c serially dependent; multiple tests generated
                      # to test all permutations of a, b, c ordering linked
                      # to main program

 (Above is just a short description of what the script can do, more
  documentation is in the script comments.)

Two files containing several new tests, elf/dso-sort-tests-[12].def are added,
including test scenarios for BZ #15311 and Redhat issue #1162810 [1].

Due to the nature of dynamic loader tests, where the sorting behavior and test
output occurs before/after main(), generating testcases to use
support/test-driver.c does not suffice to control meaningful timeout for ld.so.
Therefore a new utility program 'support/test-run-command', based on
test-driver.c/support_test_main.c has been added. This does the same testcase
control, but for a program specified through a command-line rather than at the
source code level. This utility is used to run the dynamic loader testcases
generated by dso-ordering-test.py.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1162810

Signed-off-by: Chung-Lin Tang  <cltang@codesourcery.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-10-21 11:23:53 -03:00
..
abi-versions.awk
abilist.awk nptl_db: Re-use the ELF-to-abilist converter for ABI checking 2021-06-29 22:17:08 +02:00
backport-support.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
build-many-glibcs.py build-many-glibcs.py: add powerpc64le glibc variant without multiarch 2021-09-24 14:32:35 -05:00
check-c++-types.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check-execstack.awk check-execstack: Permit sysdeps to xfail some libs 2018-07-20 03:28:14 +02:00
check-initfini.awk Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check-installed-headers.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check-local-headers.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check-localplt.awk
check-obsolete-constructs.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check-textrel.awk
check-wrapper-headers.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check-wx-segment.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
config-uname.sh
config.guess Update miscellaneous files from upstream sources. 2019-01-01 00:52:59 +00:00
config.sub Update miscellaneous files from upstream sources. 2019-01-01 00:52:59 +00:00
cpp
cross-test-ssh.sh tst: Extend cross-test-ssh.sh to specify if target date can be altered 2021-03-08 22:37:16 +01:00
documented.sh
dso-ordering-test.py elf: Testing infrastructure for ld.so DSO sorting (BZ #17645) 2021-10-21 11:23:53 -03:00
evaluate-test.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
firstversions.awk
gen-as-const.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gen-libc-abis
gen-libc-modules.awk
gen-posix-conf-vars.awk
gen-rrtypes.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gen-sorted.awk Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
gen-tunables.awk elf: Avoid RELATIVE relocs in __tunables_init 2021-01-21 14:05:15 +00:00
glibc_shared_code.py Port shared code information from the wiki 2021-09-03 22:00:37 +05:30
glibcextract.py glibcextract.py: Place un-assemblable @@@ in a comment 2021-10-19 09:58:16 -07:00
glibcsymbols.py glibcymbols.read_abilist: Add check for duplicate symbols 2021-03-16 15:57:16 +01:00
haveversions.awk Don't build libnsl for new ABIs 2018-09-24 10:23:10 +02:00
install-sh Update miscellaneous files from upstream sources. 2018-12-06 17:21:47 +00:00
lib-names.awk
list-fixed-bugs.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
list-sources.sh
localplt.awk
merge-test-results.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mkinstalldirs Update miscellaneous files from upstream sources. 2018-12-06 17:21:47 +00:00
move-if-change Sync move-if-change from Gnulib 2021-01-02 12:43:58 -08:00
move-symbol-to-libc.py scripts/glibcsymbols.py: Extract from scripts/move-symbol-to-libc.py 2021-03-16 15:57:04 +01:00
pylint
pylintrc
rellns-sh Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
soversions.awk
sysd-rules.awk
test_printers_common.py Allow gdb version 10 in pretty printer tests. 2021-03-11 14:08:07 +01:00
test_printers_exceptions.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-installation.pl Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
update-abilist.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
update-copyrights Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
vcstocl_quirks.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
versionlist.awk Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
versions.awk Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30