From 9b3f36f91f6615ec9ca30b18caa4b49971cbb519 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 10 Sep 2015 10:44:34 -0400 Subject: [PATCH] ceph: add option to expect valgind errors and fail if there are none See #10328 Signed-off-by: Sage Weil --- tasks/ceph.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks/ceph.py b/tasks/ceph.py index e0b7d8d231c..3226e58ac3f 100644 --- a/tasks/ceph.py +++ b/tasks/ceph.py @@ -246,8 +246,12 @@ def valgrind_post(ctx, config): log.error('saw valgrind issue %s in %s', kind, file) valgrind_exception = Exception('saw valgrind issues') - if valgrind_exception is not None: - raise valgrind_exception + if config.get('expect_valgrind_errors'): + if not valgrind_exception: + raise Exception('expected valgrind issues and found none') + else: + if valgrind_exception: + raise valgrind_exception @contextlib.contextmanager def crush_setup(ctx, config):