This lets us capture the vgcore.* files, which always go to valgrind's
cwd.
Fixes: #1953
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)
]
@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)
--- /dev/null
+#!/bin/sh
+set -e
+
+# valgrind only dumps to cwd, so cwd there...
+cd /tmp/cephtest/archive/coredump
+
+exec "$@"