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

fix #4312 - musl compilation compatibility #4336

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Cyan4973
Copy link
Contributor

@Cyan4973 Cyan4973 commented Mar 11, 2025

#4312 tried to implement a manual workaround for musl compilation issues.
It's manual because musl does not provide a version number, making it difficult to automate decisions.

Unfortunately, the fix was incomplete, and the test did not catch it because it only detected a "warning" and had no runtime error.
Fixed both the test, which will now fail both at run time and compile time under similar conditions,
and the code, which now passes the more stringent test.

Used the opportunity to restructure the code, so that the dispatch strategy among the different variants of qsort*() is more maintainable and extendable.
Employed the new framework to add support for C11 Annex K qsort_s() re-entrant variant.

also:
reduced duration of long cli tests (notably dictionary building tests) by leveraging multithreading, by invoking -T0.
It works well, by reducing the time to complete are longest CI jobs, improving CI velocity.

@Cyan4973 Cyan4973 changed the title attempt to reduce length of long cli tests by invoking -T0 attempt to reduce duration of long cli tests with multithreading Mar 11, 2025
@Cyan4973 Cyan4973 self-assigned this Mar 11, 2025
@Cyan4973
Copy link
Contributor Author

And indeed, it helps a bit:
the longest test, clang-msan-testzstd went down, from 28mn to 19mn.
So this will help improving CI velocity.

@Cyan4973 Cyan4973 changed the title attempt to reduce duration of long cli tests with multithreading fix #4312 - musl compilation compatibility Mar 11, 2025
@Cyan4973 Cyan4973 marked this pull request as ready for review March 11, 2025 21:08
Cyan4973 and others added 5 commits March 11, 2025 14:10
and upgraded the test so that it would fail, both at compile time and at run time, without the fix
centralizes auto detection tests,
then distribute the outcome in all the places where it's active.
standard defined re-entrant variant of qsort().
Unfortunately, Annex K is optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants