Skip to content

stdbuf: support libstdbuf in same directory as stdbuf#10352

Merged
sylvestre merged 1 commit intouutils:mainfrom
Ecordonnier:eco/libstdbuf-same-dir
Feb 6, 2026
Merged

stdbuf: support libstdbuf in same directory as stdbuf#10352
sylvestre merged 1 commit intouutils:mainfrom
Ecordonnier:eco/libstdbuf-same-dir

Conversation

@Ecordonnier
Copy link
Collaborator

Make stdbuf search for libstdbuf first in the directory where stdbuf is running. This matches GNU coreutils behavior. Add a symlink to deps/libstdbuf in order to make it easier to run the stdbuf tests with feat_external_stdbuf enabled.

Remove tests which are assuming that libstdbuf is not found. Those tests are now always failing, because the build directory contains a symlink to deps/libstdbuf and libstdbuf is always found.

Fixes #10345

@oech3
Copy link
Contributor

oech3 commented Jan 19, 2026

Unfortunately, Cygwin (windows) does not allow symlink by default. Would you disable tests on Cygwin?

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 19, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing Ecordonnier:eco/libstdbuf-same-dir (0a95c2f) with main (b8de224)

Summary

✅ 142 untouched benchmarks
⏩ 180 skipped benchmarks1

Footnotes

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

GNU testsuite comparison:

Note: The gnu test tests/cut/cut-huge-range is now being skipped but was previously passing.

@Ecordonnier
Copy link
Collaborator Author

Unfortunately, Cygwin (windows) does not allow symlink by default. Would you disable tests on Cygwin?

Which test is failing on Cygwin? test_stdbuf_search_order_exe_dir_first ?

@oech3
Copy link
Contributor

oech3 commented Jan 20, 2026

Cygwin package does not run test currently, but CI would not allow all of tests creating symlink.

@Ecordonnier
Copy link
Collaborator Author

Ecordonnier commented Jan 20, 2026

Cygwin package does not run test currently, but CI would not allow all of tests creating symlink.

The test I am adding does not create a symlink, so it is not clear to me what you are asking me to do.

@oech3
Copy link
Contributor

oech3 commented Jan 20, 2026

Add a symlink to deps/libstdbuf in order to make it easier to run the stdbuf tests with feat_external_stdbuf enabled.

Does it means tester should manually create a symlink?

@Ecordonnier
Copy link
Collaborator Author

Ecordonnier commented Jan 20, 2026

Add a symlink to deps/libstdbuf in order to make it easier to run the stdbuf tests with feat_external_stdbuf enabled.

Does it means tester should manually create a symlink?

The build system creates a symlink, and would print a warning on cygwin if the command to create the symlink fails.

@oech3
Copy link
Contributor

oech3 commented Jan 20, 2026

would print a warning on cygwin if the command to create the symlink fails.

Thats fine for me!

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)

Make stdbuf search for libstdbuf first in the directory where stdbuf is running. This matches GNU coreutils behavior.
Add a symlink to deps/libstdbuf in order to make it easier to run the stdbuf tests with feat_external_stdbuf enabled.

Remove tests which are assuming that libstdbuf is not found. Those tests are now always failing, because the build
directory contains a symlink to deps/libstdbuf and libstdbuf is always found.

Fixes uutils#10345

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
@Ecordonnier Ecordonnier force-pushed the eco/libstdbuf-same-dir branch from 7bd4c53 to 0a95c2f Compare January 27, 2026 13:52
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@Ecordonnier
Copy link
Collaborator Author

@RenjiSann @sylvestre ping

@oech3
Copy link
Contributor

oech3 commented Feb 5, 2026

Needs this PR to publish libstdbuf at release page.

@sylvestre sylvestre merged commit 181b247 into uutils:main Feb 6, 2026
295 of 304 checks passed
@Ecordonnier Ecordonnier deleted the eco/libstdbuf-same-dir branch February 7, 2026 20:17
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.

stdbuf: Support libstdbuf in same directory as stdbuf

3 participants