* code coverage and teuthology
@ 2013-01-10 23:07 Loic Dachary
2013-01-14 17:26 ` Josh Durgin
0 siblings, 1 reply; 6+ messages in thread
From: Loic Dachary @ 2013-01-10 23:07 UTC (permalink / raw)
To: Ceph Development
[-- Attachment #1.1: Type: text/plain, Size: 1968 bytes --]
Hi,
I successfully run teuthology with the proposed 3node_rgw.yaml [1] and changing the flavor from basic to gcov [2]. I hoped to use cov-init.sh ( https://github.com/ceph/teuthology/blob/master/coverage/cov-init.sh ) and then coverage.sh but I can't figure out how to make it work.
Hints would be most appreciated ;-)
[1] 3node_rgw.yaml
check-locks: false
interactive-on-error: true
overrides:
ceph:
branch: master
fs: xfs
roles:
- - mon.a
- mon.c
- osd.0
- - mon.b
- mds.a
- osd.1
- - client.0
tasks:
- ceph: null
- rgw:
- client.0
- interactive:
targets:
(snip)
[2] http://gitbuilder.ceph.com/ceph-tarball-precise-x86_64-gcov/
diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py
index b62bc1d..99d4f18 100644
--- a/teuthology/task/ceph.py
+++ b/teuthology/task/ceph.py
@@ -1027,7 +1027,7 @@ def task(ctx, config):
dist = 'precise'
format = 'tarball'
arch = 'x86_64'
- flavor = 'basic'
+ flavor = 'gcov'
# First element: controlled by user (or not there, by default):
# used to choose the right distribution, e.g. "oneiric".
diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py
index 5c34433..54eaebb 100644
--- a/teuthology/task/kernel.py
+++ b/teuthology/task/kernel.py
@@ -183,7 +183,7 @@ def download_deb(ctx, config):
package='kernel',
sha1=src,
format='deb',
- flavor='basic',
+ flavor='gcov',
arch='x86_64',
dist='precise',
)
@@ -408,7 +408,7 @@ def task(ctx, config):
branch=role_config.get('branch'),
tag=role_config.get('tag'),
sha1=role_config.get('sha1'),
- flavor='basic',
+ flavor='gcov',
format='deb',
dist='precise',
arch='x86_64',
[-- Attachment #1.2: loic.vcf --]
[-- Type: text/x-vcard, Size: 342 bytes --]
begin:vcard
fn:Loic Dachary
n:Dachary;Loic
org:Artisan Logiciel Libre
adr:;;12 bd Magenta;Paris;;75010;France
email;internet:loic@dachary.org
title:Senior Developer
tel;work:+33 4 84 25 08 05
tel;home:+33 9 51 18 43 38
tel;cell:+33 6 64 03 29 07
note:Born 131414404 before EPOCH.
url:http://dachary.org/
version:2.1
end:vcard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: code coverage and teuthology
2013-01-10 23:07 code coverage and teuthology Loic Dachary
@ 2013-01-14 17:26 ` Josh Durgin
2013-01-15 10:10 ` Loic Dachary
0 siblings, 1 reply; 6+ messages in thread
From: Josh Durgin @ 2013-01-14 17:26 UTC (permalink / raw)
To: Loic Dachary; +Cc: Ceph Development
On 01/10/2013 03:07 PM, Loic Dachary wrote:
> Hi,
>
> I successfully run teuthology with the proposed 3node_rgw.yaml [1] and changing the flavor from basic to gcov [2]. I hoped to use cov-init.sh ( https://github.com/ceph/teuthology/blob/master/coverage/cov-init.sh ) and then coverage.sh but I can't figure out how to make it work.
>
> Hints would be most appreciated ;-)
Looking at how it's run automatically might help:
https://github.com/ceph/teuthology/blob/master/teuthology/coverage.py#L88
> [1] 3node_rgw.yaml
>
> check-locks: false
> interactive-on-error: true
> overrides:
> ceph:
> branch: master
> fs: xfs
You should also add 'coverage: true' for the ceph task overrides.
This way daemons are killed with SIGTERM, and the atexit function
that outputs coverage information will run.
Then you don't need your patch changing the flavor either.
For each task X, the docstring for teuthology.task.X.task documents
example usage and extra options like this.
Josh
> roles:
> - - mon.a
> - mon.c
> - osd.0
> - - mon.b
> - mds.a
> - osd.1
> - - client.0
> tasks:
> - ceph: null
> - rgw:
> - client.0
> - interactive:
>
> targets:
> (snip)
>
> [2] http://gitbuilder.ceph.com/ceph-tarball-precise-x86_64-gcov/
>
> diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py
> index b62bc1d..99d4f18 100644
> --- a/teuthology/task/ceph.py
> +++ b/teuthology/task/ceph.py
> @@ -1027,7 +1027,7 @@ def task(ctx, config):
> dist = 'precise'
> format = 'tarball'
> arch = 'x86_64'
> - flavor = 'basic'
> + flavor = 'gcov'
>
> # First element: controlled by user (or not there, by default):
> # used to choose the right distribution, e.g. "oneiric".
> diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py
> index 5c34433..54eaebb 100644
> --- a/teuthology/task/kernel.py
> +++ b/teuthology/task/kernel.py
> @@ -183,7 +183,7 @@ def download_deb(ctx, config):
> package='kernel',
> sha1=src,
> format='deb',
> - flavor='basic',
> + flavor='gcov',
> arch='x86_64',
> dist='precise',
> )
> @@ -408,7 +408,7 @@ def task(ctx, config):
> branch=role_config.get('branch'),
> tag=role_config.get('tag'),
> sha1=role_config.get('sha1'),
> - flavor='basic',
> + flavor='gcov',
> format='deb',
> dist='precise',
> arch='x86_64',
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: code coverage and teuthology
2013-01-14 17:26 ` Josh Durgin
@ 2013-01-15 10:10 ` Loic Dachary
2013-01-15 17:21 ` Josh Durgin
0 siblings, 1 reply; 6+ messages in thread
From: Loic Dachary @ 2013-01-15 10:10 UTC (permalink / raw)
To: Josh Durgin; +Cc: Ceph Development
[-- Attachment #1.1: Type: text/plain, Size: 2460 bytes --]
On 01/14/2013 06:26 PM, Josh Durgin wrote:
>
> Looking at how it's run automatically might help:
>
> https://github.com/ceph/teuthology/blob/master/teuthology/coverage.py#L88
>
>
> You should also add 'coverage: true' for the ceph task overrides.
> This way daemons are killed with SIGTERM, and the atexit function
> that outputs coverage information will run.
>
> Then you don't need your patch changing the flavor either.
> For each task X, the docstring for teuthology.task.X.task documents
> example usage and extra options like this.
Hi,
That helped a lot, thanks :-) I think I'm almost there. After running:
./virtualenv/bin/teuthology --archive /tmp/a1 /srv/3node_rgw.yaml
wget -O /tmp/build/tmp.tgz http://gitbuilder.ceph.com/ceph-tarball-precise-x86_64-gcov/sha1/$(cat /tmp/a1/ceph-sha1)/ceph.x86_64.tgz
echo ceph_build_output_dir: /tmp/build >> ~/.teuthology.yaml
./virtualenv/bin/teuthology-coverage -v --html-output /tmp/html --lcov-output /tmp/lcov --cov-tools-dir /srv/teuthology/coverage /tmp
I get
INFO:teuthology.coverage:initializing coverage data...
Retrieving source and .gcno files...
Initializing lcov files...
Deleting all .da files in /tmp/lcov/ceph/src and subdirectories
Done.
Capturing coverage data from /tmp/lcov/ceph/src
Found gcov version: 4.7.2
Scanning /tmp/lcov/ceph/src for .gcno files ...
Found 692 graph files in /tmp/lcov/ceph/src
Processing src/test_libhadoopcephfs_build-AuthMethodList.gcno
geninfo: ERROR: /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno: reached unexpected end of file
root@ceph:/srv/teuthology# ls -l /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
-rw-r--r-- 1 root root 41088 Jan 15 09:49 /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
I'm using
lcov: LCOV version 1.9
The only problem I can think of is that the machine I'm running lcov on is a Debian GNU/Linux Wheezy, trying to analyze coverage for binaries created for Ubuntu Precise. They are both amd64 but .gcno files may have dependencies to the toolchain.
Did you ever run into similar problems ?
Cheers
-----------------------------
check-locks: false
interactive-on-error: true
overrides:
ceph:
branch: master
flavor: gcov
coverage: true
fs: xfs
roles:
- - mon.a
- mon.c
- osd.0
- - mon.b
- mds.a
- osd.1
- - client.0
tasks:
- ceph:
coverage: true
targets:
...
[-- Attachment #1.2: loic.vcf --]
[-- Type: text/x-vcard, Size: 342 bytes --]
begin:vcard
fn:Loic Dachary
n:Dachary;Loic
org:Artisan Logiciel Libre
adr:;;12 bd Magenta;Paris;;75010;France
email;internet:loic@dachary.org
title:Senior Developer
tel;work:+33 4 84 25 08 05
tel;home:+33 9 51 18 43 38
tel;cell:+33 6 64 03 29 07
note:Born 131414404 before EPOCH.
url:http://dachary.org/
version:2.1
end:vcard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: code coverage and teuthology
2013-01-15 10:10 ` Loic Dachary
@ 2013-01-15 17:21 ` Josh Durgin
2013-01-15 20:23 ` Dan Mick
2013-01-16 12:52 ` Loic Dachary
0 siblings, 2 replies; 6+ messages in thread
From: Josh Durgin @ 2013-01-15 17:21 UTC (permalink / raw)
To: Loic Dachary; +Cc: Ceph Development
On 01/15/2013 02:10 AM, Loic Dachary wrote:
> On 01/14/2013 06:26 PM, Josh Durgin wrote:
>>
>> Looking at how it's run automatically might help:
>>
>> https://github.com/ceph/teuthology/blob/master/teuthology/coverage.py#L88
>>
>>
>> You should also add 'coverage: true' for the ceph task overrides.
>> This way daemons are killed with SIGTERM, and the atexit function
>> that outputs coverage information will run.
>>
>> Then you don't need your patch changing the flavor either.
>> For each task X, the docstring for teuthology.task.X.task documents
>> example usage and extra options like this.
> Hi,
>
> That helped a lot, thanks :-) I think I'm almost there. After running:
>
> ./virtualenv/bin/teuthology --archive /tmp/a1 /srv/3node_rgw.yaml
>
> wget -O /tmp/build/tmp.tgz http://gitbuilder.ceph.com/ceph-tarball-precise-x86_64-gcov/sha1/$(cat /tmp/a1/ceph-sha1)/ceph.x86_64.tgz
>
> echo ceph_build_output_dir: /tmp/build >> ~/.teuthology.yaml
>
> ./virtualenv/bin/teuthology-coverage -v --html-output /tmp/html --lcov-output /tmp/lcov --cov-tools-dir /srv/teuthology/coverage /tmp
>
> I get
>
> INFO:teuthology.coverage:initializing coverage data...
> Retrieving source and .gcno files...
> Initializing lcov files...
> Deleting all .da files in /tmp/lcov/ceph/src and subdirectories
> Done.
> Capturing coverage data from /tmp/lcov/ceph/src
> Found gcov version: 4.7.2
> Scanning /tmp/lcov/ceph/src for .gcno files ...
> Found 692 graph files in /tmp/lcov/ceph/src
> Processing src/test_libhadoopcephfs_build-AuthMethodList.gcno
> geninfo: ERROR: /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno: reached unexpected end of file
>
> root@ceph:/srv/teuthology# ls -l /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
> -rw-r--r-- 1 root root 41088 Jan 15 09:49 /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
>
> I'm using
>
> lcov: LCOV version 1.9
>
> The only problem I can think of is that the machine I'm running lcov on is a Debian GNU/Linux Wheezy, trying to analyze coverage for binaries created for Ubuntu Precise. They are both amd64 but .gcno files may have dependencies to the toolchain.
>
> Did you ever run into similar problems ?
I think I did when I built and ran on debian, and it was fixed with a
later version of lcov (I think 1.9-2). I didn't try doing the coverage
analysis on a different distribution from where ceph was built and run
though, so that may also cause some issues.
Josh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: code coverage and teuthology
2013-01-15 17:21 ` Josh Durgin
@ 2013-01-15 20:23 ` Dan Mick
2013-01-16 12:52 ` Loic Dachary
1 sibling, 0 replies; 6+ messages in thread
From: Dan Mick @ 2013-01-15 20:23 UTC (permalink / raw)
To: Josh Durgin; +Cc: Loic Dachary, Ceph Development
It would not surprise me at all if gcov files are *highly* version
dependent. I don't know one way or the other, but it seems very possible.
On 01/15/2013 09:21 AM, Josh Durgin wrote:
> On 01/15/2013 02:10 AM, Loic Dachary wrote:
>> On 01/14/2013 06:26 PM, Josh Durgin wrote:
>>>
>>> Looking at how it's run automatically might help:
>>>
>>> https://github.com/ceph/teuthology/blob/master/teuthology/coverage.py#L88
>>>
>>>
>>>
>>> You should also add 'coverage: true' for the ceph task overrides.
>>> This way daemons are killed with SIGTERM, and the atexit function
>>> that outputs coverage information will run.
>>>
>>> Then you don't need your patch changing the flavor either.
>>> For each task X, the docstring for teuthology.task.X.task documents
>>> example usage and extra options like this.
>> Hi,
>>
>> That helped a lot, thanks :-) I think I'm almost there. After running:
>>
>> ./virtualenv/bin/teuthology --archive /tmp/a1 /srv/3node_rgw.yaml
>>
>> wget -O /tmp/build/tmp.tgz
>> http://gitbuilder.ceph.com/ceph-tarball-precise-x86_64-gcov/sha1/$(cat
>> /tmp/a1/ceph-sha1)/ceph.x86_64.tgz
>>
>> echo ceph_build_output_dir: /tmp/build >> ~/.teuthology.yaml
>>
>> ./virtualenv/bin/teuthology-coverage -v --html-output /tmp/html
>> --lcov-output /tmp/lcov --cov-tools-dir /srv/teuthology/coverage /tmp
>>
>> I get
>>
>> INFO:teuthology.coverage:initializing coverage data...
>> Retrieving source and .gcno files...
>> Initializing lcov files...
>> Deleting all .da files in /tmp/lcov/ceph/src and subdirectories
>> Done.
>> Capturing coverage data from /tmp/lcov/ceph/src
>> Found gcov version: 4.7.2
>> Scanning /tmp/lcov/ceph/src for .gcno files ...
>> Found 692 graph files in /tmp/lcov/ceph/src
>> Processing src/test_libhadoopcephfs_build-AuthMethodList.gcno
>> geninfo: ERROR:
>> /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno:
>> reached unexpected end of file
>>
>> root@ceph:/srv/teuthology# ls -l
>> /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
>> -rw-r--r-- 1 root root 41088 Jan 15 09:49
>> /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
>>
>> I'm using
>>
>> lcov: LCOV version 1.9
>>
>> The only problem I can think of is that the machine I'm running lcov
>> on is a Debian GNU/Linux Wheezy, trying to analyze coverage for
>> binaries created for Ubuntu Precise. They are both amd64 but .gcno
>> files may have dependencies to the toolchain.
>>
>> Did you ever run into similar problems ?
>
> I think I did when I built and ran on debian, and it was fixed with a
> later version of lcov (I think 1.9-2). I didn't try doing the coverage
> analysis on a different distribution from where ceph was built and run
> though, so that may also cause some issues.
>
> Josh
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: code coverage and teuthology
2013-01-15 17:21 ` Josh Durgin
2013-01-15 20:23 ` Dan Mick
@ 2013-01-16 12:52 ` Loic Dachary
1 sibling, 0 replies; 6+ messages in thread
From: Loic Dachary @ 2013-01-16 12:52 UTC (permalink / raw)
To: Josh Durgin; +Cc: Ceph Development
[-- Attachment #1.1: Type: text/plain, Size: 2932 bytes --]
On 01/15/2013 06:21 PM, Josh Durgin wrote:
> On 01/15/2013 02:10 AM, Loic Dachary wrote:
>> On 01/14/2013 06:26 PM, Josh Durgin wrote:
>>>
>>> Looking at how it's run automatically might help:
>>>
>>> https://github.com/ceph/teuthology/blob/master/teuthology/coverage.py#L88
>>>
>>>
>>> You should also add 'coverage: true' for the ceph task overrides.
>>> This way daemons are killed with SIGTERM, and the atexit function
>>> that outputs coverage information will run.
>>>
>>> Then you don't need your patch changing the flavor either.
>>> For each task X, the docstring for teuthology.task.X.task documents
>>> example usage and extra options like this.
>> Hi,
>>
>> That helped a lot, thanks :-) I think I'm almost there. After running:
>>
>> ./virtualenv/bin/teuthology --archive /tmp/a1 /srv/3node_rgw.yaml
>>
>> wget -O /tmp/build/tmp.tgz http://gitbuilder.ceph.com/ceph-tarball-precise-x86_64-gcov/sha1/$(cat /tmp/a1/ceph-sha1)/ceph.x86_64.tgz
>>
>> echo ceph_build_output_dir: /tmp/build >> ~/.teuthology.yaml
>>
>> ./virtualenv/bin/teuthology-coverage -v --html-output /tmp/html --lcov-output /tmp/lcov --cov-tools-dir /srv/teuthology/coverage /tmp
>>
>> I get
>>
>> INFO:teuthology.coverage:initializing coverage data...
>> Retrieving source and .gcno files...
>> Initializing lcov files...
>> Deleting all .da files in /tmp/lcov/ceph/src and subdirectories
>> Done.
>> Capturing coverage data from /tmp/lcov/ceph/src
>> Found gcov version: 4.7.2
>> Scanning /tmp/lcov/ceph/src for .gcno files ...
>> Found 692 graph files in /tmp/lcov/ceph/src
>> Processing src/test_libhadoopcephfs_build-AuthMethodList.gcno
>> geninfo: ERROR: /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno: reached unexpected end of file
>>
>> root@ceph:/srv/teuthology# ls -l /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
>> -rw-r--r-- 1 root root 41088 Jan 15 09:49 /tmp/lcov/ceph/src/test_libhadoopcephfs_build-AuthMethodList.gcno
>>
>> I'm using
>>
>> lcov: LCOV version 1.9
>>
>> The only problem I can think of is that the machine I'm running lcov on is a Debian GNU/Linux Wheezy, trying to analyze coverage for binaries created for Ubuntu Precise. They are both amd64 but .gcno files may have dependencies to the toolchain.
>>
>> Did you ever run into similar problems ?
>
> I think I did when I built and ran on debian, and it was fixed with a
> later version of lcov (I think 1.9-2). I didn't try doing the coverage
> analysis on a different distribution from where ceph was built and run
> though, so that may also cause some issues.
It was indeed a compatibility problem : running lcov on precise works fine.
Thanks :-)
>
> Josh
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #1.2: loic.vcf --]
[-- Type: text/x-vcard, Size: 342 bytes --]
begin:vcard
fn:Loic Dachary
n:Dachary;Loic
org:Artisan Logiciel Libre
adr:;;12 bd Magenta;Paris;;75010;France
email;internet:loic@dachary.org
title:Senior Developer
tel;work:+33 4 84 25 08 05
tel;home:+33 9 51 18 43 38
tel;cell:+33 6 64 03 29 07
note:Born 131414404 before EPOCH.
url:http://dachary.org/
version:2.1
end:vcard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-16 12:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 23:07 code coverage and teuthology Loic Dachary
2013-01-14 17:26 ` Josh Durgin
2013-01-15 10:10 ` Loic Dachary
2013-01-15 17:21 ` Josh Durgin
2013-01-15 20:23 ` Dan Mick
2013-01-16 12:52 ` Loic Dachary
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.