[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}
This commit is contained in:
Clemens Backes 2020-11-05 11:32:30 +01:00 committed by Commit Bot
parent 98063ce401
commit 26b0eb6746
2 changed files with 10 additions and 0 deletions

View File

@ -165,4 +165,11 @@
'runtime-call-stats/collection': [SKIP],
}], # stress_concurrent_allocation
##############################################################################
['asan == True', {
# There are lots of memory leaks, thus skip all inspector tests for now
# (https://crbug.com/v8/11107).
'*': [SKIP],
}], # asan == True
]

View File

@ -137,6 +137,9 @@ class ExpectedOutProc(OutProc):
self._regenerate_expected_files = regenerate_expected_files
def _is_failure_output(self, output):
if output.exit_code != 0:
return True
with open(self._expected_filename, 'r') as f:
expected_lines = f.readlines()