Skip to content

shuf: don't panic when getrandom failed (tests/shuf/shuf.sh) - #14744

Merged
sylvestre merged 1 commit into
uutils:mainfrom
oech3:shuf-eagain
Sep 21, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
oech3:shuf-eagain

Conversation

@oech3

@oech3 oech3 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Fixes #11152

@codspeed

codspeed Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 5.82%

⚡ 3 improved benchmarks
✅ 7 untouched benchmarks
⏩ 422 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Simulation shuf_repeat_sampling[(50000, 10)] 5.9 ms 5.5 ms +8.17%
⚡ Simulation shuf_repeat_sampling[(50000, 80)] 9.8 ms 9.3 ms +4.74%
⚡ Simulation shuf_input_range[1000000] 158.5 ms 151.5 ms +4.6%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing oech3:shuf-eagain (68f88e2) with main (3516d04)

Open in CodSpeed

Footnotes

  1. 422 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/shuf/shuf is no longer failing!

@oech3 oech3 changed the title shuf: don't panic when getrandom failed shuf: don't panic when getrandom failed (tests/shuf/shuf.sh) Sep 20, 2026
@oech3

oech3 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Why is #[cfg(target_os = "linux")] ignored on wasi? It is really unuseful.

@oech3

oech3 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Custom cfg for wasi is a hack. We should remove it.

@sylvestre
sylvestre merged commit 7f38d96 into uutils:main Sep 21, 2026
101 checks passed
@oech3
oech3 deleted the shuf-eagain branch September 21, 2026 08:37
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.

strace -e inject=getrandom:error=EAGAIN shuf -i 1-9 panics

2 participants