From 9ec19f13df26257059f9976187e289a36d54c78e Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Mon, 15 Aug 2011 15:32:23 -0700 Subject: [PATCH] ceph: Set up valgrind as a flavor, and create a dir for logging. Signed-off-by: Greg Farnum --- teuthology/task/ceph.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 3fa590fe48dff..aa06814a2ad43 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -753,6 +753,10 @@ def task(ctx, config): if config.get('coverage'): log.info('Recording coverage for this run.') flavor = 'gcov' + else: + if config.get('valgrind'): + log.info('Using notcmalloc flavor and running some daemons under valgrind') + flavor = 'notcmalloc' ctx.summary['flavor'] = flavor or 'default' coverage_dir = '/tmp/cephtest/archive/coverage' @@ -767,6 +771,18 @@ def task(ctx, config): ) ) + if config.get('valgrind'): + val_path = '/tmp/cephtest/archive/{val_dir}'.format(val_dir=config.get('valgrind').get('logs', "valgrind")) + run.wait( + ctx.cluster.run( + args=[ + 'mkdir', '-p', val_path + ], + wait=False, + ) + ) + + with contextutil.nested( lambda: ceph_log(ctx=ctx, config=None), lambda: ship_utilities(ctx=ctx, config=None), -- 2.39.5