Skip to content

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 (7bd4c53) with main (5cb884f)

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!

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 5f7aac1 to 7bd4c53 Compare January 20, 2026 22:21
@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)

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

2 participants