Skip to content

gh-152563, test_math: Enable fma test on musl 1.2.6 - #152564

Open
weixlu wants to merge 1 commit into
python:mainfrom
weixlu:fma
Open

gh-152563, test_math: Enable fma test on musl 1.2.6#152564
weixlu wants to merge 1 commit into
python:mainfrom
weixlu:fma

Conversation

@weixlu

@weixlu weixlu commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Proposal:

#131313 fix many tests on Alpine Linux (musl C library). About test_fma_zero_result, it says

    # gh-131032: musl is fixed but the fix is not yet released; when the fixed
    # version is known change this to:
    #   or support.linked_to_musl() < (1, <m>, <p>)

And now musl 1.2.6 is available, and I have verified that the test can pass. So let's enable it.

  • docker image: alpine:edge
  • musl version: 1.2.6-r2
  • test result: pass

I also test the older version

  • docker image: alpine:3.21
  • musl version: 1.2.5-r11
  • test result: skipped

@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jun 29, 2026
@bedevere-app

This comment was marked as outdated.

@bedevere-app

This comment was marked as duplicate.

@StanFromIreland
StanFromIreland requested review from bitdancer and vstinner and removed request for vstinner June 29, 2026 09:34
@vstinner

Copy link
Copy Markdown
Member

image: alpine:edge
musl version: 1.2.6-r2
test result: pass

I just tested podman run --rm --interactive --tty alpine:edge: I still get musl 1.2.5.

~ # apk info musl
(...)
musl-1.2.5-r21 description:
the musl c library (libc) implementation

musl-1.2.5-r21 webpage:
https://musl.libc.org/

musl-1.2.5-r21 installed size:
650 KiB

I would prefer to wait until musl 1.2.6 final is released and available in Alpine Linux.

@vstinner vstinner changed the title gh-152563: Enable fma test on Alpine Linux (musl C library) gh-152563, test_math: Enable fma test on musl 1.2.6 Jun 29, 2026
@weixlu

weixlu commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

@vstinner Thanks for the review. Yes, I just double-checked and alpine:edge still defaults to musl-1.2.5. I previously ran apk add --no-cache musl-dev, that's why I got 1.2.6-r2.

I would prefer to wait until musl 1.2.6 final is released and available in Alpine Linux.

No problem, let's wait until 1.2.6 is officially included in the default version.

@vstinner

Copy link
Copy Markdown
Member

https://musl.libc.org/releases.html tells me that musl 1.2.6 was released in March 20, 2026.

No problem, let's wait until 1.2.6 is officially included in the default version.

@weixlu: Hi. Can you check if it's the case now?

@weixlu

weixlu commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@vstinner Ah yes, thanks for reminder. I have verified that musl 1.2.6 is now officially included

$ docker run --rm alpine:edge apk info musl

musl-1.2.6-r2 description:
the musl c library (libc) implementation

musl-1.2.6-r2 webpage:
https://musl.libc.org/

musl-1.2.6-r2 installed size:
706 KiB

Also I've run test_math and it looks good. So I think this PR is ready to go

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that all FMA tests of test_math pass on the latest Alpine Linux with musl-1.2.6-r2.

~/cpython # apk info musl
musl-1.2.6-r2 description:
the musl c library (libc) implementation

musl-1.2.6-r2 webpage:
https://musl.libc.org/

musl-1.2.6-r2 installed size:
654 KiB

~/cpython # ./python
Python 3.16.0a0 (heads/main:fcfa919, Aug 11 2026, 13:30:35) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from test import support
>>> support.linked_to_musl()
(1, 2, 6)

@vstinner

Copy link
Copy Markdown
Member

cc @zware @bitdancer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants