Changeset 281297 in webkit


Ignore:
Timestamp:
Aug 20, 2021, 12:50:20 AM (4 years ago)
Author:
youenn@apple.com
Message:

Remove all WTR output before Content-Type:text/plain for WebRTC tests in case of known excessive logging
https://bugs.webkit.org/show_bug.cgi?id=229188

Reviewed by Jonathan Bedard.

Some logging beneath WebKit is making WebRTC tests flaky.
While we work on the cause of this bug, we can still beef-up our test output clean up steps to handle this logging.
Instead of stripping lines based on a known pattern, which does not always work as per current results,
we can simply remove all logging before the 'Content-Type:text/plain\n' string that WebKitTestRunner is adding before
printing the text generated by the test itself.
We update webkitpy scripts accordingly and add this new clean-up for:

  • tests that have webrtc in their name
  • tests whose output contain some known logging strings like 'LRP' or 'Negotiation String'.

This should hopefully be more robust while not hiding real regressions.

  • Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:

(SingleTestRunner):

  • Scripts/webkitpy/port/base.py:

(Port.logging_detectors_to_strip_text_start):

  • Scripts/webkitpy/port/driver.py:

(DriverOutput.strip_text_start_if_needed):

  • Scripts/webkitpy/port/mac.py:

(MacPort.logging_patterns_to_strip):
(MacPort.logging_detectors_to_strip_text_start):

Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r281286 r281297  
     12021-08-20  Youenn Fablet  <youenn@apple.com>
     2
     3        Remove all WTR output before Content-Type:text/plain for WebRTC tests in case of known excessive logging
     4        https://bugs.webkit.org/show_bug.cgi?id=229188
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        Some logging beneath WebKit is making WebRTC tests flaky.
     9        While we work on the cause of this bug, we can still beef-up our test output clean up steps to handle this logging.
     10        Instead of stripping lines based on a known pattern, which does not always work as per current results,
     11        we can simply remove all logging before the 'Content-Type:text/plain\n' string that WebKitTestRunner is adding before
     12        printing the text generated by the test itself.
     13        We update webkitpy scripts accordingly and add this new clean-up for:
     14        - tests that have webrtc in their name
     15        - tests whose output contain some known logging strings like 'LRP' or 'Negotiation String'.
     16        This should hopefully be more robust while not hiding real regressions.
     17
     18        * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
     19        (SingleTestRunner):
     20        * Scripts/webkitpy/port/base.py:
     21        (Port.logging_detectors_to_strip_text_start):
     22        * Scripts/webkitpy/port/driver.py:
     23        (DriverOutput.strip_text_start_if_needed):
     24        * Scripts/webkitpy/port/mac.py:
     25        (MacPort.logging_patterns_to_strip):
     26        (MacPort.logging_detectors_to_strip_text_start):
     27
    1282021-08-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    229
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py

    r277781 r281297  
    133133        driver_output.strip_patterns(patterns)
    134134
     135        driver_output.strip_text_start_if_needed(self._port.logging_detectors_to_strip_text_start(self._driver_input().test_name))
     136
    135137        driver_output.strip_stderror_patterns(self._port.stderr_patterns_to_strip())
    136138
  • trunk/Tools/Scripts/webkitpy/port/base.py

    r278624 r281297  
    14211421        return []
    14221422
     1423    def logging_detectors_to_strip_text_start(self, test_name):
     1424        return []
     1425
    14231426    def test_expectations_file_position(self):
    14241427        # By default baseline search path schema is i.e. port-wk2 -> wk2 -> port -> generic, so port expectations file is at second to last position.
  • trunk/Tools/Scripts/webkitpy/port/driver.py

    r279338 r281297  
    115115            self.text = re.sub(pattern[0], pattern[1], self.text)
    116116
     117    def strip_text_start_if_needed(self, detectors):
     118        if not self.text or not len(detectors):
     119            return
     120
     121        result = self.text.split('Content-Type: text/plain\n')
     122        if len(result) != 2:
     123            return
     124
     125        for detector in detectors:
     126            if detector in result[0]:
     127                self.text = result[1]
     128                self.error += '\nRemoved logging from stdout:\n' + result[0]
     129                return
     130
    117131    def strip_stderror_patterns(self, patterns):
    118132        if not self.error:
  • trunk/Tools/Scripts/webkitpy/port/mac.py

    r280196 r281297  
    291291        logging_patterns.append((re.compile('VP9 Info:.*\n'), ''))
    292292
    293         # FIXME: Replace this with a defaults write after bots update to a build that has rdar://problem/74031400 fixed.
    294         logging_patterns.append((r'Negotiation String:.*\n', ''))
    295         logging_patterns.append((r'LRP.*\n', ''))
    296         logging_patterns.append((r'.* \(seconds\) ', ''))
    297         logging_patterns.append((r'.* 0  0 \[\]\n', ''))
    298         logging_patterns.append((r'\[\]\n', ''))
    299 
    300293        return logging_patterns
     294
     295    def logging_detectors_to_strip_text_start(self, test_name):
     296        logging_detectors = []
     297
     298        if 'webrtc' in test_name:
     299            logging_detectors.append('Negotiation String:')
     300            logging_detectors.append('LRP')
     301
     302        return logging_detectors
    301303
    302304    def stderr_patterns_to_strip(self):
Note: See TracChangeset for help on using the changeset viewer.