Bug 11358 - oe-selftest: coverage report shows incorrect info
Summary: oe-selftest: coverage report shows incorrect info
Status: RESOLVED OBSOLETE
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Low normal
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-04-13 13:59 UTC by Ed Bartosh
Modified: 2020-04-30 08:35 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: New (Never tested)
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Bartosh 2017-04-13 13:59:30 UTC
Coverage report shows some of the covered lines of wic code as uncovered.

Here is an example:

$ oe-selftest -r wic --coverage
$ coverage3 report -m |grep filemap.py
/home/ed/git/yocto/poky/scripts/lib/wic/filemap.py                               248     99     52     11    55%   79-80, 87-88, 93-94, 102-103, 108-109, 125-126, 138, 147, 160, 169, 183-194, 207-210, 226-249, 253-261, 265, 274-293, 297-299, 303-305, 376, 390-403, 422, 470, 502-516, 530-531, 543, 547-550, 553, 557, 73->76, 78->79, 118->exit, 375->376, 469->470, 542->543, 542->562, 546->547, 546->549, 556->542, 556->557

lines 207-210 belong to FilemapSeek.__init__, which is definitely called in  test_sparse_copy test case. The same happens with a lot of other lines of code from this module.

It looks like coverage doesn't work properly for direct API calls. It works only for indirect calls, i.e. when the API is called from the tool/program that's executed in test cases.
Comment 1 Richard Purdie 2020-04-30 08:35:14 UTC
Coverage support was dropped from oe-selftest and we don't have the time/plans to implement now.