From: Radoslaw Zarzynski Date: Wed, 3 Jun 2020 13:44:26 +0000 (+0200) Subject: teuthology/misc: Valgrind exits on first detected error. X-Git-Tag: 1.1.0~92^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a98eb3e1405c8ca8f6933eb0356c03955e4e2e83;p=teuthology.git teuthology/misc: Valgrind exits on first detected error. Valgrind v3.14 brought the `--exit-on-first-error` option which causes termination of the process on first encountered error. Although it does nothing for memory leaks, it should help with pin-pointing e.g. `UninitValue` without imposing the costly `--track-origins=yes`. Signed-off-by: Radoslaw Zarzynski --- diff --git a/teuthology/misc.py b/teuthology/misc.py index 41816a256f..08264ba98d 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -1075,6 +1075,9 @@ def get_valgrind_args(testdir, name, preamble, v): '--xml-file={vdir}/{n}.log'.format(vdir=val_path, n=name), '--time-stamp=yes', '--vgdb=yes', + # at least Valgrind 3.14 is required + '--exit-on-first-error=yes', + '--error-exitcode=42', ] else: extra_args = [ @@ -1085,6 +1088,8 @@ def get_valgrind_args(testdir, name, preamble, v): '--log-file={vdir}/{n}.log'.format(vdir=val_path, n=name), '--time-stamp=yes', '--vgdb=yes', + '--exit-on-first-error=yes', + '--error-exitcode=42', ] args = [ 'cd', testdir,