summaryrefslogtreecommitdiff
path: root/deps/v8/tools/testrunner/testproc
diff options
context:
space:
mode:
authorMatheus Marchini <mmarchini@netflix.com>2020-03-05 10:49:19 -0800
committerMatheus Marchini <mmarchini@netflix.com>2020-03-18 16:23:22 -0700
commit2883c855e0105b51e5c8020d21458af109ffe3d4 (patch)
tree26777aad0a398e9f7755c8b65ac76827fe352a81 /deps/v8/tools/testrunner/testproc
parent5f0af2af2a67216e00fe07ccda11e889d14abfcd (diff)
downloadnode-new-2883c855e0105b51e5c8020d21458af109ffe3d4.tar.gz
deps: update V8 to 8.1.307.20
PR-URL: https://github.com/nodejs/node/pull/32116 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'deps/v8/tools/testrunner/testproc')
-rw-r--r--deps/v8/tools/testrunner/testproc/fuzzer.py51
-rw-r--r--deps/v8/tools/testrunner/testproc/progress.py46
2 files changed, 49 insertions, 48 deletions
diff --git a/deps/v8/tools/testrunner/testproc/fuzzer.py b/deps/v8/tools/testrunner/testproc/fuzzer.py
index 187145b4c8..271737897a 100644
--- a/deps/v8/tools/testrunner/testproc/fuzzer.py
+++ b/deps/v8/tools/testrunner/testproc/fuzzer.py
@@ -8,6 +8,48 @@ import time
from . import base
+# Extra flags randomly added to all fuzz tests with numfuzz. List of tuples
+# (probability, flag).
+EXTRA_FLAGS = [
+ (0.1, '--always-opt'),
+ (0.1, '--assert-types'),
+ (0.1, '--cache=code'),
+ (0.1, '--force-slow-path'),
+ (0.2, '--future'),
+ (0.1, '--liftoff'),
+ (0.2, '--no-analyze-environment-liveness'),
+ (0.1, '--no-enable-sse3'),
+ (0.1, '--no-enable-ssse3'),
+ (0.1, '--no-enable-sse4_1'),
+ (0.1, '--no-enable-sse4_2'),
+ (0.1, '--no-enable-sahf'),
+ (0.1, '--no-enable-avx'),
+ (0.1, '--no-enable-fma3'),
+ (0.1, '--no-enable-bmi1'),
+ (0.1, '--no-enable-bmi2'),
+ (0.1, '--no-enable-lzcnt'),
+ (0.1, '--no-enable-popcnt'),
+ (0.1, '--no-liftoff'),
+ (0.1, '--no-opt'),
+ (0.2, '--no-regexp-tier-up'),
+ (0.1, '--no-wasm-tier-up'),
+ (0.1, '--regexp-interpret-all'),
+ (0.1, '--regexp-tier-up-ticks=10'),
+ (0.1, '--regexp-tier-up-ticks=100'),
+ (0.1, '--stress-background-compile'),
+ (0.1, '--stress-lazy-source-positions'),
+ (0.1, '--stress-wasm-code-gc'),
+ (0.1, '--turbo-instruction-scheduling'),
+ (0.1, '--turbo-stress-instruction-scheduling'),
+]
+
+def random_extra_flags(rng):
+ """Returns a random list of flags chosen from the configurations in
+ EXTRA_FLAGS.
+ """
+ return [flag for prob, flag in EXTRA_FLAGS if rng.random() < prob]
+
+
class FuzzerConfig(object):
def __init__(self, probability, analyzer, fuzzer):
"""
@@ -92,7 +134,6 @@ class FuzzerProc(base.TestProcProducer):
return self._create_subtest(test, 'analysis', flags=analysis_flags,
keep_output=True)
-
def _result_for(self, test, subtest, result):
if not self._disable_analysis:
if result is not None:
@@ -110,7 +151,7 @@ class FuzzerProc(base.TestProcProducer):
# analysis phase at all, so no fuzzer has it's own analyzer.
gens = []
indexes = []
- for i, fuzzer_config in enumerate(self._fuzzer_configs):
+ for fuzzer_config in self._fuzzer_configs:
analysis_value = None
if analysis_result and fuzzer_config.analyzer:
analysis_value = fuzzer_config.analyzer.do_analysis(analysis_result)
@@ -132,7 +173,7 @@ class FuzzerProc(base.TestProcProducer):
main_index = self._rng.choice(indexes)
_, main_gen = gens[main_index]
- flags = next(main_gen)
+ flags = random_extra_flags(self._rng) + next(main_gen)
for index, (p, gen) in enumerate(gens):
if index == main_index:
continue
@@ -205,7 +246,7 @@ class GcIntervalAnalyzer(Analyzer):
class GcIntervalFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
if analysis_value:
- value = analysis_value / 10
+ value = analysis_value // 10
else:
value = 10000
while True:
@@ -260,7 +301,7 @@ class DeoptFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
if analysis_value:
- value = analysis_value / 2
+ value = analysis_value // 2
else:
value = 10000
interval = rng.randint(self._min, max(value, self._min))
diff --git a/deps/v8/tools/testrunner/testproc/progress.py b/deps/v8/tools/testrunner/testproc/progress.py
index 3bb9744f1e..d2e8a36038 100644
--- a/deps/v8/tools/testrunner/testproc/progress.py
+++ b/deps/v8/tools/testrunner/testproc/progress.py
@@ -14,7 +14,6 @@ import sys
import time
from . import base
-from ..local import junit_output
# Base dir of the build products for Release and Debug.
@@ -94,7 +93,7 @@ class SimpleProgressIndicator(ProgressIndicator):
print(result.output.stdout.strip())
print("Command: %s" % result.cmd.to_string())
if result.output.HasCrashed():
- print("exit code: %d" % result.output.exit_code)
+ print("exit code: %s" % result.output.exit_code_string)
print("--- CRASHED ---")
crashed += 1
if result.output.HasTimedOut():
@@ -248,7 +247,7 @@ class CompactProgressIndicator(ProgressIndicator):
print(self._templates['stderr'] % stderr)
print("Command: %s" % result.cmd.to_string(relative=True))
if output.HasCrashed():
- print("exit code: %d" % output.exit_code)
+ print("exit code: %s" % output.exit_code_string)
print("--- CRASHED ---")
if output.HasTimedOut():
print("--- TIMEOUT ---")
@@ -269,7 +268,7 @@ class CompactProgressIndicator(ProgressIndicator):
'progress': progress,
'failed': self._failed,
'test': name,
- 'mins': int(elapsed) / 60,
+ 'mins': int(elapsed) // 60,
'secs': int(elapsed) % 60
}
status = self._truncate(status, 78)
@@ -317,45 +316,6 @@ class MonochromeProgressIndicator(CompactProgressIndicator):
print(("\r" + (" " * last_length) + "\r"), end='')
-class JUnitTestProgressIndicator(ProgressIndicator):
- def __init__(self, junitout, junittestsuite):
- super(JUnitTestProgressIndicator, self).__init__()
- self._requirement = base.DROP_PASS_STDOUT
-
- self.outputter = junit_output.JUnitTestOutput(junittestsuite)
- if junitout:
- self.outfile = open(junitout, "w")
- else:
- self.outfile = sys.stdout
-
- def _on_result_for(self, test, result):
- # TODO(majeski): Support for dummy/grouped results
- fail_text = ""
- output = result.output
- if result.has_unexpected_output:
- stdout = output.stdout.strip()
- if len(stdout):
- fail_text += "stdout:\n%s\n" % stdout
- stderr = output.stderr.strip()
- if len(stderr):
- fail_text += "stderr:\n%s\n" % stderr
- fail_text += "Command: %s" % result.cmd.to_string()
- if output.HasCrashed():
- fail_text += "exit code: %d\n--- CRASHED ---" % output.exit_code
- if output.HasTimedOut():
- fail_text += "--- TIMEOUT ---"
- self.outputter.HasRunTest(
- test_name=str(test),
- test_cmd=result.cmd.to_string(relative=True),
- test_duration=output.duration,
- test_failure=fail_text)
-
- def finished(self):
- self.outputter.FinishAndWrite(self.outfile)
- if self.outfile != sys.stdout:
- self.outfile.close()
-
-
class JsonTestProgressIndicator(ProgressIndicator):
def __init__(self, framework_name, json_test_results, arch, mode):
super(JsonTestProgressIndicator, self).__init__()