Bug 1410528 - Suppress minidumps for crash tests, r=jonco
authorSteve Fink <sfink@mozilla.com>
Fri, 03 Nov 2017 16:04:35 -0700
changeset 444572 83af876d4fa01fe675e7249c071659db55750e81
parent 444571 55903b8dbfbd61522213eca321223ef4dbd2136f
child 444573 c84df10506004cd3055b263e2de32401a8f8263a
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1410528
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1410528 - Suppress minidumps for crash tests, r=jonco
js/src/shell/js.cpp
js/src/tests/lib/jittests.py
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -8857,16 +8857,17 @@ main(int argc, char** argv, char** envp)
 #ifdef JS_GC_ZEAL
         || !op.addStringOption('z', "gc-zeal", "LEVEL(;LEVEL)*[,N]", gc::ZealModeHelpText)
 #else
         || !op.addStringOption('z', "gc-zeal", "LEVEL(;LEVEL)*[,N]", "option ignored in non-gc-zeal builds")
 #endif
         || !op.addStringOption('\0', "module-load-path", "DIR", "Set directory to load modules from")
         || !op.addBoolOption('\0', "no-async-stacks", "Disable async stacks")
         || !op.addMultiStringOption('\0', "dll", "LIBRARY", "Dynamically load LIBRARY")
+        || !op.addBoolOption('\0', "suppress-minidump", "Suppress crash minidumps")
     )
     {
         return EXIT_FAILURE;
     }
 
     op.setArgTerminatesOptions("script", true);
     op.setArgCapturesRest("scriptArgs");
 
@@ -8914,16 +8915,19 @@ main(int argc, char** argv, char** envp)
     AutoLibraryLoader loader;
     MultiStringRange dllPaths = op.getMultiStringOption("dll");
     while (!dllPaths.empty()) {
         char* path = dllPaths.front();
         loader.load(path);
         dllPaths.popFront();
     }
 
+    if (op.getBoolOption("suppress-minidump"))
+        js::NoteIntentionalCrash();
+
     if (!InitSharedArrayBufferMailbox())
         return 1;
 
     // The fake CPU count must be set before initializing the Runtime,
     // which spins up the thread pool.
     int32_t cpuCount = op.getIntOption("cpu-count"); // What we're really setting
     if (cpuCount < 0)
         cpuCount = op.getIntOption("thread-count");  // Legacy name
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -322,16 +322,20 @@ class JitTest:
             cmd += ['--module', path]
         elif self.test_reflect_stringify is None:
             cmd += ['-f', path]
         else:
             cmd += ['--', self.test_reflect_stringify, "--check", path]
 
         if self.valgrind:
             cmd = self.VALGRIND_CMD + cmd
+
+        if self.allow_unhandlable_oom or self.expect_crash:
+            cmd += ['--suppress-minidump']
+
         return cmd
 
     # The test runner expects this to be set to give to get_command.
     js_cmd_prefix = None
     def get_command(self, prefix):
         """Shim for the test runner."""
         return self.command(prefix, LIB_DIR, MODULE_DIR)