From: Mark Wielaard Date: Sat, 17 Jun 2023 12:03:36 +0000 (+0200) Subject: tests: Split run-copymany-sections.sh into separate tests X-Git-Tag: elfutils-0.190~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4fac1627c;p=thirdparty%2Felfutils.git tests: Split run-copymany-sections.sh into separate tests 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 --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 0ca8aa9e7..e60aa6bcc 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 000000000..8fdbfbf69 --- /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 000000000..bd7e50a45 --- /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 000000000..82957d6c8 --- /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 000000000..a2d7c2ea4 --- /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 013482291..4b65d80e6 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