On 2019年05月28日 18:01, richard.pur...@linuxfoundation.org wrote:
On Tue, 2019-05-28 at 17:40 +0800, mingli...@windriver.com wrote:
From: Mingli Yu <mingli...@windriver.com>

* 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.

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"


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


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,


Cheers,

Richard




--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to