From 45fcca1fea3c84a9aa8d2d4c46abe2448fc9e024 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 4 Jul 2012 14:29:55 -0700 Subject: [PATCH] valgrind: add strptime suppressions Precise's strptime triggers valgrind false positives. Use ship_utilities to push the valgrind.supp file over, which is a bit slippy. --- teuthology/misc.py | 5 ++++- teuthology/task/ceph.py | 3 ++- teuthology/task/valgrind.supp | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 teuthology/task/valgrind.supp diff --git a/teuthology/misc.py b/teuthology/misc.py index 5c6c113925a07..db3133cf97437 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -493,13 +493,16 @@ def get_valgrind_args(name, v): if '--tool=memcheck' in v or '--tool=helgrind' in v: extra_args = [ '/tmp/cephtest/chdir-coredump', - 'valgrind', '--xml=yes', + 'valgrind', + '--suppressions=/tmp/cephtest/valgrind.supp', + '--xml=yes', '--xml-file={vdir}/{n}.log'.format(vdir=val_path, n=name) ] else: extra_args = [ '/tmp/cephtest/chdir-coredump', 'valgrind', + '--suppressions=/tmp/cephtest/valgrind.supp', '--log-file={vdir}/{n}.log'.format(vdir=val_path, n=name) ] extra_args.extend(v) diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 314a3268abefd..4003555080d09 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -121,7 +121,8 @@ def ceph_log(ctx, config): @contextlib.contextmanager def ship_utilities(ctx, config): assert config is None - FILES = ['daemon-helper', 'enable-coredump', 'chdir-coredump'] + FILES = ['daemon-helper', 'enable-coredump', 'chdir-coredump', + 'valgrind.supp'] for filename in FILES: log.info('Shipping %r...', filename) src = os.path.join(os.path.dirname(__file__), filename) diff --git a/teuthology/task/valgrind.supp b/teuthology/task/valgrind.supp new file mode 100644 index 0000000000000..da4bb5e1e7aa4 --- /dev/null +++ b/teuthology/task/valgrind.supp @@ -0,0 +1,21 @@ +{ + strptime suckage + Memcheck:Cond + fun:__GI___strncasecmp_l + fun:__strptime_internal + ... +} +{ + strptime suckage 2 + Memcheck:Value8 + fun:__GI___strncasecmp_l + fun:__strptime_internal + ... +} +{ + strptime suckage 3 + Memcheck:Addr8 + fun:__GI___strncasecmp_l + fun:__strptime_internal + ... +} -- 2.39.5