Skip to content

Commit 190c3f0

Browse files
authored
ci: Fix failing render-microfacet.opt test (#2048)
This test started failing sporadically recently, with output images that looked plausible, but differed slightly from the rest of the checked-in reference images for this test. It only failed maybe 5% of the time, so sometimes a CI run would pass, or sometimes fail just one job variation, or very occasional two. Rerunning the failed job would generally succeed, but sometimes fail again. I'll cut to the chase: We were able to trace it to all failures happening on GitHub runners that identified themselves as "Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz". When subsequent runs of the same job variation succeded, it was always because it landed on a runner that identified itself as "AMD EPYC 7763 64-Core Processor". We presume that some minor HW or SW differences (perhaps in a library with an ISA-specific code path) resulted in LSB errors that conspire to sample different light paths on a minority of pixels, leading to a different pattern of specular "fireflies". The expedient fix herein is simply to commit yet another reference image that is considered to be a "pass". Along for the ride, discovered during my debugging: * Rename the label of one job variant, which was incorrect. * Add comments to the test thresholding parameters (comments ported from the analogous script in OIIO, making it easier to understand next time one of us is figuring out this code). Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent 2ebca7b commit 190c3f0

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ jobs:
475475
PUGIXML_VERSION=v1.15
476476
FREETYPE_VERSION=VER-2-14-3
477477
- desc: clang14/C++17 llvm14 py3.10 avx2 batch-b16avx512
478-
nametag: linux-latest-releases-clang
478+
nametag: linux-clang14
479479
runner: ubuntu-22.04
480480
cxx_compiler: clang++
481481
cc_compiler: clang
325 KB
Binary file not shown.

testsuite/runtest.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,24 @@ def make_relpath (path, start=os.curdir):
7878
command = ""
7979
outputs = [ "out.txt" ] # default
8080

81-
# Control image differencing
81+
# The image comparison thresholds are tricky to remember. Here's the key:
82+
# A test fails if more than `failpercent` of pixel values differ by more
83+
# than `failthresh` AND the difference is more than `failrelative` times the
84+
# correct pixel value, or if even one pixel differs by more than `hardfail`.
85+
failthresh = 0.004 # "Failure" threshold for any pixel value
86+
hardfail = 0.01 # Even one pixel this wrong => hard failure
87+
failpercent = 0.02 # Ok fo this percentage of pixels to "fail"
88+
failrelative = 0.001 # Ok to fail up to this amount vs the pixel value
89+
allowfailures = 0 # Freebie failures
90+
91+
# Some tests are designed for the app running to "fail" (in the sense of
92+
# terminating with an error return code), for example, a test that is designed
93+
# to present an error condition to check that it issues the right error. That
94+
# "failure" is a success of the test! For those cases, set `failureok = 1` to
95+
# indicate that the app having an error is fine, and the full test will pass
96+
# or fail based on comparing the output files.
8297
failureok = 0
83-
failthresh = 0.004
84-
hardfail = 0.01
85-
failpercent = 0.02
86-
failrelative = 0.001
87-
allowfailures = 0
98+
8899
idiff_program = "oiiotool"
89100
idiff_postfilecmd = ""
90101
skip_diff = int(os.environ.get("OSL_TESTSUITE_SKIP_DIFF", "0"))

0 commit comments

Comments
 (0)