parent
f280129e7c
commit
998f93dfd3
@ -55,68 +55,81 @@ 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 'Running without the SUID sandbox!' in message:
|
if message.startswith('Xlib: sequence lost'):
|
||||||
return True
|
|
||||||
if 'No usable sandbox! Update your kernel or see' in message:
|
|
||||||
# [27289:27289:0605/195958.776146:INFO:zygote_host_impl_linux.cc(107)]
|
|
||||||
# No usable sandbox! Update your kernel or see
|
|
||||||
# https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md
|
|
||||||
# for more information on developing with the SUID sandbox. If you want
|
|
||||||
# to live dangerously and need an immediate workaround, you can try
|
|
||||||
# using --no-sandbox.
|
|
||||||
return True
|
|
||||||
elif message.startswith('Xlib: sequence lost'):
|
|
||||||
# https://travis-ci.org/qutebrowser/qutebrowser/jobs/157941720
|
# https://travis-ci.org/qutebrowser/qutebrowser/jobs/157941720
|
||||||
# ???
|
# ???
|
||||||
return True
|
return True
|
||||||
elif 'CERT_PKIXVerifyCert for localhost failed' in message:
|
|
||||||
# [30981:30992:0605/200633.041364:ERROR:cert_verify_proc_nss.cc(918)]
|
|
||||||
# CERT_PKIXVerifyCert for localhost failed err=-8179
|
|
||||||
return True
|
|
||||||
elif 'Invalid node channel message' in message:
|
|
||||||
# Started appearing in sessions.feature with Qt 5.8...
|
|
||||||
return True
|
|
||||||
elif ("_dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= "
|
elif ("_dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= "
|
||||||
"GL(dl_tls_generation)' failed!" in message):
|
"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
|
return True
|
||||||
elif ("CreatePlatformSocket() returned an error, errno=97: Address family "
|
|
||||||
"not supported by protocol" in message):
|
|
||||||
# Makes tests fail on Quantumcross' machine
|
|
||||||
return True
|
|
||||||
elif 'Unable to locate theme engine in module_path:' in message:
|
|
||||||
return True
|
|
||||||
elif message == 'getrlimit(RLIMIT_NOFILE) failed':
|
elif message == 'getrlimit(RLIMIT_NOFILE) failed':
|
||||||
return True
|
return True
|
||||||
elif 'Could not bind NETLINK socket: Address already in use' in message:
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def is_ignored_chromium_message(line):
|
||||||
|
msg_re = re.compile(r"""
|
||||||
|
\[
|
||||||
|
\d+:\d+: # Process/Thread ID
|
||||||
|
\d{4}/[\d.]+: # MMDD/Time
|
||||||
|
(?P<loglevel>[A-Z]+): # Log level
|
||||||
|
[^ :]+ # filename / line
|
||||||
|
\]
|
||||||
|
\ (?P<message>.*) # message
|
||||||
|
""", re.VERBOSE)
|
||||||
|
match = msg_re.fullmatch(line)
|
||||||
|
if match is None:
|
||||||
|
return False
|
||||||
|
|
||||||
|
if match.group('loglevel') == 'INFO':
|
||||||
return True
|
return True
|
||||||
elif ':INFO:CONSOLE(' in message:
|
|
||||||
# console.log Chromium logging in debug builds
|
message = match.group('message')
|
||||||
return True
|
ignored_messages = [
|
||||||
elif 'locale_file_path.empty() for locale' in message:
|
# [27289:27289:0605/195958.776146:INFO:zygote_host_impl_linux.cc(107)]
|
||||||
# Qt 5.9 debug Chromium stuff
|
# No usable sandbox! Update your kernel or see
|
||||||
|
# https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md
|
||||||
|
# for more information on developing with the SUID sandbox. If you want
|
||||||
|
# to live dangerously and need an immediate workaround, you can try
|
||||||
|
# using --no-sandbox.
|
||||||
|
'No usable sandbox! Update your kernel or see *',
|
||||||
|
# [30981:30992:0605/200633.041364:ERROR:cert_verify_proc_nss.cc(918)]
|
||||||
|
# CERT_PKIXVerifyCert for localhost failed err=-8179
|
||||||
|
'CERT_PKIXVerifyCert for localhost failed err=*',
|
||||||
|
|
||||||
|
# Not reproducible anymore?
|
||||||
|
|
||||||
|
'Running without the SUID sandbox! *',
|
||||||
|
'Unable to locate theme engine in module_path: *',
|
||||||
|
'Could not bind NETLINK socket: Address already in use',
|
||||||
|
# Started appearing in sessions.feature with Qt 5.8...
|
||||||
|
'Invalid node channel message *',
|
||||||
|
# Makes tests fail on Quantumcross' machine
|
||||||
|
('CreatePlatformSocket() returned an error, errno=97: Address family'
|
||||||
|
'not supported by protocol'),
|
||||||
|
|
||||||
|
# Qt 5.9 with debug Chromium
|
||||||
|
|
||||||
# [28121:28121:0605/191637.407848:WARNING:resource_bundle_qt.cpp(114)]
|
# [28121:28121:0605/191637.407848:WARNING:resource_bundle_qt.cpp(114)]
|
||||||
# locale_file_path.empty() for locale
|
# locale_file_path.empty() for locale
|
||||||
return True
|
'locale_file_path.empty() for locale',
|
||||||
elif 'Multiple instances of AudioManager detected' in message:
|
|
||||||
# Qt 5.9 debug Chromium stuff
|
|
||||||
# [26598:26598:0605/191429.639416:WARNING:audio_manager.cc(317)]
|
# [26598:26598:0605/191429.639416:WARNING:audio_manager.cc(317)]
|
||||||
# Multiple instances of AudioManager detected
|
# Multiple instances of AudioManager detected
|
||||||
return True
|
'Multiple instances of AudioManager detected',
|
||||||
elif 'Could not set extended attribute user.xdg' in message:
|
|
||||||
# On Qt 5.9 with debug Chromium:
|
|
||||||
# [25775:25788:0605/191240.931551:ERROR:quarantine_linux.cc(33)]
|
# [25775:25788:0605/191240.931551:ERROR:quarantine_linux.cc(33)]
|
||||||
# Could not set extended attribute user.xdg.origin.url on file
|
# Could not set extended attribute user.xdg.origin.url on file
|
||||||
# /tmp/pytest-of-florian/pytest-32/test_webengine_download_suffix0/downloads/download.bin:
|
# /tmp/pytest-of-florian/pytest-32/test_webengine_download_suffix0/
|
||||||
# Operation not supported
|
# downloads/download.bin: Operation not supported
|
||||||
return True
|
('Could not set extended attribute user.xdg.* on file *: '
|
||||||
elif 'WebFrame LEAKED 1 TIMES' in message:
|
'Operation not supported'),
|
||||||
# Qt 5.9 debug Chromium stuff
|
|
||||||
# [5947:5947:0605/192837.856931:ERROR:render_process_impl.cc(112)]
|
# [5947:5947:0605/192837.856931:ERROR:render_process_impl.cc(112)]
|
||||||
# WebFrame LEAKED 1 TIMES
|
# WebFrame LEAKED 1 TIMES
|
||||||
return True
|
'WebFrame LEAKED 1 TIMES',
|
||||||
return False
|
]
|
||||||
|
return any(testutils.pattern_match(pattern=pattern, value=message)
|
||||||
|
for pattern in ignored_messages)
|
||||||
|
|
||||||
|
|
||||||
class LogLine(testprocess.Line):
|
class LogLine(testprocess.Line):
|
||||||
@ -297,6 +310,7 @@ class QuteProc(testprocess.Process):
|
|||||||
return None
|
return None
|
||||||
elif (is_ignored_qt_message(line) or
|
elif (is_ignored_qt_message(line) or
|
||||||
is_ignored_lowlevel_message(line) or
|
is_ignored_lowlevel_message(line) or
|
||||||
|
is_ignored_chromium_message(line) or
|
||||||
self.request.node.get_marker('no_invalid_lines')):
|
self.request.node.get_marker('no_invalid_lines')):
|
||||||
self._log("IGNORED: {}".format(line))
|
self._log("IGNORED: {}".format(line))
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user