These are chat archives for Snaipe/Criterion

20th
Apr 2016
Dominik
@kaidowei
Apr 20 2016 14:15
@Snaipe are you aware of problems with gcov?
I tried compiling our libs with coverage stuff and now criterion crashes:
[----] Warning! The test `chmap::chmap_delete_from_loop_safe` crashed during its setup or teardown.
[----] Warning! The test `chmap::chmap_delete` crashed during its setup or teardown.
[----] Warning! The test `chmap::chmap_add` crashed during its setup or teardown.
[----] Warning! The test `chmap::chmap_create` crashed during its setup or teardown.
[----] Warning! The test `chmap::chmap_distribution` crashed during its setup or teardown.
[----] Warning! The test `chmap::chmap_power_of_two` crashed during its setup or teardown.
but only, if I give the --no-early-exit option
Franklin Mathieu
@Snaipe
Apr 20 2016 14:16
CI builds with coverage, so I don't see why this is happening
Is this happening on the release?
Dominik
@kaidowei
Apr 20 2016 14:17
and I guess it is during teardown, because the results come in normally
yes, 2.2.1
Franklin Mathieu
@Snaipe
Apr 20 2016 14:17
What version of GCC & Gcov?
Dominik
@kaidowei
Apr 20 2016 14:17
gcov --version
gcov (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and I just saw, that the test runner crashes too
./test_all --version
Tests compiled with Criterion v2.2.1
Segmentation fault (core dumped)
Franklin Mathieu
@Snaipe
Apr 20 2016 14:20
I can't seem to reproduce that, this is weird
let me fire up an ubuntu vm
Could I get the full command line(s) used to build test_all?
Dominik
@kaidowei
Apr 20 2016 14:36
okay, @Snaipe please stop looking, I suspect some of our libs
because in another directory it does not crash
Franklin Mathieu
@Snaipe
Apr 20 2016 14:36
Okay
Also, as a heads up, don't forget to run your test with --no-early-exit
otherwise you won't get any coverage data
Dominik
@kaidowei
Apr 20 2016 14:36
yeah, we're doing that
but thanks
Dominik
@kaidowei
Apr 20 2016 15:46
grrrr, gcov crashes, if you use #pragma pack(1) somewhere in your code
Franklin Mathieu
@Snaipe
Apr 20 2016 15:48
that's unfortunate
Franklin Mathieu
@Snaipe
Apr 20 2016 16:06
Why don't you use a per-structure pack attribute?
#pragma pack is a bit evil
Dominik
@kaidowei
Apr 20 2016 16:07
legacy code :p
#pragma pack(push, 1)
...
#pragma pack(pop)
that works too
Dominik
@kaidowei
Apr 20 2016 16:57
@Snaipe a little off topic: Which program do you use to analyze gcov information?
Franklin Mathieu
@Snaipe
Apr 20 2016 16:58
lcov & genhtml does the job for me locally
otherwise I'm mostly using the formatted reports at codecov.io
as they have a browser plugin for github that displays coverage % while browsing files
Dominik
@kaidowei
Apr 20 2016 17:01
codecov.io seems great, but ppl here are against external services
Franklin Mathieu
@Snaipe
Apr 20 2016 17:01
lcov + genhtml will do a great job for you then
Dominik
@kaidowei
Apr 20 2016 17:01
I tried lcov, but maybe, I have to test it more... wasn't satisfied with the results
thanks anyway
Franklin Mathieu
@Snaipe
Apr 20 2016 17:02
you can also make it generate the reports when pushing with a git hook
are you using a specific service internally, or just a bare git directory available through ssh?
because if you happen to use something like gitlab, there might be ways to integrate both
Dominik
@kaidowei
Apr 20 2016 17:03
:D :D :D
nope nope nope
internal service + svn
Franklin Mathieu
@Snaipe
Apr 20 2016 17:03
ooh, right
I forgot it was svn
Dominik
@kaidowei
Apr 20 2016 17:04
well, I'm trying to introduce jenkins
and want to show coverage information within that
Dominik
@kaidowei
Apr 20 2016 17:11
grrr, our source is not in the same directory as the gcda information... and lcov can't open the source. sigh
Franklin Mathieu
@Snaipe
Apr 20 2016 17:12
what options are you using? I always build out of source, so my sources & gcdas are not in the same dir
Dominik
@kaidowei
Apr 20 2016 17:14
lcov --base-directory . --directory . --capture --output-file i3.info
Franklin Mathieu
@Snaipe
Apr 20 2016 17:15
--base-directory and --directoryshould probably be different then
try setting the base dir to your project root and directory to the dir containing .gcdas
Dominik
@kaidowei
Apr 20 2016 21:11
lcov does not create xml... I found gcovr
but that thing has some bugs too
but thank you