From: Sage Weil Date: Wed, 14 Mar 2012 20:20:54 +0000 (-0700) Subject: run valgrind with cwd set to /tmp/cephtest/archive/coredump X-Git-Tag: 1.1.0~2606 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=94f0ba1efe73c1927615ab8feae649b2c5991346;p=teuthology.git run valgrind with cwd set to /tmp/cephtest/archive/coredump This lets us capture the vgcore.* files, which always go to valgrind's cwd. Fixes: #1953 --- diff --git a/teuthology/misc.py b/teuthology/misc.py index ff630cb57..22f503c24 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -488,11 +488,13 @@ def get_valgrind_args(name, v): val_path = '/tmp/cephtest/archive/log/valgrind' if '--tool=memcheck' in v or '--tool=helgrind' in v: extra_args = [ + '/tmp/cephtest/chdir-coredump', 'valgrind', '--xml=yes', '--xml-file={vdir}/{n}.log'.format(vdir=val_path, n=name) ] else: extra_args = [ + '/tmp/cephtest/chdir-coredump', 'valgrind', '--log-file={vdir}/{n}.log'.format(vdir=val_path, n=name) ] diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 43f31bace..24ad1126b 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -121,7 +121,7 @@ def ceph_log(ctx, config): @contextlib.contextmanager def ship_utilities(ctx, config): assert config is None - FILES = ['daemon-helper', 'enable-coredump'] + FILES = ['daemon-helper', 'enable-coredump', 'chdir-coredump'] for filename in FILES: log.info('Shipping %r...', filename) src = os.path.join(os.path.dirname(__file__), filename) diff --git a/teuthology/task/chdir-coredump b/teuthology/task/chdir-coredump new file mode 100644 index 000000000..cf1acd454 --- /dev/null +++ b/teuthology/task/chdir-coredump @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +# valgrind only dumps to cwd, so cwd there... +cd /tmp/cephtest/archive/coredump + +exec "$@"