summaryrefslogtreecommitdiff
path: root/jstests/resmoke_selftest
diff options
context:
space:
mode:
authorRichard Samuels <richard.samuels@mongodb.com>2020-05-28 16:21:17 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-05 13:24:34 +0000
commit38b125fc08c34b67aedf04d47a77c0dda45a7b89 (patch)
treebdd5f1cb536064999314b9de197ae7c6d3632e72 /jstests/resmoke_selftest
parent7074dee1fbf6763c0d463c377c2e47d8ef2c4f6f (diff)
downloadmongo-38b125fc08c34b67aedf04d47a77c0dda45a7b89.tar.gz
SERVER-47312 hang_analyzer: enable on ASAN builders without running gcore
Diffstat (limited to 'jstests/resmoke_selftest')
-rw-r--r--jstests/resmoke_selftest/shell_hang_analyzer.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/jstests/resmoke_selftest/shell_hang_analyzer.js b/jstests/resmoke_selftest/shell_hang_analyzer.js
index 8cd619f19f6..9fc58b628cd 100644
--- a/jstests/resmoke_selftest/shell_hang_analyzer.js
+++ b/jstests/resmoke_selftest/shell_hang_analyzer.js
@@ -28,11 +28,17 @@ try {
const lines = rawMongoProgramOutput().split('\n');
- if (TestData.isAsanBuild) {
- // Nothing should be executed, so there's no output.
- assert.eq(lines, ['']);
+ if (_isAddressSanitizerActive()) {
+ assert.soon(() => {
+ // On ASAN builds, we never dump the core during hang analyzer runs,
+ // nor should the output be empty (empty means it didn't run).
+ // If you're trying to debug why this test is failing, confirm that the
+ // hang_analyzer_dump_core expansion has not been set to true.
+ return !anyLineMatches(lines, /Dumping core/) && lines.length != 0;
+ });
} else {
assert.soon(() => {
+ // Outside of ASAN builds, we expect the core to be dumped.
return anyLineMatches(lines, /Dumping core/);
});
}