From a98eb3e1405c8ca8f6933eb0356c03955e4e2e83 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Wed, 3 Jun 2020 15:44:26 +0200 Subject: [PATCH] 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 --- teuthology/misc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/misc.py b/teuthology/misc.py index 41816a256..08264ba98 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, -- 2.47.3