Skip to content

Commit

Permalink
disable exact memory checks until we can sort out what changed in tcm…
Browse files Browse the repository at this point in the history
…alloc (#13447)

Signed-off-by: Joshua Marantz <jmarantz@google.com>
  • Loading branch information
jmarantz authored Oct 8, 2020
1 parent b7fd076 commit 45e4548
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/common/stats/stat_test_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,18 @@ MemoryTest::Mode MemoryTest::mode() {
const size_t end_mem = Memory::Stats::totalCurrentlyAllocated();
bool can_measure_memory = end_mem > start_mem;

// As of Oct 8, 2020, tcmalloc has changed such that Memory::Stats::totalCurrentlyAllocated
// is not deterministic, even with single-threaded tests. When possible, this should be fixed,
// and the following block of code uncommented. This affects approximate comparisons, not
// just exact ones.
#if 0
if (getenv("ENVOY_MEMORY_TEST_EXACT") != nullptr) { // Set in "ci/do_ci.sh" for 'release' tests.
RELEASE_ASSERT(can_measure_memory,
"$ENVOY_MEMORY_TEST_EXACT is set for canonical memory measurements, "
"but memory measurement looks broken");
return Mode::Canonical;
}
#endif

// Different versions of STL and other compiler/architecture differences may
// also impact memory usage, so when not compiling with MEMORY_TEST_EXACT,
Expand Down

0 comments on commit 45e4548

Please sign in to comment.