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

test: add musl-libc testsuite #298

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

inkydragon
Copy link
Member

@inkydragon inkydragon commented Feb 2, 2024

Do NOT merge with squash commits!

  • make coverage will run glibc and musl test, and then gen report.
    • Currently, it passes all musl tests under linux CI.
      Other platforms have not been tested yet. Wait for the following pr
  • make test will only run glibc test.
    • TODO: run musl test on win and mac CI
  • All modifications are marked with XXX.
  • Tests that are currently skipped are marked with TODO.
    • Some tests were moved to subfolders to skip them
      src\math\broken\*, src\math\not-impl\*

Since there are a lot of new files added, it is recommended to review the changes made after the addition of new tests one by one.


broken tests:

  • fenv
  • fma
  • fmaf
  • fmal
  • fpclassify
  • j1
  • j1f
  • jn
  • jnf
  • nearbyintl
  • nextafterl
  • nexttoward
  • nexttowardl
  • round
  • tgamma
  • yn
  • ynf

not impl funcs:

  • drem
  • dremf
  • exp10
  • exp10f
  • exp10l
  • pow10
  • pow10f
  • pow10l
  • scalb
  • scalbf

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4b83beb) 38.24% compared to head (4644b62) 68.96%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #298       +/-   ##
===========================================
+ Coverage   38.24%   68.96%   +30.72%     
===========================================
  Files         233      233               
  Lines        6139     6142        +3     
  Branches     1607     1607               
===========================================
+ Hits         2348     4236     +1888     
+ Misses       3394     1596     -1798     
+ Partials      397      310       -87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@inkydragon inkydragon marked this pull request as ready for review February 2, 2024 21:45
@inkydragon inkydragon mentioned this pull request Feb 2, 2024
5 tasks
@ViralBShah
Copy link
Member

ViralBShah commented Feb 13, 2024

Just thinking out aloud, if the musl libm passes all these tests - would it be best to pull out the libm from musl into a standalone library and update openlibm to that?

@inkydragon
Copy link
Member Author

pull out the libm from musl into a standalone library
and update openlibm to that?

I like this idea.
Moving a step further, we could take the libm related tests from libc-testsuite (for musl)
and put them in a standalone project, maybe call it openlibm-test.
Instead of adding all these things to openlibm.

Then, we have:

  • openlibm == musl fork
  • openlibm-test == libc-testsuite fork

@ViralBShah
Another thing I am thinking about is after julia removes its dependency on openlibm (and then links to the system libm by default), would it be more useful to have a libm written by julia than to continue to improve the precision of openlibm?

@inkydragon inkydragon marked this pull request as draft February 24, 2024 05:14
@ViralBShah
Copy link
Member

It's a good idea to have a separate repo for the tests. Julia almost has no dependency on openlibm, except in a few cases where LLVM on win32 needs it for a couple of things.

If the tests are in a separate repo, we can recreate a libm from Julia and then use the testsuite to test the Julia implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants