Commit Graph

24 Commits

Author SHA1 Message Date
Matthias Liedtke
9ea588d52b [test] testrunner: Print diff if stdout does not match
This extends the ExpectedOutProc runner to print a diff between the
expected and actual output. The behavior of other runners is unchanged.

Change-Id: If2b89d39cf98b8d257b1a209b5471a79ec3868ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3771641
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81966}
2022-07-26 13:05:27 +00:00
Michael Achenbach
3212b90600 [numfuzz] Gracefully ignore contradictory flags
NumFuzz passes various flags to V8 testing randomly, which can lead to
various flag contradictions with existing flags. Up to now the system
ignored the check for contradictions and kept running the test cases,
leading to false positives.

This change adds a new v8 flag --exit-on-contradictory-flags that
exists gracefully when a contradiction is detected. On the numfuzz
side we now filter simple contradictions beforehand.

Measurements showed that ~2% of all numfuzz tests ran into
contradictions. Around half of them are simple contradictions
(repetitions and inversions), which are now filtered beforehand.
The remaining ones (redundant or contradictory implications) are
now ignored.

Bug: v8:11826
Change-Id: I9942e203ba9668a097fabe1343dd1365c9da94c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650746
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80589}
2022-05-17 13:09:07 +00:00
Michael Achenbach
b086206161 Reland "[tools] Clean up py2 code"
This is a reland of commit 1289704aae

Mac-arm64 problem fixed by:
https://crrev.com/c/3550199

Original change's description:
> [tools] Clean up py2 code
>
> Bug: chromium:1292013
> Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79507}

Bug: chromium:1292013
Change-Id: Iadf0ccf94c82012088b76a866296c8e008dff02f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550274
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79624}
2022-03-25 12:14:26 +00:00
Michael Achenbach
f7aac0cf9f Revert "[tools] Clean up py2 code"
This reverts commit 1289704aae.

Reason for revert:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20release/8735/overview

Original change's description:
> [tools] Clean up py2 code
>
> Bug: chromium:1292013
> Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79507}

Bug: chromium:1292013
Change-Id: I48c38209220b775d0caa45f487ed163f78333e0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532228
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#79508}
2022-03-17 10:07:38 +00:00
Michael Achenbach
1289704aae [tools] Clean up py2 code
Bug: chromium:1292013
Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79507}
2022-03-17 09:16:57 +00:00
Michael Achenbach
a7a0b7650c [infra] More Python3 test-runner fixes
Bug: chromium:1292013
Change-Id: Ifcaad3fe346e59914050b34969bd63a230166491
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3452116
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79047}
2022-02-11 13:00:04 +00:00
Michael Achenbach
9e9d9142d6 [infra] Testrunner fixes for Python3 compatibility
Using UTF-8 encoding couldn't properly read:
test/webkit/parser-high-byte-character.js

Fix itertools rename and one usage of map that's now an iterator.

Bug: chromium:1292016
Cq-Include-Trybots: luci.v8.try.triggered:v8_linux64_python3_rel_ng_triggered
Change-Id: I2b2ab72ce0eb355d1e70f247b5ea38d1d71c7845
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439914
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78957}
2022-02-04 17:58:05 +00:00
Al Muthanna Athamina
f35bb272db Add PASS expectations in NumFuzz behind infra-staging
Bug: v8:11826
Cq-Include-Trybots: luci.v8.try:v8_numfuzz_dbg_ng,v8_numfuzz_ng,v8_numfuzz_tsan_ng
Change-Id: I1e77562cd86aa5b3a3a8c51e7bb4d37079b450d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118947
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76534}
2021-08-27 13:23:49 +00:00
Ng Zhi An
01c670e416 [message] Have message testcfg extend ExpectedOutProc
This will make --regenerate_expected_files flag work for message tests.

Bug: v8:10773
Change-Id: Ica87bd69bd0a41e2a3c168d2200d0cd0c7f094da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2842387
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74127}
2021-04-22 18:43:28 +00:00
Clemens Backes
26b0eb6746 [inspector][test] Fail on non-zero return code
While writing a new test I realized that the test did not fail if
running into a CHECK or UNREACHABLE *after* printing the last expected
line.
That is because both stderr and the exit status are ignored. This CL
fixes that.

This will uncover a lot of memory leaks, which I plan to address in
follow-up CLs.

R=machenbach@chromium.org
CC=​szuend@chromium.org

Bug: chromium:1142437, v8:11107
Cq-Include-Trybots: luci.v8.try:v8_linux64_asan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac64_asan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_win64_asan_rel_ng
Change-Id: I65f325abf102e063bb4f449353c47e94d84de652
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2519567
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71006}
2020-11-06 11:35:44 +00:00
Michael Achenbach
f3abba13f6 [test] Work around Android linker warning in message tests
Bug: chromium:1099623
Change-Id: Icbb6b0ebcc10628fafbef57cc6d1af7861e408f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270170
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68561}
2020-06-26 15:05:32 +00:00
Michael Achenbach
07e710208b [test] Work around Android linker warning in test output
Bug: chromium:1099623
Change-Id: I88ab0cec0ba505dcfc77d2f5eb271321633ca3be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270165
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68556}
2020-06-26 11:52:12 +00:00
Z Nguyen-Huu
0ecbda1408 Introduce regenerate-expected-files for run-test
Example can be inspector tests.

