]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology/misc: Valgrind exits on first detected error. 1503/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 3 Jun 2020 13:44:26 +0000 (15:44 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 4 Jun 2020 21:30:45 +0000 (23:30 +0200)
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 <rzarzyns@redhat.com>
teuthology/misc.py

index 41816a256fe4acf42e7deac69880f8f59d8e8d4f..08264ba98d83d0c30eeed5d24887650e6c939643 100644 (file)
@@ -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,