]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
run valgrind with cwd set to /tmp/cephtest/archive/coredump
authorSage Weil <sage@newdream.net>
Wed, 14 Mar 2012 20:20:54 +0000 (13:20 -0700)
committerSage Weil <sage@newdream.net>
Sun, 18 Mar 2012 17:48:51 +0000 (10:48 -0700)
This lets us capture the vgcore.* files, which always go to valgrind's
cwd.

Fixes: #1953
teuthology/misc.py
teuthology/task/ceph.py
teuthology/task/chdir-coredump [new file with mode: 0644]

index ff630cb577f14f3f5235c17398294866d41a9350..22f503c243f4090c0dd9d026412e1046ffa5897d 100644 (file)
@@ -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)
             ]
index 43f31bace96ccf4298c67795448444b57ab74af3..24ad1126b3d2b99e63aff74d79236a9ea79e1f99 100644 (file)
@@ -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 (file)
index 0000000..cf1acd4
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+
+# valgrind only dumps to cwd, so cwd there...
+cd /tmp/cephtest/archive/coredump
+
+exec "$@"