ceph: add option to expect valgind errors and fail if there are none

See #10328
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2015-09-10 10:44:34 -04:00
parent 88e4a2451a
commit 9b3f36f91f

View File

@ -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):