Skip to content

shuf: remove non-GNU --random-seed to avoid divergence of interfaces - #13330

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:shuf-rdseed
Open

oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:shuf-rdseed

Conversation

@oech3

@oech3 oech3 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This is essentially duplicated with --random-source and potentially corrupts scripts written with GNU coreutils.
Really bad extention. Closes #11157

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/retry (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/rm/many-dir-entries-vs-OOM is now being skipped but was previously passing.

@cakebaker

Copy link
Copy Markdown
Contributor

I'm fine with removing the --random-seed functionality. What do you think, @sylvestre ? The functionality was added earlier this year in #7585

@oech3

oech3 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

FYI, duplicated means

$ '/home/a/bin/gnu9.11/shuf' --random-source=<(echo "1") -i 1-2
2
1

@HackingRepo

Copy link
Copy Markdown
Contributor

but it is a new feature, why have an impact?

@oech3

oech3 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

If someone used this at scripts, it breaks compatibility with GNU.

@cakebaker
cakebaker requested a review from sylvestre July 28, 2026 14:04
@oech3

oech3 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Any progress? It would be better to remove this before someone start relying on this.

@sylvestre

Copy link
Copy Markdown
Contributor

dunno. i need to spend more time on it

@codspeed

codspeed Bot commented Sep 18, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 16.26%

❌ 3 regressed benchmarks
✅ 3 untouched benchmarks
⏩ 412 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation shuf_lines[100000] 47.8 ms 65.4 ms -26.95%
Simulation shuf_repeat_sampling[50000] 9.8 ms 11.6 ms -15.73%
Simulation shuf_input_range[1000000] 158.5 ms 166.1 ms -4.59%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing oech3:shuf-rdseed (7cff20c) with main (58bc4fa)

Open in CodSpeed

Footnotes

  1. 412 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.

@sylvestre

Copy link
Copy Markdown
Contributor

Really bad extention

You will have to be a bit more explicit ;)

@oech3

oech3 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

--random-seed guides people to write non-portable scripts even we can do same things with --random-source which is portable. This is harmful for GNU.

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.

shuf --random-seed is undocumented extension missing from GNU

4 participants