From d7f72fff74742c0851287375b24e54920944a68b Mon Sep 17 00:00:00 2001 From: Ionut Goldan Date: Mon, 2 Oct 2017 09:55:15 +0300 Subject: [PATCH] Bug 1399024 - fix mainthreadio intermittents r=jmaher MozReview-Commit-ID: 61Tn0AqbTbX --HG-- extra : rebase_source : 13c25e6fb5bfaac95abd9271be4acb887fdb5786 --- testing/talos/talos/config.py | 1 - testing/talos/talos/mainthreadio.py | 6 ++++-- testing/talos/talos/whitelist.py | 8 ++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/testing/talos/talos/config.py b/testing/talos/talos/config.py index 611b7a98dc3a..f01f4143f822 100644 --- a/testing/talos/talos/config.py +++ b/testing/talos/talos/config.py @@ -217,7 +217,6 @@ GLOBAL_OVERRIDES = ( 'gecko_profile', 'gecko_profile_interval', 'gecko_profile_entries', - 'mainthread', 'rss', 'shutdown', 'tpcycles', diff --git a/testing/talos/talos/mainthreadio.py b/testing/talos/talos/mainthreadio.py index e4745eb2d545..ee63738f1aa5 100644 --- a/testing/talos/talos/mainthreadio.py +++ b/testing/talos/talos/mainthreadio.py @@ -51,6 +51,7 @@ NAME_SUBSTITUTIONS = OrderedDict([ (re.compile(r'{\w{8}-\w{4}-\w{4}-\w{4}-\w{12}}'), '{uuid}'), (re.compile(r'{uuid}\.\d+\.ver\w+\.db'), '{uuid-db}')]) +TUPLE_EVENT_SOURCE_INDEX = 1 TUPLE_FILENAME_INDEX = 2 WHITELIST_FILENAME = os.path.join(SCRIPT_DIR, 'mtio-whitelist.json') @@ -143,7 +144,8 @@ def main(argv): wl = whitelist.Whitelist(test_name='mainthreadio', paths={"{xre}": argv[3]}, path_substitutions=PATH_SUBSTITUTIONS, - name_substitutions=NAME_SUBSTITUTIONS) + name_substitutions=NAME_SUBSTITUTIONS, + event_sources=["PoisonIOInterposer"]) if not wl.load(WHITELIST_FILENAME): print("Failed to load whitelist") return 1 @@ -155,7 +157,7 @@ def main(argv): # Disabled until we enable TBPL oranges # search for unknown filenames - errors = wl.check(data, TUPLE_FILENAME_INDEX) + errors = wl.check(data, TUPLE_FILENAME_INDEX, TUPLE_EVENT_SOURCE_INDEX) if errors: strs = wl.get_error_strings(errors) wl.print_errors(strs) diff --git a/testing/talos/talos/whitelist.py b/testing/talos/talos/whitelist.py index 45b86d27fcb2..7fd0f1d04821 100644 --- a/testing/talos/talos/whitelist.py +++ b/testing/talos/talos/whitelist.py @@ -19,7 +19,7 @@ class Whitelist: PRE_PROFILE = '' def __init__(self, test_name, paths, path_substitutions, - name_substitutions, init_with=None): + name_substitutions, event_sources=None, init_with=None): self.test_name = test_name self.listmap = init_with if init_with else {} self.dependent_libs = self.load_dependent_libs() \ @@ -27,6 +27,7 @@ class Whitelist: self.paths = paths self.path_substitutions = path_substitutions self.name_substitutions = name_substitutions + self.expected_event_sources = event_sources or [] def load(self, filename): if not self.load_dependent_libs(): @@ -81,7 +82,7 @@ class Whitelist: return filename.strip('/\\\ \t') - def check(self, test, file_name_index): + def check(self, test, file_name_index, event_source_index=None): errors = {} for row_key in test.iterkeys(): filename = self.sanitize_filename(row_key[file_name_index]) @@ -92,6 +93,9 @@ class Whitelist: continue elif filename in self.dependent_libs: continue + elif event_source_index is not None and \ + test[event_source_index] in self.expected_event_sources: + continue else: if filename not in errors: errors[filename] = []