From dc828d8407c48cb3a7ec281b428f7baed7b5cadd Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 26 Sep 2022 09:14:15 -0700 Subject: [PATCH] Port #7123 (#8315) Only run valgrind on the binary under test --- contrib/TestHarness2/test_harness/run.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/TestHarness2/test_harness/run.py b/contrib/TestHarness2/test_harness/run.py index f144ded0da..2cd24575fb 100644 --- a/contrib/TestHarness2/test_harness/run.py +++ b/contrib/TestHarness2/test_harness/run.py @@ -335,7 +335,12 @@ class TestRun: command: List[str] = [] env: Dict[str, str] = os.environ.copy() valgrind_file: Path | None = None - if self.use_valgrind: + if self.use_valgrind and self.binary == config.binary: + # Only run the binary under test under valgrind. There's nothing we + # can do about valgrind errors in old binaries anyway, and it makes + # the test take longer. Also old binaries weren't built with + # USE_VALGRIND=ON, and we have seen false positives with valgrind in + # such binaries. command.append('valgrind') valgrind_file = self.temp_path / Path('valgrind-{}.xml'.format(self.random_seed)) dbg_path = os.getenv('FDB_VALGRIND_DBGPATH')