Commit 43267836 authored by Brian Sheedy's avatar Brian Sheedy Committed by Commit Bot

Fix and re-enable minidump tests on Linux

Fixes the Telemetry minidump tests failing on Linux by switching from
GetMostRecentMinidumpPath() to GetRcentMinidumpPathWithTimeout(), i.e.
blocking until a minidump is actually available instead of assuming one
has been written to disk by the time we check for it.

This will also hopefully fix similar issues on other platforms, but for
now, Linux is the only platform that is being re-enabled.

Bug: 634156
Change-Id: I1a4bb9e8710b322e9a30c8b2040d6617bf1fc531
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713749
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680090}
parent 38fd2741
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
import logging
import os
import time
from telemetry.testing import tab_test_case
......@@ -16,12 +17,12 @@ class BrowserMinidumpTest(tab_test_case.TabTestCase):
# ChromeOS and Android are currently hard coded to return None for minidump
# paths, so disable on those platforms. Windows 7 doesn't find any minidump
# paths for some reason.
@decorators.Disabled('chromeos', 'android', 'win7', 'linux')
@decorators.Disabled('chromeos', 'android', 'win7')
def testSymbolizeMinidump(self):
# Wait for the browser to restart fully before crashing
self._LoadPageThenWait('var sam = "car";', 'sam')
self._browser.tabs.New().Navigate('chrome://gpucrash', timeout=5)
crash_minidump_path = self._browser.GetMostRecentMinidumpPath()
crash_minidump_path = self._browser.GetRecentMinidumpPathWithTimeout()
self.assertIsNotNone(crash_minidump_path)
if crash_minidump_path is not None:
......@@ -91,13 +92,12 @@ class BrowserMinidumpTest(tab_test_case.TabTestCase):
# Disabled on Mac 10.12 (Sierra) due to it not getting a stack trace to
# symbolize from the second crash.
# Test is flaky on 10.13 (HighSierra). See https://crbug.com/986644.
@decorators.Disabled('chromeos', 'android', 'win7', 'sierra', 'linux',
'highsierra')
@decorators.Disabled('chromeos', 'android', 'win7', 'sierra', 'highsierra')
def testMultipleCrashMinidumps(self):
# Wait for the browser to restart fully before crashing
self._LoadPageThenWait('var cat = "dog";', 'cat')
self._browser.tabs.New().Navigate('chrome://gpucrash', timeout=5)
first_crash_path = self._browser.GetMostRecentMinidumpPath()
first_crash_path = self._browser.GetRecentMinidumpPathWithTimeout()
self.assertIsNotNone(first_crash_path)
if first_crash_path is not None:
......@@ -122,7 +122,11 @@ class BrowserMinidumpTest(tab_test_case.TabTestCase):
self._LoadPageThenWait('var foo = "bar";', 'foo')
self._browser.tabs.New().Navigate('chrome://gpucrash', timeout=5)
second_crash_path = self._browser.GetMostRecentMinidumpPath()
# Make the oldest allowable timestamp slightly after the first dump's
# timestamp so we don't get the first one returned to us again
oldest_ts = os.path.getmtime(first_crash_path) + 1
second_crash_path = self._browser.GetRecentMinidumpPathWithTimeout(
oldest_ts=oldest_ts)
self.assertIsNotNone(second_crash_path)
if second_crash_path is not None:
logging.info('testMultipleCrashMinidumps: second crash most recent path'
......
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