Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c2f8b499772412dbf100797162778234cd634a67
      
https://github.com/WebKit/WebKit/commit/c2f8b499772412dbf100797162778234cd634a67
  Author: Simon Fraser <[email protected]>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    A LayoutTests/fast/harness/all-black-expected.html
    A LayoutTests/fast/harness/all-black.html
    M Tools/WebKitTestRunner/TestInvocation.cpp
    M Tools/WebKitTestRunner/TestInvocation.h
    M Tools/WebKitTestRunner/cg/TestInvocationCG.cpp

  Log Message:
  -----------
  Workaround occasional black snapshots on macOS
https://bugs.webkit.org/show_bug.cgi?id=248718
rdar://89840327

Reviewed by Jonathan Bedard.

An OS issue (rdar://89840327) causes test snapshots to be black sometimes,
on Intel machines.

Try to work around this by detecting black snapshots, and re-taking the snapshot
up to three times. We detect black snapshots via their hash, hardcoding
the hashes of some commonly sized black snapshots for performance. The code
logs when black snapshots are detected, but this does not trigger test failure.

Add an all-black ref test in fast/harness to test that all black ref tests
still succeed.

* LayoutTests/fast/harness/all-black-expected.html: Added.
* LayoutTests/fast/harness/all-black.html: Added.
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::compareActualHashToExpectedAndDumpResults):
* Tools/WebKitTestRunner/TestInvocation.h:
* Tools/WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::computeSHA1HashStringForContext):
(WTR::operator==):
(WTR::hashForBlackImageOfSize):
(WTR::dumpBitmap):
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):

Canonical link: https://commits.webkit.org/257420@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to