Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RobustStatisticsTest failing on Alpine aarch64, ppc64le, s390x #698

Closed
Hello71 opened this issue Oct 7, 2021 · 1 comment · Fixed by #703
Closed

RobustStatisticsTest failing on Alpine aarch64, ppc64le, s390x #698

Hello71 opened this issue Oct 7, 2021 · 1 comment · Fixed by #703
Assignees
Labels
building/portability Platform-specific issues, build issues testing Related to testing / avoiding regressions

Comments

@Hello71
Copy link
Contributor

Hello71 commented Oct 7, 2021

Describe the bug
I am packaging libjxl for Alpine Linux. Some tests failing, but I am unsure of the cause.

To Reproduce
Build libjxl on Alpine Linux and run tests.

Expected behavior
Successful build and tests.

Environment

Additional context
For x86, the test suite requires -msse -mfpmath=sse in order to pass. For aarch64, ppc64le, and s390x, three tests fail in identical ways: RobustStatisticsTest.TestMode, RobustStatisticsTest.CleanLine, and DecodeTest.PixelTestWithICCProfileLossy. The last one affects all archs and is tracked as #500 already.

aarch64, ppc64le, and s390x failing test outputs (identical except for duration)
[ RUN      ] RobustStatisticsTest.TestMode
===========================frac 1
hsm 10.0 hrm 9 argmax 9.0 median 9.999786
1510 1761 1805 1810 1611
===========================frac 2
hsm 20.0 hrm 19 argmax 19.0 median 19.999693
1206 1227 1335 1310 1222
===========================frac 3
hsm 30.0 hrm 29 argmax 29.0 median 29.999731
1079 1092 1109 1110 1004
===========================frac 4
hsm 40.0 hrm 40 argmax 40.0 median 39.999756
895 937 956 916 850
===========================frac 5
hsm 49.0 hrm 49 argmax 49.0 median 49.999603
771 884 870 844 791
===========================frac 6
hsm 60.0 hrm 60 argmax 60.0 median 59.999840
768 756 785 768 723
===========================frac 7
/builds/alxu/aports/testing/libjxl/src/libjxl-0.6/lib/jxl/robust_statistics_test.cc:75: Failure
Value of: is_near(hsm, argmax) || is_near(hsm, median)
  Actual: false
Expected: true
hsm 69.0 hrm 69 argmax 70.0 median 69.999565
708 703 736 691 670
===========================frac 8
hsm 79.0 hrm 79 argmax 79.0 median 79.999634
655 692 700 700 616
===========================frac 9
hsm 90.0 hrm 90 argmax 90.0 median 90.000053
617 656 637 662 614
[  FAILED  ] RobustStatisticsTest.TestMode (41 ms)
[ RUN      ] RobustStatisticsTest.CleanLine
x 2319.072266  slope=0.60 b=2.00  max_l1 0.000002 mad 0.000000
/builds/alxu/aports/testing/libjxl/src/libjxl-0.6/lib/jxl/robust_statistics_test.cc:132: Failure
Expected: (max_l1) <= (max_l1_limit), actual: 1.90735e-06 vs 1e-06
[  FAILED  ] RobustStatisticsTest.CleanLine (3 ms)

I looked into this, but couldn't find any obvious culprits. I know that many floating-point functions return different results with different implementations, but it seems that these tests use only basic arithmetic, comparisons, and implicit comparisons (std::max, std::nth_element, etc), which should return identical results on all implementations.

Let me know what additional information is needed.

@veluca93
Copy link
Member

veluca93 commented Oct 7, 2021

If I had to bet, I'd say this is rng-related.

Fortunately, RobustStatistics is not used a lot - I think we might get away with removing the test and the tested code...

I'll look into it.

@jonsneyers jonsneyers added building/portability Platform-specific issues, build issues testing Related to testing / avoiding regressions labels Oct 7, 2021
@Hello71 Hello71 changed the title tests failing on Alpine aarch64, ppc64le, s390x, x86 RobustStatisticsTest failing on Alpine aarch64, ppc64le, s390x Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building/portability Platform-specific issues, build issues testing Related to testing / avoiding regressions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants