This test can take a very long time under valgrind (on s390x). Split it into four tests for big/little endian, 32/64 bit. That way the tests can run in parallel and each individual test produces a result (so the buildbot won't time out).
* tests/run-copymany-sections.sh: Delete and move generic part into... * tests/test-copymany-subr.sh: ... here. * tests/run-copymany-be32.sh: New big endian 32 bit tests. * tests/run-copymany-be64.sh: New big endian 64 bit tests. * tests/run-copymany-le32.sh: New little endian 32 bit tests. * tests/run-copymany-le64.sh: New little endian 64 bit tests. * tests/Makefile.am (TESTS): Remove run-copymany-sections.sh, add run-copymany-be32.sh, run-copymany-le32.sh, run-copymany-be64.sh and run-copymany-le64.sh. (EXTRA_DIST): Remove run-copymany-sections.sh. Add test-copymany-subr.sh, run-copymany-be32.sh, run-copymany-le32.sh, run-copymany-be64.sh and run-copymany-le64.sh. Signed-off-by: Mark Wielaard <m...@klomp.org> --- tests/Makefile.am | 8 ++++++-- tests/run-copymany-be32.sh | 16 ++++++++++++++++ tests/run-copymany-be64.sh | 16 ++++++++++++++++ tests/run-copymany-le32.sh | 16 ++++++++++++++++ tests/run-copymany-le64.sh | 16 ++++++++++++++++ ...opymany-sections.sh => test-copymany-subr.sh} | 2 +- 6 files changed, 71 insertions(+), 3 deletions(-) create mode 100755 tests/run-copymany-be32.sh create mode 100755 tests/run-copymany-be64.sh create mode 100755 tests/run-copymany-le32.sh create mode 100755 tests/run-copymany-le64.sh rename tests/{run-copymany-sections.sh => test-copymany-subr.sh} (98%) diff --git a/tests/Makefile.am b/tests/Makefile.am index 0ca8aa9e..e60aa6bc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -193,7 +193,9 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \ run-reloc-bpf.sh \ run-next-cfi.sh run-next-cfi-self.sh \ run-reverse-sections.sh run-reverse-sections-self.sh \ - run-copyadd-sections.sh run-copymany-sections.sh \ + run-copyadd-sections.sh \ + run-copymany-be32.sh run-copymany-le32.sh \ + run-copymany-be64.sh run-copymany-le64.sh \ run-typeiter-many.sh run-strip-test-many.sh \ run-strip-version.sh run-xlate-note.sh \ run-readelf-discr.sh \ @@ -539,7 +541,9 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \ testfile-riscv64.bz2 testfile-riscv64-s.bz2 \ testfile-riscv64-core.bz2 \ run-reverse-sections.sh run-reverse-sections-self.sh \ - run-copyadd-sections.sh run-copymany-sections.sh \ + run-copyadd-sections.sh test-copymany-subr.sh \ + run-copymany-be32.sh run-copymany-le32.sh \ + run-copymany-be64.sh run-copymany-le64.sh \ run-large-elf-file.sh \ run-typeiter-many.sh run-strip-test-many.sh \ testfile-debug-rel-ppc64-g.o.bz2 \ diff --git a/tests/run-copymany-be32.sh b/tests/run-copymany-be32.sh new file mode 100755 index 00000000..8fdbfbf6 --- /dev/null +++ b/tests/run-copymany-be32.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +. $srcdir/test-copymany-subr.sh +. $srcdir/test-subr.sh + +# 32bit, big endian, rel +testfiles testfile29 +test_copy_and_add testfile29 +test_copy_and_add testfile29.copy + +# 32bit, big endian, non-rel +testfiles testfile26 +test_copy_and_add testfile26 +test_copy_and_add testfile26.copy + +exit 0 diff --git a/tests/run-copymany-be64.sh b/tests/run-copymany-be64.sh new file mode 100755 index 00000000..bd7e50a4 --- /dev/null +++ b/tests/run-copymany-be64.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +. $srcdir/test-copymany-subr.sh +. $srcdir/test-subr.sh + +# 64bit, big endian, rel +testfiles testfile23 +test_copy_and_add testfile23 +test_copy_and_add testfile23.copy + +# 64bit, big endian, non-rel +testfiles testfile27 +test_copy_and_add testfile27 +test_copy_and_add testfile27.copy + +exit 0 diff --git a/tests/run-copymany-le32.sh b/tests/run-copymany-le32.sh new file mode 100755 index 00000000..82957d6c --- /dev/null +++ b/tests/run-copymany-le32.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +. $srcdir/test-copymany-subr.sh +. $srcdir/test-subr.sh + +# 32bit, little endian, rel +testfiles testfile9 +test_copy_and_add testfile9 +test_copy_and_add testfile9.copy + +# 32bit, little endian, non-rel +testfiles testfile +test_copy_and_add testfile +test_copy_and_add testfile.copy + +exit 0 diff --git a/tests/run-copymany-le64.sh b/tests/run-copymany-le64.sh new file mode 100755 index 00000000..a2d7c2ea --- /dev/null +++ b/tests/run-copymany-le64.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +. $srcdir/test-copymany-subr.sh +. $srcdir/test-subr.sh + +# 64bit, little endian, rel +testfiles testfile38 +test_copy_and_add testfile38 +test_copy_and_add testfile38.copy + +# 64bit, little endian, non-rel +testfiles testfile10 +test_copy_and_add testfile10 +test_copy_and_add testfile10.copy + +exit 0 diff --git a/tests/run-copymany-sections.sh b/tests/test-copymany-subr.sh similarity index 98% rename from tests/run-copymany-sections.sh rename to tests/test-copymany-subr.sh index 01348229..4b65d80e 100755 --- a/tests/run-copymany-sections.sh +++ b/tests/test-copymany-subr.sh @@ -55,7 +55,7 @@ test_copy_and_add () # A collection of random testfiles to test 32/64bit, little/big endian # and non-ET_REL (with phdrs)/ET_REL (without phdrs). -# Try to add 0xffff sections twice. +# Try to add 0x0fff sections twice. # 32bit, big endian, rel testfiles testfile29 -- 2.39.3