Bug 1000182, part 0 - Support unhandlable OOM in jit-test harness. r=terrence.
authorJason Orendorff <jorendorff@mozilla.com>
Fri, 27 Jun 2014 15:31:29 -0500
changeset 192511 8d67333d2868d8097058630b6b39f42bf48c89dd
parent 192510 0197c59b8802b9871379efa94de8791cac7df4a1
child 192512 eed0193207642716037b08150d10633955461560
push id27088
push usercbook@mozilla.com
push dateMon, 07 Jul 2014 12:19:04 +0000
treeherdermozilla-central@699348fd356b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1000182
milestone33.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 1000182, part 0 - Support unhandlable OOM in jit-test harness. r=terrence.
js/src/tests/lib/jittests.py
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -79,28 +79,30 @@ class Test:
         self.relpath_top = os.path.relpath(path, TOP_SRC_DIR)
 
         # Path relative to mozilla/js/src/jit-test/tests/.
         self.relpath_tests = os.path.relpath(path, TEST_DIR)
 
         self.jitflags = []     # jit flags to enable
         self.slow = False      # True means the test is slow-running
         self.allow_oom = False # True means that OOM is not considered a failure
+        self.allow_unhandlable_oom = False # True means CrashAtUnhandlableOOM is not considered a failure
         self.allow_overrecursed = False # True means that hitting recursion the
                                         # limits is not considered a failure.
         self.valgrind = False  # True means run under valgrind
         self.tz_pacific = False # True means force Pacific time for the test
         self.expect_error = '' # Errors to expect and consider passing
         self.expect_status = 0 # Exit status to expect from shell
 
     def copy(self):
         t = Test(self.path)
         t.jitflags = self.jitflags[:]
         t.slow = self.slow
         t.allow_oom = self.allow_oom
+        t.allow_unhandlable_oom = self.allow_unhandlable_oom
         t.allow_overrecursed = self.allow_overrecursed
         t.valgrind = self.valgrind
         t.tz_pacific = self.tz_pacific
         t.expect_error = self.expect_error
         t.expect_status = self.expect_status
         return t
 
     COOKIE = '|jit-test|'
@@ -136,16 +138,18 @@ class Test:
                             print("warning: couldn't parse thread-count %s" % value)
                     else:
                         print('warning: unrecognized |jit-test| attribute %s' % part)
                 else:
                     if name == 'slow':
                         test.slow = True
                     elif name == 'allow-oom':
                         test.allow_oom = True
+                    elif name == 'allow-unhandlable-oom':
+                        test.allow_unhandlable_oom = True
                     elif name == 'allow-overrecursed':
                         test.allow_overrecursed = True
                     elif name == 'valgrind':
                         test.valgrind = options.valgrind
                     elif name == 'tz-pacific':
                         test.tz_pacific = True
                     elif name == 'debug':
                         test.jitflags.append('--debugjit')
@@ -385,16 +389,21 @@ def check_output(out, err, rc, timed_out
         if sys.platform in ['win32', 'cygwin'] and rc == 0:
             return True
 
         # Allow a non-zero exit code if we want to allow OOM, but only if we
         # actually got OOM.
         if test.allow_oom and 'out of memory' in err and 'Assertion failure' not in err:
             return True
 
+        # Allow a non-zero exit code if we want to allow unhandlable OOM, but
+        # only if we actually got unhandlable OOM.
+        if test.allow_unhandlable_oom and 'Assertion failure: [unhandlable oom]' in err:
+            return True
+
         # Allow a non-zero exit code if we want to all too-much-recursion and
         # the test actually over-recursed.
         if test.allow_overrecursed and 'too much recursion' in err and 'Assertion failure' not in err:
             return True
 
         return False
 
     return True