Bug: v8:10264
Change-Id: I996bb68d0f36920568a04f93cd8c1256a4f41a96
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2070912
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66572}
2020-03-03 18:58:24 +00:00
Mathias Bynens
933f23f6ed [test] Simplify output processor logic
Instead of conditionally normalizing file paths, go back to using
the basename in the dynamically-generated regular expression
pattern.

Bug: v8:7950, v8:9395, v8:9406
Change-Id: I57d2449a8229a67b038c7fcffe36218848d9a575
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1681122
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62439}
2019-06-28 09:15:18 +00:00
Mathias Bynens
5c2c5ce133 [test] Remove module pragma in favor of .mjs
d8 treats files with the .mjs extension as modules instead of
classic scripts. Thus, the `// MODULE` pragma and its corresponding
logic in test runners can be removed in favor of explicitly adding
the extension.

Bug: v8:7950, v8:9395, v8:9406
Also-By: tmrts@chromium.org
Change-Id: Ic74328dc5c5f176bb4bdf6d74bdd4d3966279ba5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1675958
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62421}
2019-06-27 13:25:48 +00:00
Vadim Gorbachev
16b6266649 Python2 compatibility: fix flake8 report F632 F821
use '!=' instead of 'is not' with str
FileNotFoundError isn't exist in python2.7, use IOError instead.


Bug: chromium:948812
Change-Id: I241ff8a9321d612f2371a2a2e2deae948fa180e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549168
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60661}
2019-04-05 16:24:19 +00:00
Sergiy Belozorov
996cf21954 [tools] Generate additional variant for FAIL_PHASE_ONLY tests
The additional variant does not use wrapper disabling phase tests and negated
outcome processor. This allows to ensure that tests marked FAIL_PHASE_ONLY, do
actually fail without it.

R=machenbach@chromium.org

Bug: v8:8467
Change-Id: I66e07bd7107520872cc013bf0f33fdc6664baf56
Reviewed-on: https://chromium-review.googlesource.com/c/1361164
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58211}
2018-12-13 11:28:57 +00:00
Michael Achenbach
2acc4d440b [test] Add reusable negative-test output processor
Bug: chromium:846711
Change-Id: Ic51e31a48106e495c3dc7d75ef4c97fa82071a64
Reviewed-on: https://chromium-review.googlesource.com/1148057
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54633}
2018-07-24 09:50:18 +00:00
Michael Achenbach
99fad4115d [test] Forgive tests timing out on num-fuzzers
Timeouts on num-fuzzer only lead to false positives, as tests might
take unpredictably longer.

This CL forgives timeouts through a global override mechanism of the
expected outcomes. This allows to remove already existing scattered
code that allowed timeouts in some test suites only.

Bug: v8:6917
Change-Id: Ib131765d360e335789c1952bc6793ed051e016ea
Reviewed-on: https://chromium-review.googlesource.com/908454
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51188}
2018-02-08 23:08:05 +00:00
Michael Achenbach
e19bc613ca [test] Tolerate timeout on numfuzz with combined tests
A timeout result of randomly combined tests is not a useful indicator.
Therefore we ignore those now. This also prevents timeouts from being
re-run.

TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:6917
Change-Id: I8e5eb93e2f13067ca5270fb152c3dc1eda1bb3c2
Reviewed-on: https://chromium-review.googlesource.com/888559
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50879}
2018-01-26 08:04:15 +00:00
Michal Majewski
0998eda9a4 [test] Disable reduce result on the main process
Since we're not winning anything by changing the result between
processors on the main process, reduce is noop there and result is
immutable.

Bug: v8:6917
Change-Id: Ieb282e7abd4ab31162aee6b52493a6e1b6a25109
Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/878239
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50784}
2018-01-23 08:58:20 +00:00
Michal Majewski
60c17bf983 [test] Simplify passing results between test processors.
Bug: v8:6917
Change-Id: Id73e4892a0d1b3b9c5bdd70ccc136e7bd2edf360
Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/863603
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50565}
2018-01-15 08:51:40 +00:00
Michal Majewski
53a367ece4 [test] Use analysis flag in gc fuzzer.
Bug: v8:6972
Change-Id: I0f3f933f14b26771b73daa053c17ce4cf8906bd7
Reviewed-on: https://chromium-review.googlesource.com/819635
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50459}
2018-01-09 17:51:19 +00:00
Michal Majewski
9f7d440e98 [test] Check output on the worker process.
I added additional exception logging in the execution.py since
errors in processing results were really difficult to debug.

There is a problem on Windows with class serialization when
it comes from dynamically loaded module. To fix it I moved all
output processors to the tools/testrunner/outproc/ and import
them in test/*/testcfg.py.

Bug: v8:6917
Change-Id: Ida604641d659b006e91faf1d56a37769ec47f5f3
Reviewed-on: https://chromium-review.googlesource.com/842784
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50361}
2018-01-04 14:12:31 +00:00