[PATCH v2 2/2] ioctl console test v2

Dmitry V. Levin ldv at altlinux.org
Wed Mar 25 14:48:04 UTC 2020


On Wed, Mar 25, 2020 at 08:11:14PM +0530, Bran S wrote:
> On Wed, 25 Mar 2020 at 20:05, Dmitry V. Levin <ldv at altlinux.org> wrote:
> >
> > On Tue, Mar 17, 2020 at 10:11:38PM +0530, Bran S wrote:
> > > On Mon, 9 Mar 2020 at 19:19, Eugene Syromiatnikov <esyr at redhat.com> wrote:
> > > >
> > > > On Mon, Mar 09, 2020 at 07:06:49PM +0530, Bran S wrote:
> > > > > I am interested in the Comprehensive test suite project.
> > > >
> > > > I'd suggest building strace with LCOV with different kernel headers
> > > > on different arches (./configure --enable-code-coverage && make check &&
> > > > make code-coverage-capture) and look at parts of the code (and branches)
> > > > that are not covered by tests.  Other possibility is to check out
> > > > codecov[1], but it's vaguely representative (it's built against rather
> > > > old kernel and only on x86_64).
> > > >
> > > > [1] https://codecov.io/gh/strace/strace
> > >
> > > On running `make code-coverage-capture` I am getting below error.
> > > ----------
> > > lcov  --directory . --capture --output-file
> > > "strace-5.5.0.67.269b-coverage.info.tmp" --test-name
> > > "strace_5_5_0_67_269b" --no-checksum --compat-libtool  --rc
> > > lcov_branch_coverage=1 --gcov-tool "gcov"
> > > Capturing coverage data from .
> > > Found gcov version: 8.2.1
> > > Using intermediate gcov format
> > > Scanning . for .gcda files ...
> > > Found 313 data files in .
> > > Processing libmpers_m32_a-fetch_struct_stat64.gcda
> > > geninfo: ERROR: GCOV failed for
> > > /home/mybox/strace/libmpers_m32_a-fetch_struct_stat64.gcda!
> > > make: *** [Makefile:9957: code-coverage-capture] Error 29
> > > ----------
> > >
> > > Searching about I found a suggestion to make sure that the gcc and
> > > gcov versions are same.
> > > My gcc and gcov version are same i.e. gcc (GCC) 8.2.1 20180801 and
> > > gcov (GCC) 8.2.1 20180801 respectively.
> > > Any ideas ?
> >
> > Apparently, your lcov is too old and cannot handle the gcov data
> > produced by gcc.  FWIW, lcov v1.14-6-g40580cd is known to work.
> >
> 
> The system on which coverage fails has got lcov v1.14. Its Fedora
> 4.18.16-300.fc29.x86_64.
> The system on which coverage works has got lcov v1.13. Its Ubuntu
> 18.04.4 LTS and Kernel: Linux 5.6.0-rc7.
> 
> So I think the lcov on fedora should work right ? Since lcov 1.13
> works on ubuntu.

It depends on the gcov format used by gcc to produce gcov data files.
lcov v1.14 is known to be insufficient to handle gcov data files produced
by gcc9.  lcov in Fedora may or may not be patched to work properly with
gcc9, I just don't have this information.


-- 
ldv


More information about the Strace-devel mailing list