Simplify is_ignored_lowlevel_message

This commit is contained in:
Florian Bruhin 2017-11-20 19:29:31 +01:00
parent abb5c9f638
commit a5d9661d73

View File

@ -55,38 +55,32 @@ def is_ignored_qt_message(message):
def is_ignored_lowlevel_message(message): def is_ignored_lowlevel_message(message):
"""Check if we want to ignore a lowlevel process output.""" """Check if we want to ignore a lowlevel process output."""
if message.startswith('Xlib: sequence lost'): ignored_messages = [
# https://travis-ci.org/qutebrowser/qutebrowser/jobs/157941720 # https://travis-ci.org/qutebrowser/qutebrowser/jobs/157941720
# ??? # ???
return True 'Xlib: sequence lost*',
elif ("_dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= "
"GL(dl_tls_generation)' failed!" in message):
# Started appearing with Qt 5.8... # Started appearing with Qt 5.8...
# http://patchwork.sourceware.org/patch/10255/ # http://patchwork.sourceware.org/patch/10255/
return True ("*_dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= "
elif message == 'getrlimit(RLIMIT_NOFILE) failed': "GL(dl_tls_generation)' failed!*"),
return True # ???
'getrlimit(RLIMIT_NOFILE) failed',
# Travis CI containers don't have a /etc/machine-id # Travis CI containers don't have a /etc/machine-id
elif message.endswith('D-Bus library appears to be incorrectly set up; ' ('*D-Bus library appears to be incorrectly set up; failed to read '
'failed to read machine uuid: Failed to open ' 'machine uuid: Failed to open "/etc/machine-id": No such file or '
'"/etc/machine-id": No such file or directory'): 'directory'),
return True 'See the manual page for dbus-uuidgen to correct this issue.',
elif message == ('See the manual page for dbus-uuidgen to correct this '
'issue.'):
return True
# Travis CI macOS: # Travis CI macOS:
# 2017-09-11 07:32:56.191 QtWebEngineProcess[5455:28501] Couldn't set # 2017-09-11 07:32:56.191 QtWebEngineProcess[5455:28501] Couldn't set
# selectedTextBackgroundColor from default () # selectedTextBackgroundColor from default ()
elif message.endswith("Couldn't set selectedTextBackgroundColor from " "* Couldn't set selectedTextBackgroundColor from default ()"
"default ()"):
return True
# Mac Mini: # Mac Mini:
# <<<< VTVideoEncoderSelection >>>> # <<<< VTVideoEncoderSelection >>>>
# VTSelectAndCreateVideoEncoderInstanceInternal: no video encoder found for # VTSelectAndCreateVideoEncoderInstanceInternal: no video encoder
# 'avc1' # found for 'avc1'
# #
# [22:32:03.636] VTSelectAndCreateVideoEncoderInstanceInternal signalled # [22:32:03.636] VTSelectAndCreateVideoEncoderInstanceInternal
# err=-12908 (err) (Video encoder not available) at # signalled err=-12908 (err) (Video encoder not available) at
# /SourceCache/CoreMedia_frameworks/CoreMedia-1562.240/Sources/ # /SourceCache/CoreMedia_frameworks/CoreMedia-1562.240/Sources/
# VideoToolbox/VTVideoEncoderSelection.c line 1245 # VideoToolbox/VTVideoEncoderSelection.c line 1245
# #
@ -94,28 +88,22 @@ def is_ignored_lowlevel_message(message):
# (Could not select and open encoder instance) at # (Could not select and open encoder instance) at
# /SourceCache/CoreMedia_frameworks/CoreMedia-1562.240/Sources/ # /SourceCache/CoreMedia_frameworks/CoreMedia-1562.240/Sources/
# VideoToolbox/VTCompressionSession.c # line 946 # VideoToolbox/VTCompressionSession.c # line 946
elif 'VTSelectAndCreateVideoEncoderInstanceInternal' in message: '*VTSelectAndCreateVideoEncoderInstanceInternal*',
return True '*VTSelectAndCreateVideoEncoderInstanceInternal*',
elif 'VTSelectAndCreateVideoEncoderInstanceInternal' in message: '*VTCompressionSessionCreate*',
return True
elif 'VTCompressionSessionCreate' in message:
return True
# During shutdown on AppVeyor: # During shutdown on AppVeyor:
# https://ci.appveyor.com/project/qutebrowser/qutebrowser/build/master-2089/job/or4tbct1oeqsfhfm # https://ci.appveyor.com/project/qutebrowser/qutebrowser/build/master-2089/job/or4tbct1oeqsfhfm
elif (message.startswith('QNetworkProxyFactory: factory 0x') and 'QNetworkProxyFactory: factory 0x* has returned an empty result set',
message.endswith(' has returned an empty result set')):
return True
elif message == ' Error: No such file or directory':
# Qt 5.10 with debug Chromium # Qt 5.10 with debug Chromium
# [1016/155149.941048:WARNING:stack_trace_posix.cc(625)] Failed to open # [1016/155149.941048:WARNING:stack_trace_posix.cc(625)] Failed to open
# file: /home/florian/#14687139 (deleted) # file: /home/florian/#14687139 (deleted)
# Error: No such file or directory # Error: No such file or directory
return True ' Error: No such file or directory',
# Qt 5.7.1 # Qt 5.7.1
elif message.startswith('qt.network.ssl: QSslSocket: cannot call ' 'qt.network.ssl: QSslSocket: cannot call unresolved function *',
'unresolved function '): ]
return True return any(testutils.pattern_match(pattern=pattern, value=message)
return False for pattern in ignored_messages)
def is_ignored_chromium_message(line): def is_ignored_chromium_message(line):