elfutils: fix ptest failures
PATCH 1/1 elfutils: fix ptest failures
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependencies (needs
${PN}-dbg)
* Add missing files which needed by ptest test
to fix below failures:
| ./run-ar.sh: line 23: cd: /usr/lib64/elfutils/ptest/tests/..//src: No such file or directory | FAIL: run-ar.sh
| 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
Before:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 184 | 15 | 4
--------------------------------------------
--- meta/recipes-devtools/elfutils/elfutils_0.176.bb | 5 ++- .../0001-skip-the-test-when-gcc-not-deployed.patch | 38 +++++++++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.176.bb +4 -1
@@ -44,7 +44,7 @@ inherit autotools gettext ptest EXTRA_OECONF = "--program-prefix=eu- --without-lzma" EXTRA_OECONF_append_class-native = " --without-bzlib" -RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}" +RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN} ${PN}-dbg" EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
@@ -61,6 +61,8 @@ do_compile_ptest() { do_install_ptest() { if [ ${PTEST_ENABLED} = "1" ]; then + install -d -m 755 ${D}${PTEST_PATH}/src + cp -r ${B}/src/* ${D}${PTEST_PATH}/src cp -r ${S}/tests/ ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests cp -r ${B}/config.h ${D}${PTEST_PATH}
@@ -109,3 +111,4 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils # The package contains symlinks that trip up insane INSANE_SKIP_${MLPREFIX}libdw = "dev-so" +INSANE_SKIP_${PN}-ptest += "debug-deps"
meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch +33 -5
@@ -1,19 +1,47 @@ -From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001 +From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001 From: Mingli Yu <[email protected]> -Date: Fri, 12 Apr 2019 16:29:58 +0800 -Subject: [PATCH] skip the test when gcc not deployed +Date: Tue, 21 May 2019 15:20:34 +0800 +Subject: [PATCH v2] skip the test when gcc not deployed Skip the tests which depend on gcc when gcc not deployed. -Upstream-Status: Inappropriate [oe specific] +Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] Signed-off-by: Mingli Yu <[email protected]> --- + tests/run-disasm-x86-64.sh | 2 ++ + tests/run-disasm-x86.sh | 2 ++ tests/run-strip-g.sh | 2 ++ tests/run-strip-nothing.sh | 2 ++ - 2 files changed, 4 insertions(+) + 4 files changed, 8 insertions(+) +diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh +index a6be62b..c3ef238 100755 +--- a/tests/run-disasm-x86-64.sh ++++ b/tests/run-disasm-x86-64.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64) + tempfiles testfile45.o + testfiles testfile45.S testfile45.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m64 -c -o testfile45.o testfile45.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect + ;; +diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh +index 28a3df7..544fc28 100755 +--- a/tests/run-disasm-x86.sh ++++ b/tests/run-disasm-x86.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64 | i?86 ) + tempfiles testfile44.o + testfiles testfile44.S testfile44.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m32 -c -o testfile44.o testfile44.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect + ;; diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh index 1303819..a943dec 100755 --- a/tests/run-strip-g.sh
Signature · 1 line
2.7.4
Quoted 24 lines · On Wed, 2019-05-22 at 17:11 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependencies (needs
${PN}-dbg)* Add missing files which needed by ptest test
to fix below failures:
| ./run-ar.sh: line 23: cd:/usr/lib64/elfutils/ptest/tests/..//src: No such file or directory
| FAIL:run-ar.sh| 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
Before:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------
Quoted 7 lines
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 184 | 15 | 4
--------------------------------------------
Unfortunately if I add this to the build we see failures due to core- image-sato-sdk-ptest becomming too large for generix86-64 as the image exceeds the 4GB limit its FSTYPE allows.
I tried reducing the amount of free space in the image but then the strace and until-linux ptests fail:
https://autobuilder.yocto.io/pub/non-release/20190524-8/testresults/testresult-report.txt
We do plan to change the hddimg format and use wic to avoid the 4GB limit sometime in 2.8 but those patches aren't ready yet. I'm therefore not quite sure what to do here. Is there any way we can save space in the images so we could merge this?
Wth regard to the src/ directory, I did wonder if there needed to be a patch to one of the other scripts to use installed files (similar to how I fixed some of these last time)?
Cheers,
Richard
Quoted 40 lines · On 2019年05月26日 04:16, [email protected] wrote:
Quoted 24 lines · On Wed, 2019-05-22 at 17:11 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependencies (needs
${PN}-dbg)* Add missing files which needed by ptest test
to fix below failures:| ./run-ar.sh: line 23: cd:
/usr/lib64/elfutils/ptest/tests/..//src: No such file or directory
| FAIL:run-ar.sh| 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
Before:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------Quoted 7 lines
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 184 | 15 | 4
--------------------------------------------Unfortunately if I add this to the build we see failures due to core- image-sato-sdk-ptest becomming too large for generix86-64 as the image exceeds the 4GB limit its FSTYPE allows.
I tried reducing the amount of free space in the image but then the strace and until-linux ptests fail:
Quoted 6 lines
https://autobuilder.yocto.io/pub/non-release/20190524-8/testresults/testresult-report.txt
We do plan to change the hddimg format and use wic to avoid the 4GB limit sometime in 2.8 but those patches aren't ready yet. I'm therefore not quite sure what to do here. Is there any way we can save space in the images so we could merge this?
It will be better if any space can be saved.
Quoted 4 lines
Wth regard to the src/ directory, I did wonder if there needed to be a patch to one of the other scripts to use installed files (similar to how I fixed some of these last time)?
Have checked your patch about new target oecheck. Anyway, I have narrowed down a little to copy only the needed files to src/ dir.
And I also send out v2 patch then which updated to fix all the tests.
Thanks,
Quoted 6 lines
Cheers,
Richard
PATCH v2 1/1 elfutils: fix ptest failures
In reply to [email protected]From: Mingli Yu <[email protected]>
* Add missing -ptest package dependencies (needs
${PN}-dev)
* 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
* Don't split the -debug package for elfutils as
most cases needs the binary to have .symtab.
Before:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------
--- meta/recipes-devtools/elfutils/elfutils_0.176.bb | 15 ++++++++- .../0001-skip-the-test-when-gcc-not-deployed.patch | 38 +++++++++++++++++++--- 2 files changed, 47 insertions(+), 6 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.176.bb +14 -1
@@ -44,7 +44,7 @@ inherit autotools gettext ptest EXTRA_OECONF = "--program-prefix=eu- --without-lzma" EXTRA_OECONF_append_class-native = " --without-bzlib" -RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}" +RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN} ${PN}-dev" EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
@@ -61,6 +61,16 @@ do_compile_ptest() { do_install_ptest() { if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + for test_file in ${TEST_FILES}; do + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + done + ln -s ${libdir}/libelf.so ${D}${PTEST_PATH}/libelf/libelf.so + ln -s ${libdir}/libdw.so ${D}${PTEST_PATH}/libdw/libdw.so cp -r ${S}/tests/ ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests cp -r ${B}/config.h ${D}${PTEST_PATH}
@@ -109,3 +119,6 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils # The package contains symlinks that trip up insane INSANE_SKIP_${MLPREFIX}libdw = "dev-so" +INSANE_SKIP_${PN}-ptest += "dev-deps" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch +33 -5
@@ -1,19 +1,47 @@ -From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001 +From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001 From: Mingli Yu <[email protected]> -Date: Fri, 12 Apr 2019 16:29:58 +0800 -Subject: [PATCH] skip the test when gcc not deployed +Date: Tue, 21 May 2019 15:20:34 +0800 +Subject: [PATCH v2] skip the test when gcc not deployed Skip the tests which depend on gcc when gcc not deployed. -Upstream-Status: Inappropriate [oe specific] +Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] Signed-off-by: Mingli Yu <[email protected]> --- + tests/run-disasm-x86-64.sh | 2 ++ + tests/run-disasm-x86.sh | 2 ++ tests/run-strip-g.sh | 2 ++ tests/run-strip-nothing.sh | 2 ++ - 2 files changed, 4 insertions(+) + 4 files changed, 8 insertions(+) +diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh +index a6be62b..c3ef238 100755 +--- a/tests/run-disasm-x86-64.sh ++++ b/tests/run-disasm-x86-64.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64) + tempfiles testfile45.o + testfiles testfile45.S testfile45.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m64 -c -o testfile45.o testfile45.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect + ;; +diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh +index 28a3df7..544fc28 100755 +--- a/tests/run-disasm-x86.sh ++++ b/tests/run-disasm-x86.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64 | i?86 ) + tempfiles testfile44.o + testfiles testfile44.S testfile44.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m32 -c -o testfile44.o testfile44.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect + ;; diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh index 1303819..a943dec 100755 --- a/tests/run-strip-g.sh
Signature · 1 line
2.7.4
Quoted 10 lines · On Tue, 2019-05-28 at 17:40 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependencies (needs
${PN}-dev)* 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
Quoted 5 lines
* Rework 0001-skip-the-test-when-gcc-not-deployed.patch to skip the tests which depend on gcc
* Don't split the -debug package for elfutils as
most cases needs the binary to have .symtab.
Can you provide more details on what this last item means?
Do you mean elfutils is generally broken without the symtab section? That seems unusual? Or do you mean the tests need it to be present?
Not striping the binary at all is likely to cause a significant size increase for elfutils and we want to avoid that, particularly if its only to fix tests. We will probably have to find a different solution (e.g. second copy with the symtab section in the ptest package, added to PATH in the runner?)
Cheers,
Richard
Quoted 11 lines · On 2019年05月28日 18:01, [email protected] wrote:
Quoted 10 lines · On Tue, 2019-05-28 at 17:40 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependencies (needs
${PN}-dev)* 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
Quoted 7 lines
Quoted 5 lines
* Rework 0001-skip-the-test-when-gcc-not-deployed.patch to skip the tests which depend on gcc
* Don't split the -debug package for elfutils as
most cases needs the binary to have .symtab.Can you provide more details on what this last item means?
That means elfutils tests need the binary not stripped, so we need below logic:
INHIBIT_PACKAGE_STRIP = "1"INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
Quoted 3 lines
Do you mean elfutils is generally broken without the symtab section? That seems unusual? Or do you mean the tests need it to be present?
Not sure whether elfutils is broken, but at least it is broken with regard to test part. If strip the binary, the test result:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 184 | 15 | 4
--------------------------------------------
And all the failed case as below is because the binary is stripped.
FAIL: test-nlist
FAIL: run-strip-reloc.sh
FAIL: run-strip-strmerge.sh
FAIL: run-nm-self.sh
FAIL: run-readelf-self.sh
FAIL: run-varlocs-self.sh
FAIL: run-exprlocs-self.sh
FAIL: run-backtrace-native.sh
FAIL: run-backtrace-data.sh
FAIL: run-backtrace-native-core.sh
FAIL: run-deleted.sh
FAIL: run-dwarf-die-addr-die.sh
FAIL: run-get-units-invalid.sh
FAIL: run-get-units-split.sh
FAIL: run-unit-info.sh
For the test-nlist, the upstream also said the binary cannot be stripped to guarantee the test pass as https://sourceware.org/ml/elfutils-devel/2019-q2/msg00098.html and https://sourceware.org/ml/elfutils-devel/2019-q2/msg00103.html
So to fix this kind of below failures, we need to make the binary not stripped.
runtest /usr/lib64/elfutils/ptest/tests/..//src/strip /usr/bin/eu-readelf: cannot get debug context descriptor: No DWARF information found *** failure readelf -w debugfile1 /usr/lib64/elfutils/ptest/tests/..//src/strip /usr/bin/eu-readelf: cannot get debug context descriptor: No DWARF information found *** failure readelf -w debugfile2 /usr/lib64/elfutils/ptest/tests/..//src/strip runtest /usr/lib64/elfutils/ptest/tests/..//src/strip.o
runtest strip-uncompressed.o
runtest strip-compressed.o
runtest testfile-debug-rel-ppc64.o
runtest testfile-debug-rel-ppc64-z.o
runtest testfile-debug-rel-ppc64-g.o
FAIL: run-strip-reloc.sh
/usr/lib64/elfutils/ptest/tests/..//tests/elfstrmerge: /usr/lib64/elfutils/ptest/tests/..//tests/elfstrmerge: couldn't get symtab data: no error
FAIL: run-strip-strmerge.sh
/usr/bin/eu-nm: /usr/lib64/elfutils/ptest/tests/..//src/nm: no symbols
FAIL: run-nm-self.sh
Quoted 6 lines
Not striping the binary at all is likely to cause a significant size increase for elfutils and we want to avoid that, particularly if its only to fix tests. We will probably have to find a different solution (e.g. second copy with the symtab section in the ptest package, added to PATH in the runner?)
During my test, if we strip the debug info to elfutils-dbg, first we need to make elfutils-ptest rdepends on elfutils-dbg and second the test still fails as above even the elfutils-dbg package deployed as below:
# pwd /usr/lib64/elfutils/ptest root@qemux86-64:/usr/lib64/elfutils/ptest# ls src/strip src/strip root@qemux86-64:/usr/lib64/elfutils/ptest# ls src/.debug/strip src/.debug/strip /.debug/strip64:/usr/lib64/elfutils/ptest# rpm -qf /usr/lib64/elfutils/ptest/src/.debug/strip elfutils-dbg-0.176-r0.core2_64
Thanks,
Quoted 8 lines
Cheers,
Richard
PATCH v3 1/1 elfutils: fix ptest failures
In reply to [email protected]From: Mingli Yu <[email protected]>
* Add missing -ptest package dependency (needs
${PN}-dev)
* 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
Before:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------
--- meta/recipes-devtools/elfutils/elfutils_0.176.bb | 34 ++++++++++++++++++- .../0001-skip-the-test-when-gcc-not-deployed.patch | 38 +++++++++++++++++++--- 2 files changed, 66 insertions(+), 6 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.176.bb +33 -1
@@ -44,7 +44,7 @@ inherit autotools gettext ptest EXTRA_OECONF = "--program-prefix=eu- --without-lzma" EXTRA_OECONF_append_class-native = " --without-bzlib" -RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}" +RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN} ${PN}-dev" EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
@@ -61,6 +61,16 @@ do_compile_ptest() { do_install_ptest() { if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + for test_file in ${TEST_FILES}; do + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + done + ln -s ${libdir}/libelf.so ${D}${PTEST_PATH}/libelf/libelf.so + ln -s ${libdir}/libdw.so ${D}${PTEST_PATH}/libdw/libdw.so cp -r ${S}/tests/ ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests cp -r ${B}/config.h ${D}${PTEST_PATH}
@@ -109,3 +119,25 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils # The package contains symlinks that trip up insane INSANE_SKIP_${MLPREFIX}libdw = "dev-so" +INSANE_SKIP_${PN}-ptest += "dev-deps" + +# 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 +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \ + ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${libdir}/libelf-${PV}.so \ + ${PKGD}${libdir}/libdw-${PV}.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ +"
meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch +33 -5
@@ -1,19 +1,47 @@ -From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001 +From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001 From: Mingli Yu <[email protected]> -Date: Fri, 12 Apr 2019 16:29:58 +0800 -Subject: [PATCH] skip the test when gcc not deployed +Date: Tue, 21 May 2019 15:20:34 +0800 +Subject: [PATCH v2] skip the test when gcc not deployed Skip the tests which depend on gcc when gcc not deployed. -Upstream-Status: Inappropriate [oe specific] +Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] Signed-off-by: Mingli Yu <[email protected]> --- + tests/run-disasm-x86-64.sh | 2 ++ + tests/run-disasm-x86.sh | 2 ++ tests/run-strip-g.sh | 2 ++ tests/run-strip-nothing.sh | 2 ++ - 2 files changed, 4 insertions(+) + 4 files changed, 8 insertions(+) +diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh +index a6be62b..c3ef238 100755 +--- a/tests/run-disasm-x86-64.sh ++++ b/tests/run-disasm-x86-64.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64) + tempfiles testfile45.o + testfiles testfile45.S testfile45.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m64 -c -o testfile45.o testfile45.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect + ;; +diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh +index 28a3df7..544fc28 100755 +--- a/tests/run-disasm-x86.sh ++++ b/tests/run-disasm-x86.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64 | i?86 ) + tempfiles testfile44.o + testfiles testfile44.S testfile44.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m32 -c -o testfile44.o testfile44.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect + ;; diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh index 1303819..a943dec 100755 --- a/tests/run-strip-g.sh
Signature · 1 line
2.7.4
Quoted 81 lines · On Wed, 2019-05-29 at 16:55 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependency (needs
${PN}-dev)* 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_FILESfor elfutils to avoid stripping some generated binaries otherwise some of the tests such as test-nlist,run-strip-reloc.sh,run-strip-strmerge.shand so on will failBefore:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------Signed-off-by Mingli Yu <[email protected]>--- meta/recipes-devtools/elfutils/elfutils_0.176.bb | 34 ++++++++++++++++++- .../0001-skip-the-test-when-gcc-not-deployed.patch | 38 +++++++++++++++++++--- 2 files changed, 66 insertions(+), 6 deletions(-)meta/recipes-devtools/elfutils/elfutils_0.176.bb +20
-1@@ -44,7 +44,7 @@ inherit autotools gettext ptest EXTRA_OECONF = "--program-prefix=eu- --without-lzma" EXTRA_OECONF_append_class-native = " --without-bzlib" -RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}" +RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN} ${PN}-dev" EXTRA_OECONF_append_class-target += "--disable-tests-rpath"@@ -61,6 +61,16 @@ do_compile_ptest() { do_install_ptest() { if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + for test_file in ${TEST_FILES}; do + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + done + ln -s ${libdir}/libelf.so ${D}${PTEST_PATH}/libelf/libelf.so + ln -s ${libdir}/libdw.so ${D}${PTEST_PATH}/libdw/libdw.so cp -r ${S}/tests/ ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests cp -r ${B}/config.h ${D}${PTEST_PATH}@@ -109,3 +119,25 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils # The package contains symlinks that trip up insane INSANE_SKIP_${MLPREFIX}libdw = "dev-so" +INSANE_SKIP_${PN}-ptest += "dev-deps" + +# 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 +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \
meta/recipes-devtools/elfutils/elfutils_0.176.bb FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils · line 140
Quoted 10 lines
meta/recipes-devtools/elfutils/elfutils_0.176.bb +10
-0+ ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${libdir}/libelf-${PV}.so \ + ${PKGD}${libdir}/libdw-${PV}.so \
This looks better, except for the two libdir lines above. This will inflate main image sizes just to make tests work :(.
We're going to need to fine another way to handle this as I'd imagine the size increase is substancial.
It may be worth asking upstream whether they'd accept the tests using the debug link mechanism we use to find extra symbol information?
Cheers,
Richard
Quoted 97 lines · On 2019年05月29日 18:13, [email protected] wrote:
Quoted 81 lines · On Wed, 2019-05-29 at 16:55 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependency (needs
${PN}-dev)* 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_FILESfor elfutils to avoid stripping some generated binaries otherwise some of the tests such as test-nlist,run-strip-reloc.sh,run-strip-strmerge.shand so on will failBefore:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------Signed-off-by Mingli Yu <[email protected]>--- meta/recipes-devtools/elfutils/elfutils_0.176.bb | 34 ++++++++++++++++++- .../0001-skip-the-test-when-gcc-not-deployed.patch | 38 +++++++++++++++++++--- 2 files changed, 66 insertions(+), 6 deletions(-)meta/recipes-devtools/elfutils/elfutils_0.176.bb +20
-1@@ -44,7 +44,7 @@ inherit autotools gettext ptest EXTRA_OECONF = "--program-prefix=eu- --without-lzma" EXTRA_OECONF_append_class-native = " --without-bzlib" -RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}" +RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN} ${PN}-dev" EXTRA_OECONF_append_class-target += "--disable-tests-rpath"@@ -61,6 +61,16 @@ do_compile_ptest() { do_install_ptest() { if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + for test_file in ${TEST_FILES}; do + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + done + ln -s ${libdir}/libelf.so ${D}${PTEST_PATH}/libelf/libelf.so + ln -s ${libdir}/libdw.so ${D}${PTEST_PATH}/libdw/libdw.so cp -r ${S}/tests/ ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests cp -r ${B}/config.h ${D}${PTEST_PATH}@@ -109,3 +119,25 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils # The package contains symlinks that trip up insane INSANE_SKIP_${MLPREFIX}libdw = "dev-so" +INSANE_SKIP_${PN}-ptest += "dev-deps" + +# 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 +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \meta/recipes-devtools/elfutils/elfutils_0.176.bb FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils · line 140
Quoted 10 lines
meta/recipes-devtools/elfutils/elfutils_0.176.bb +10
-0+ ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${libdir}/libelf-${PV}.so \ + ${PKGD}${libdir}/libdw-${PV}.so \This looks better, except for the two libdir lines above. This will inflate main image sizes just to make tests work :(.
Quoted 5 lines
We're going to need to fine another way to handle this as I'd imagine the size increase is substancial.
It may be worth asking upstream whether they'd accept the tests using the debug link mechanism we use to find extra symbol information?
Without the two libdir lines, most cases will fail. And even upstream changes to the debug link mechanism, we still need to make -ptest rdepends on -dbg. But I'm not sure upstream can make some move.
BTW, How about use the below solution? if so, all tests pass and we don't need -ptest rdepends on -dev and -dbg anyway. Will send out V4.
+ cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
+ cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
Thanks,
Quoted 6 lines
Cheers,
Richard
PATCH v4 1/1 elfutils: fix ptest failures
In reply to [email protected]From: Mingli Yu <[email protected]>
* 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
Before:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------
--- meta/recipes-devtools/elfutils/elfutils_0.176.bb | 33 +++++++++++++++++++ .../0001-skip-the-test-when-gcc-not-deployed.patch | 38 +++++++++++++++++++--- 2 files changed, 66 insertions(+), 5 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.176.bb +33 -0
@@ -61,6 +61,18 @@ do_compile_ptest() { do_install_ptest() { if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + for test_file in ${TEST_FILES}; do + if [ -f ${B}/src/${test_file} ]; then + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + fi + done + cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so + cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so cp -r ${S}/tests/ ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests cp -r ${B}/config.h ${D}${PTEST_PATH}
@@ -109,3 +121,24 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils # The package contains symlinks that trip up insane INSANE_SKIP_${MLPREFIX}libdw = "dev-so" + +# 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 +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \ + ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${PTEST_PATH}/libelf/libelf.so \ + ${PKGD}${PTEST_PATH}/libdw/libdw.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ +"
meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch +33 -5
@@ -1,19 +1,47 @@ -From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001 +From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001 From: Mingli Yu <[email protected]> -Date: Fri, 12 Apr 2019 16:29:58 +0800 -Subject: [PATCH] skip the test when gcc not deployed +Date: Tue, 21 May 2019 15:20:34 +0800 +Subject: [PATCH v2] skip the test when gcc not deployed Skip the tests which depend on gcc when gcc not deployed. -Upstream-Status: Inappropriate [oe specific] +Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] Signed-off-by: Mingli Yu <[email protected]> --- + tests/run-disasm-x86-64.sh | 2 ++ + tests/run-disasm-x86.sh | 2 ++ tests/run-strip-g.sh | 2 ++ tests/run-strip-nothing.sh | 2 ++ - 2 files changed, 4 insertions(+) + 4 files changed, 8 insertions(+) +diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh +index a6be62b..c3ef238 100755 +--- a/tests/run-disasm-x86-64.sh ++++ b/tests/run-disasm-x86-64.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64) + tempfiles testfile45.o + testfiles testfile45.S testfile45.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m64 -c -o testfile45.o testfile45.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect + ;; +diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh +index 28a3df7..544fc28 100755 +--- a/tests/run-disasm-x86.sh ++++ b/tests/run-disasm-x86.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64 | i?86 ) + tempfiles testfile44.o + testfiles testfile44.S testfile44.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m32 -c -o testfile44.o testfile44.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect + ;; diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh index 1303819..a943dec 100755 --- a/tests/run-strip-g.sh
Signature · 1 line
2.7.4
Quoted 22 lines · On Thu, 2019-05-30 at 14:11 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* 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_FILESfor elfutils to avoid stripping some generated binaries otherwise some of the tests such as test-nlist,run-strip-reloc.sh,run-strip-strmerge.shand so on will failBefore:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------
Quoted 6 lines
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------
Thanks, this is better again. We do still have a musl issue:
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/648
Error:
Problem: package packagegroup-core-full-cmdline-extended-1.0-r6.0.noarch requires iproute2, but none of the providers can be installed
- package packagegroup-core-full-cmdline-1.0-r6.0.noarch requires packagegroup-core-full-cmdline-extended, but none of the providers can be installed
- package iproute2-5.1.0-r0.0.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.0.core2_32
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Cheers,
Richard
Quoted 34 lines · On Thu, 2019-05-30 at 21:49 +0100, [email protected] wrote:
Quoted 22 lines · On Thu, 2019-05-30 at 14:11 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* 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_FILESfor elfutils to avoid stripping some generated binaries otherwise some of the tests such as test-nlist,run-strip-reloc.sh,run-strip-strmerge.shand so on will failBefore:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------Quoted 6 lines
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------Thanks, this is better again. We do still have a musl issue:
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/648
Quoted 14 lines
Error:
Problem: package packagegroup-core-full-cmdline-extended-1.0-
r6.0.noarch requires iproute2, but none of the providers can be installed
- package packagegroup-core-full-cmdline-1.0-r6.0.noarch requires
packagegroup-core-full-cmdline-extended, but none of the providers can be installed
- package iproute2-5.1.0-r0.0.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.0.core2_32
(try to add '--skip-broken' to skip uninstallable packages or ' --nobest' to use not only best candidate packages)
I think this may also be causing:
https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/652
which is due to elfutils-ptest being pulled into normal images and then causing an OOM problem, statd is killed and then systemd reports errors.
This is probably as the ptest package is being registered as an shlib proivider. There should be a variable we can set to stop that and allow the main elfutils package to be the shlibs provider for the package.bbclass code.
Cheers,
Richard
Quoted 34 lines · On 2019年05月31日 04:49, [email protected] wrote:
Quoted 22 lines · On Thu, 2019-05-30 at 14:11 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* 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_FILESfor elfutils to avoid stripping some generated binaries otherwise some of the tests such as test-nlist,run-strip-reloc.sh,run-strip-strmerge.shand so on will failBefore:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------Quoted 6 lines
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------Thanks, this is better again. We do still have a musl issue:
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/648
Quoted 7 lines
Error:
Problem: package packagegroup-core-full-cmdline-extended-1.0-r6.0.noarch requires iproute2, but none of the providers can be installed
- package packagegroup-core-full-cmdline-1.0-r6.0.noarch requires packagegroup-core-full-cmdline-extended, but none of the providers can be installed
- package iproute2-5.1.0-r0.0.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.0.core2_32
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I didn't encounter the failure during do_rootfs when "bitbake core-image-sato-sdk" with musl on qemux86.
Could you help to provide your local.conf?
Thanks,
Quoted 6 lines
Cheers,
Richard
Quoted 51 lines · Mingli
Quoted 42 lines · On 2019年05月31日 04:49, [email protected] wrote:
Quoted 22 lines · On Thu, 2019-05-30 at 14:11 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* 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_FILESfor elfutils to avoid stripping some generated binaries otherwise some of the tests such as test-nlist,run-strip-reloc.sh,run-strip-strmerge.shand so on will failBefore:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------Quoted 6 lines
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------Thanks, this is better again. We do still have a musl issue:
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/648
Error:
Problem: package packagegroup-core-full-cmdline-extended-1.0-
r6.0.noarch requires iproute2, but none of the providers can be installed
- package packagegroup-core-full-cmdline-1.0-r6.0.noarch
requires packagegroup-core-full-cmdline-extended, but none of the providers can be installed
- package iproute2-5.1.0-r0.0.core2_32 requires elfutils-ptestQuoted 6 lines
Quoted 1 line
= 0.176, but none of the providers can be installed
- conflicting requests
- nothing provides elfutils-binutils needed by elfutils-ptest-
0.176-r0.0.core2_32
(try to add '--skip-broken' to skip uninstallable packages or ' --nobest' to use not only best candidate packages)
Quoted 4 lines
I didn't encounter the failure during
do_rootfswhen "bitbake core-image-sato-sdk" with musl on qemux86.Could you help to provide your local.conf?
Its an autobuilder run and you can see the configuration here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/648/steps/7/logs/stdio
====================================================================================================
Writing /home/pokybuild/yocto-worker/musl-qemux86/build/build/conf/auto.conf with contents: (1559222710.4)
====================================================================================================
MACHINE = "qemux86"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
DL_DIR = '/srv/autobuilder/autobuilder.yoctoproject.org/current_sources'
PRSERV_HOST = 'localhost:0'
SSTATE_DIR ?= '/srv/autobuilder/autobuilder.yoctoproject.org/pub/sstate'
TCLIBC = 'musl'
QEMU_USE_KVM = 'True'
INHERIT += 'report-error'
PREMIRRORS = ''
BB_GENERATE_MIRROR_TARBALLS = '1'
BB_NUMBER_THREADS = '16'
PARALLEL_MAKE = '-j 16'
BB_TASK_NICE_LEVEL = '5'
BB_TASK_NICE_LEVEL_task-testimage = '0'
BB_TASK_IONICE_LEVEL = '2.7'
BB_TASK_IONICE_LEVEL_task-testimage = '2.1'
INHERIT += 'testimage'
TEST_QEMUBOOT_TIMEOUT = '1500'
SANITY_TESTED_DISTROS = ''
SDK_EXT_TYPE = 'minimal'
SDK_INCLUDE_TOOLCHAIN = '1'
BB_DISKMON_DIRS = 'STOPTASKS,${TMPDIR},1G,100K STOPTASKS,${DL_DIR},1G STOPTASKS,${SSTATE_DIR},1G STOPTASKS,/tmp,100M,100K ABORT,${TMPDIR},100M,1K ABORT,${DL_DIR},100M ABORT,${SSTATE_DIR},100M ABORT,/tmp,10M,1K'
then it tells you what it ran:
Running '. ./oe-init-build-env; bitbake core-image-minimal core-image-full-cmdline core-image-sato-sdk world -k' with output to /home/pokybuild/yocto-worker/musl-qemux86/build/build/command.log.1b
with "bitbake core-image-full-cmdline" likely being the thing which breaks.
Cheers,
Richard
PATCH v5 1/1 elfutils: fix ptest failures
From: Mingli Yu <[email protected]>
* 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
--------------------------------------------
--- meta/recipes-devtools/elfutils/elfutils_0.176.bb | 35 ++++++++++++++++++++ .../0001-skip-the-test-when-gcc-not-deployed.patch | 38 +++++++++++++++++++--- 2 files changed, 68 insertions(+), 5 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.176.bb +35 -0
@@ -61,6 +61,18 @@ do_compile_ptest() { do_install_ptest() { if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + for test_file in ${TEST_FILES}; do + if [ -f ${B}/src/${test_file} ]; then + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + fi + done + cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so + cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so cp -r ${S}/tests/ ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests cp -r ${B}/config.h ${D}${PTEST_PATH}
@@ -109,3 +121,26 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils # The package contains symlinks that trip up insane INSANE_SKIP_${MLPREFIX}libdw = "dev-so" + +# 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 +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \ + ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${PTEST_PATH}/libelf/libelf.so \ + ${PKGD}${PTEST_PATH}/libdw/libdw.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ +" + +EXCLUDE_PACKAGES_FROM_SHLIBS = "${PN}-ptest"
meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch +33 -5
@@ -1,19 +1,47 @@ -From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001 +From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001 From: Mingli Yu <[email protected]> -Date: Fri, 12 Apr 2019 16:29:58 +0800 -Subject: [PATCH] skip the test when gcc not deployed +Date: Tue, 21 May 2019 15:20:34 +0800 +Subject: [PATCH v2] skip the test when gcc not deployed Skip the tests which depend on gcc when gcc not deployed. -Upstream-Status: Inappropriate [oe specific] +Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] Signed-off-by: Mingli Yu <[email protected]> --- + tests/run-disasm-x86-64.sh | 2 ++ + tests/run-disasm-x86.sh | 2 ++ tests/run-strip-g.sh | 2 ++ tests/run-strip-nothing.sh | 2 ++ - 2 files changed, 4 insertions(+) + 4 files changed, 8 insertions(+) +diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh +index a6be62b..c3ef238 100755 +--- a/tests/run-disasm-x86-64.sh ++++ b/tests/run-disasm-x86-64.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64) + tempfiles testfile45.o + testfiles testfile45.S testfile45.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m64 -c -o testfile45.o testfile45.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect + ;; +diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh +index 28a3df7..544fc28 100755 +--- a/tests/run-disasm-x86.sh ++++ b/tests/run-disasm-x86.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64 | i?86 ) + tempfiles testfile44.o + testfiles testfile44.S testfile44.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -m32 -c -o testfile44.o testfile44.S + testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect + ;; diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh index 1303819..a943dec 100755 --- a/tests/run-strip-g.sh
Signature · 1 line
2.7.4
Quoted 25 lines · On Wed, 2019-05-29 at 16:55 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependency (needs
${PN}-dev)* 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_FILESfor elfutils to avoid stripping some generated binaries otherwise some of the tests such as test-nlist,run-strip-reloc.sh,run-strip-strmerge.shand so on will failBefore:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------
Quoted 8 lines
After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------Signed-off-by Mingli Yu <[email protected]>
I tested this without the libdir strip lines and it fails on musl:
https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/645
Cheers,
Richard
Quoted 33 lines · On 2019年05月30日 02:40, [email protected] wrote:
Quoted 32 lines · On Wed, 2019-05-29 at 16:55 +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
* Add missing -ptest package dependency (needs
${PN}-dev)* 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_FILESfor elfutils to avoid stripping some generated binaries otherwise some of the tests such as test-nlist,run-strip-reloc.sh,run-strip-strmerge.shand so on will failBefore:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 176 | 23 | 4
--------------------------------------------After:
--------------------------------------------
Recipe | Passed | Failed | Skipped
--------------------------------------------
elfutils | 199 | 0 | 4
--------------------------------------------
Quoted 5 lines
Quoted 1 line
Signed-off-by Mingli Yu <[email protected]>I tested this without the libdir strip lines and it fails on musl:
https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/645
Will send out v4 to fix it.
Thanks,
Quoted 6 lines
Cheers,
Richard