diff options
author | Mingli Yu <Mingli.Yu@windriver.com> | 2019-05-31 17:44:32 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-05-31 22:13:31 +0100 |
commit | 72cc2de0d97dec48e17a415b0eb6bf7d110e66f6 (patch) | |
tree | 8a90ed08baeaa1dcf797a611352e8942351ef594 /meta | |
parent | e59bdafc654f4453933efeac0a7d33eeadc8d9d9 (diff) | |
download | poky-72cc2de0d97dec48e17a415b0eb6bf7d110e66f6.tar.gz |
elfutils: fix ptest failures
* Add missing files which needed by ptest test
to fix the ptest failures such as:
| sh: ../src/elflint: No such file or directory
| FAIL: asm-tst4
* Rework 0001-skip-the-test-when-gcc-not-deployed.patch
to skip the tests which depend on gcc
* Define INHIBIT_PACKAGE_STRIP_FILES for elfutils to
avoid stripping some generated binaries otherwise
some of the tests such as test-nlist, run-strip-reloc.sh,
run-strip-strmerge.sh and so on will fail
* Set EXCLUDE_PACKAGES_FROM_SHLIBS = "${PN}-ptest"
to avoid ${PN}-ptest be the shlibs provider to
fix below error:
Problem 1: package rpm-1:4.14.2.1-r0.core2_32 requires elfutils-ptest >= 0.176, but none of the providers can be installed
- conflicting requests
- nothing provides elfutils-binutils needed by elfutils-ptest-0.176-r0.core2_32
Problem 2: package dnf-4.2.2-r0.core2_32 requires python3-rpm, but none of the providers can be installed
- package python3-rpm-1:4.14.2.1-r0.core2_32 requires elfutils-ptest >= 0.176, but none of the providers can be installed
- conflicting requests
- nothing provides elfutils-binutils needed by elfutils-ptest-0.176-r0.core2_32
Problem 3: package ltp-20190115-r0.core2_32 requires iproute2, but none of the providers can be installed
- package packagegroup-core-tools-testapps-1.0-r2.qemux86 requires ltp, but none of the providers can be installed
- package iproute2-5.1.0-r0.core2_32 requires elfutils-ptest >= 0.176, but none of the providers can be installed
- conflicting requests
- nothing provides elfutils-binutils needed by elfutils-ptest-0.176-r0.core2_32
Before:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------
(From OE-Core rev: 174690b1745eadc6981d83b7c6869712e835b5d0)
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/elfutils/elfutils_0.176.bb | 35 | ||||
-rw-r--r-- | meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch | 38 |
2 files changed, 68 insertions, 5 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/meta/recipes-devtools/elfutils/elfutils_0.176.bb index 157551e6af..1a5c70b088 100644 --- a/meta/recipes-devtools/elfutils/elfutils_0.176.bb +++ b/meta/recipes-devtools/elfutils/elfutils_0.176.bb | |||
@@ -61,6 +61,18 @@ do_compile_ptest() { | |||
61 | 61 | ||
62 | do_install_ptest() { | 62 | do_install_ptest() { |
63 | if [ ${PTEST_ENABLED} = "1" ]; then | 63 | if [ ${PTEST_ENABLED} = "1" ]; then |
64 | # copy the files which needed by the cases | ||
65 | TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" | ||
66 | install -d -m 755 ${D}${PTEST_PATH}/src | ||
67 | install -d -m 755 ${D}${PTEST_PATH}/libelf | ||
68 | install -d -m 755 ${D}${PTEST_PATH}/libdw | ||
69 | for test_file in ${TEST_FILES}; do | ||
70 | if [ -f ${B}/src/${test_file} ]; then | ||
71 | cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src | ||
72 | fi | ||
73 | done | ||
74 | cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so | ||
75 | cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so | ||
64 | cp -r ${S}/tests/ ${D}${PTEST_PATH} | 76 | cp -r ${S}/tests/ ${D}${PTEST_PATH} |
65 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests | 77 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests |
66 | cp -r ${B}/config.h ${D}${PTEST_PATH} | 78 | cp -r ${B}/config.h ${D}${PTEST_PATH} |
@@ -109,3 +121,26 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils | |||
109 | 121 | ||
110 | # The package contains symlinks that trip up insane | 122 | # The package contains symlinks that trip up insane |
111 | INSANE_SKIP_${MLPREFIX}libdw = "dev-so" | 123 | INSANE_SKIP_${MLPREFIX}libdw = "dev-so" |
124 | |||
125 | # avoid stripping some generated binaries otherwise some of the tests such as test-nlist, | ||
126 | # run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail | ||
127 | INHIBIT_PACKAGE_STRIP_FILES = "\ | ||
128 | ${PKGD}${PTEST_PATH}/tests/test-nlist \ | ||
129 | ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ | ||
130 | ${PKGD}${PTEST_PATH}/tests/backtrace-child \ | ||
131 | ${PKGD}${PTEST_PATH}/tests/backtrace-data \ | ||
132 | ${PKGD}${PTEST_PATH}/tests/deleted \ | ||
133 | ${PKGD}${PTEST_PATH}/src/strip \ | ||
134 | ${PKGD}${PTEST_PATH}/src/addr2line \ | ||
135 | ${PKGD}${PTEST_PATH}/src/elfcmp \ | ||
136 | ${PKGD}${PTEST_PATH}/src/objdump \ | ||
137 | ${PKGD}${PTEST_PATH}/src/readelf \ | ||
138 | ${PKGD}${PTEST_PATH}/src/nm \ | ||
139 | ${PKGD}${PTEST_PATH}/src/elflint \ | ||
140 | ${PKGD}${PTEST_PATH}/libelf/libelf.so \ | ||
141 | ${PKGD}${PTEST_PATH}/libdw/libdw.so \ | ||
142 | ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ | ||
143 | ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ | ||
144 | " | ||
145 | |||
146 | EXCLUDE_PACKAGES_FROM_SHLIBS = "${PN}-ptest" | ||
diff --git a/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch index 67ca0e4c77..de8c05f11e 100644 --- a/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch +++ b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch | |||
@@ -1,19 +1,47 @@ | |||
1 | From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001 | 1 | From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001 |
2 | From: Mingli Yu <Mingli.Yu@windriver.com> | 2 | From: Mingli Yu <Mingli.Yu@windriver.com> |
3 | Date: Fri, 12 Apr 2019 16:29:58 +0800 | 3 | Date: Tue, 21 May 2019 15:20:34 +0800 |
4 | Subject: [PATCH] skip the test when gcc not deployed | 4 | Subject: [PATCH v2] skip the test when gcc not deployed |
5 | 5 | ||
6 | Skip the tests which depend on gcc when | 6 | Skip the tests which depend on gcc when |
7 | gcc not deployed. | 7 | gcc not deployed. |
8 | 8 | ||
9 | Upstream-Status: Inappropriate [oe specific] | 9 | Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] |
10 | 10 | ||
11 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | 11 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> |
12 | --- | 12 | --- |
13 | tests/run-disasm-x86-64.sh | 2 ++ | ||
14 | tests/run-disasm-x86.sh | 2 ++ | ||
13 | tests/run-strip-g.sh | 2 ++ | 15 | tests/run-strip-g.sh | 2 ++ |
14 | tests/run-strip-nothing.sh | 2 ++ | 16 | tests/run-strip-nothing.sh | 2 ++ |
15 | 2 files changed, 4 insertions(+) | 17 | 4 files changed, 8 insertions(+) |
16 | 18 | ||
19 | diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh | ||
20 | index a6be62b..c3ef238 100755 | ||
21 | --- a/tests/run-disasm-x86-64.sh | ||
22 | +++ b/tests/run-disasm-x86-64.sh | ||
23 | @@ -22,6 +22,8 @@ case "`uname -m`" in | ||
24 | x86_64) | ||
25 | tempfiles testfile45.o | ||
26 | testfiles testfile45.S testfile45.expect | ||
27 | + # skip the case if no gcc deployed | ||
28 | + which gcc || exit 77 | ||
29 | gcc -m64 -c -o testfile45.o testfile45.S | ||
30 | testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect | ||
31 | ;; | ||
32 | diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh | ||
33 | index 28a3df7..544fc28 100755 | ||
34 | --- a/tests/run-disasm-x86.sh | ||
35 | +++ b/tests/run-disasm-x86.sh | ||
36 | @@ -22,6 +22,8 @@ case "`uname -m`" in | ||
37 | x86_64 | i?86 ) | ||
38 | tempfiles testfile44.o | ||
39 | testfiles testfile44.S testfile44.expect | ||
40 | + # skip the case if no gcc deployed | ||
41 | + which gcc || exit 77 | ||
42 | gcc -m32 -c -o testfile44.o testfile44.S | ||
43 | testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect | ||
44 | ;; | ||
17 | diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh | 45 | diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh |
18 | index 1303819..a943dec 100755 | 46 | index 1303819..a943dec 100755 |
19 | --- a/tests/run-strip-g.sh | 47 | --- a/tests/run-strip-g.sh |