Commit 0ceb3fce authored by Chong Gu's avatar Chong Gu Committed by Commit Bot

[Fuchsia] Fix crash detection for Fuchsia tests

Since there's no minidumps in Fuchsia browser, we detect crashes through checking for system info.
Filter one failing pixel test on Fuchsia

Bug: 1080853
Change-Id: I6ef8b33b64b6e6292ec4adfe8fa9538dde496d50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522115
Commit-Queue: Chong Gu <chonggu@google.com>
Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Auto-Submit: Chong Gu <chonggu@google.com>
Cr-Commit-Position: refs/heads/master@{#824723}
parent c5b40d76
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import logging import logging
import re import re
import sys import sys
import time
from telemetry.testing import serially_executed_browser_test_case from telemetry.testing import serially_executed_browser_test_case
from telemetry.util import screenshot from telemetry.util import screenshot
...@@ -284,8 +285,15 @@ class GpuIntegrationTest( ...@@ -284,8 +285,15 @@ class GpuIntegrationTest(
self._RestartBrowser('unexpected test failure') self._RestartBrowser('unexpected test failure')
raise raise
else: else:
# Fuchsia does not have minidump support, use system info to check
# for crash count.
if os_name == 'fuchsia':
total_expected_crashes = sum(expected_crashes.values())
actual_and_expected_crashes_match = self._CheckCrashCountMatch(
total_expected_crashes)
# We always want to clear any expected crashes, but we don't bother # We always want to clear any expected crashes, but we don't bother
# failing the test if it's expected to fail. # failing the test if it's expected to fail.
else:
actual_and_expected_crashes_match = self._ClearExpectedCrashes( actual_and_expected_crashes_match = self._ClearExpectedCrashes(
expected_crashes) expected_crashes)
if ResultType.Failure in expected_results: if ResultType.Failure in expected_results:
...@@ -294,6 +302,27 @@ class GpuIntegrationTest( ...@@ -294,6 +302,27 @@ class GpuIntegrationTest(
if not actual_and_expected_crashes_match: if not actual_and_expected_crashes_match:
raise RuntimeError('Actual and expected crashes did not match') raise RuntimeError('Actual and expected crashes did not match')
def _CheckCrashCountMatch(self, total_expected_crashes):
# We can't get crashes if we don't have a browser.
if self.browser is None:
return True
number_of_crashes = -1
system_info = self.browser.GetSystemInfo()
number_of_crashes = \
system_info.gpu.aux_attributes[u'process_crash_count']
retval = True
if number_of_crashes != total_expected_crashes:
retval = False
logging.warning('Expected %d gpu process crashes; got: %d' %
(total_expected_crashes, number_of_crashes))
if number_of_crashes > 0:
# Restarting is necessary because the crash count includes all
# crashes since the browser started.
self._RestartBrowser('Restarting browser to clear process crash count.')
return retval
@staticmethod @staticmethod
def _IsIntel(vendor_id): def _IsIntel(vendor_id):
return vendor_id == 0x8086 return vendor_id == 0x8086
......
...@@ -435,3 +435,4 @@ crbug.com/1097735 [ skia-renderer-dawn ] Pixel_PaintWorkletTransform [ Failure ] ...@@ -435,3 +435,4 @@ crbug.com/1097735 [ skia-renderer-dawn ] Pixel_PaintWorkletTransform [ Failure ]
# or ChromeOS. # or ChromeOS.
crbug.com/1129879 [ android ] Pixel_Video_Media_Stream_Incompatible_Stride [ Skip ] crbug.com/1129879 [ android ] Pixel_Video_Media_Stream_Incompatible_Stride [ Skip ]
crbug.com/1129879 [ chromeos ] Pixel_Video_Media_Stream_Incompatible_Stride [ Skip ] crbug.com/1129879 [ chromeos ] Pixel_Video_Media_Stream_Incompatible_Stride [ Skip ]
crbug.com/1129879 [ fuchsia ] Pixel_Video_Media_Stream_Incompatible_Stride [ Skip ]
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