]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: Split run-copymany-sections.sh into separate tests
authorMark Wielaard <mark@klomp.org>
Sat, 17 Jun 2023 12:03:36 +0000 (14:03 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 17 Jun 2023 12:03:36 +0000 (14:03 +0200)
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 <mark@klomp.org>
tests/Makefile.am
tests/run-copymany-be32.sh [new file with mode: 0755]
tests/run-copymany-be64.sh [new file with mode: 0755]
tests/run-copymany-le32.sh [new file with mode: 0755]
tests/run-copymany-le64.sh [new file with mode: 0755]
tests/test-copymany-subr.sh [moved from tests/run-copymany-sections.sh with 98% similarity]

index 0ca8aa9e7e81644daea4c993269863c3af3e91bc..e60aa6bccd6949ab76dfb7e15836529f5e93669b 100644 (file)
@@ -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 (executable)
index 0000000..8fdbfbf
--- /dev/null
@@ -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 (executable)
index 0000000..bd7e50a
--- /dev/null
@@ -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 (executable)
index 0000000..82957d6
--- /dev/null
@@ -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 (executable)
index 0000000..a2d7c2e
--- /dev/null
@@ -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
similarity index 98%
rename from tests/run-copymany-sections.sh
rename to tests/test-copymany-subr.sh
index 01348229131cecfffe8233bfa1adb24ac52cff11..4b65d80e6a0fa5a75b40b726455c0fc091249c53 100755 (executable)
@@ -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