Commit f4411a32 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Properly load mjsunit.js on endurance fuzzer

Load mjsunit.js inside the realm as otherwise the functions are not
available in the realm's scope.

This also prints timestamps after each test to easier track down slow
tests.

We also pass --omit-quit to not stop too early.

This also adds the ability to skip certain tests for endurance
fuzzing and skips some tests with known problems.

TBR=ulan@chromium.org,hpayer@chromium.org

Bug: v8:6972, v8:7400
Change-Id: I44464c28bfb10c84f2e59972e7b86945a47ca3b3
Reviewed-on: https://chromium-review.googlesource.com/899008Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51066}
parent a1fc3c7b
......@@ -649,6 +649,22 @@
'es6/classes': [PASS, ['tsan', SKIP]],
}], # 'gc_fuzzer'
##############################################################################
['endurance_fuzzer', {
# BUG(v8:7400).
'wasm/lazy-compilation': [SKIP],
'regress/wasm/regress-7353': [SKIP],
'regress/wasm/regress-739768': [SKIP],
'regress/wasm/regress-803427': [SKIP],
'regress/wasm/regress-803788': [SKIP],
'regress/wasm/regress-724851': [SKIP],
'regress/wasm/regress-736584': [SKIP],
'regress/wasm/regress-715216b': [SKIP],
# Often crashes due to memory consumption.
'regress/regress-655573': [SKIP],
}], # 'endurance_fuzzer'
##############################################################################
['predictable == True', {
......
......@@ -205,18 +205,20 @@ class CombinedTest(testcase.TestCase):
"""In addition to standard set of shell flags it appends:
--disable-abortjs: %AbortJS can abort the test even inside
trycatch-wrapper, so we disable it.
--omit-quit: Calling quit() in JS would otherwise early terminate.
--quiet-load: suppress any stdout from load() function used by
trycatch-wrapper.
"""
shell = 'd8'
shell_flags = ['--test', '--disable-abortjs', '--quiet-load']
shell_flags = ['--test', '--disable-abortjs', '--omit-quit', '--quiet-load']
return shell, shell_flags
def _get_cmd_params(self):
return (
super(CombinedTest, self)._get_cmd_params() +
self._tests[0]._mjsunit_files +
['tools/testrunner/trycatch_loader.js', '--'] +
self._tests[0]._mjsunit_files +
['--'] +
[t._files_suffix[0] for t in self._tests]
)
......
......@@ -586,6 +586,7 @@ class BaseTestRunner(object):
"byteorder": sys.byteorder,
"dcheck_always_on": self.build_config.dcheck_always_on,
"deopt_fuzzer": False,
"endurance_fuzzer": False,
"gc_fuzzer": False,
"gc_stress": False,
"gcov_coverage": self.build_config.gcov_coverage,
......
......@@ -120,6 +120,7 @@ class NumFuzzer(base_runner.BaseTestRunner):
super(NumFuzzer, self)._get_statusfile_variables(options))
variables.update({
'deopt_fuzzer': bool(options.stress_deopt),
'endurance_fuzzer': bool(options.combine_tests),
'gc_stress': bool(options.stress_gc),
'gc_fuzzer': bool(max([options.stress_marking,
options.stress_scavenge,
......
......@@ -9,17 +9,34 @@
// It can't prevent %AbortJS function from aborting execution, so it should be
// used with d8's --disable-abortjs flag to ignore all possible errors inside
// tests.
for (let jstest of arguments) {
// We use -- as an additional separator for test preamble files and test files.
// The preamble files (before --) will be loaded in each realm before each
// test.
var separator = arguments.indexOf("--")
var preamble = arguments.slice(0, separator)
var tests = arguments.slice(separator + 1)
var preambleString = ""
for (let jstest of preamble) {
preambleString += "load(\"" + jstest + "\");"
}
for (let jstest of tests) {
print("Loading " + jstest);
let start = performance.now();
// anonymous function to not populate global namespace.
(function () {
let realm = Realm.create();
try {
Realm.eval(realm, "load(\"" + jstest + "\");");
Realm.eval(realm, preambleString + "load(\"" + jstest + "\");");
} catch (err) {
// ignore all errors
}
Realm.dispose(realm);
})();
let durationSec = ((performance.now() - start) / 1000.0).toFixed(2);
print("Duration " + durationSec + "s");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment