+
Skip to content

Conversation

naoNao89
Copy link
Contributor

@naoNao89 naoNao89 commented Oct 3, 2025

Part of #4627 (split from #8684 per maintainer request)

cat

  • test_cat_broken_pipe_nonzero_and_message: ensures no hang/crash and nonzero exit on SIGPIPE-like conditions on Unix

stdbuf

  • Add external-lib mode guards and tests for missing libstdbuf scenarios:
    • test_permission_external_missing_lib
    • test_no_such_external_missing_lib
  • Existing tests are gated with #[cfg(not(feature = "feat_external_libstdbuf"))] to avoid brittle system-state dependencies

Goal: improve GNU-compat write-error behavior while keeping tests stable across platforms.

Additional notes:

  • Also updates the cspell wordlist to include "EPIPE" used by the new tests.
  • The two new stdbuf tests above are behind feature = "feat_external_libstdbuf"; existing tests remain under not(feature = "feat_external_libstdbuf").
  • TODO: Align libstdbuf search order to enable deterministic testing without system installation: (1) next to the stdbuf binary, (2) LIBSTDBUF_DIR, then (3) system locations. After that, rework tests to use a temporary symlink instead of depending on system state.

Add test coverage for cat and stdbuf broken pipe handling:

**cat tests:**
- test_cat_broken_pipe_nonzero_and_message: Verify cat handles SIGPIPE
  without hanging or crashing and exits with nonzero status

**stdbuf tests:**
- test_permission_external_missing_lib: Handle missing external libstdbuf
- test_no_such_external_missing_lib: Error handling in external lib mode
- Guard existing tests with #[cfg(not(feature = "feat_external_libstdbuf"))]

These tests address write-errors.sh from GNU test suite (uutils#4627) and improve
cross-platform robustness for stdbuf feat_external_libstdbuf builds.
Copy link

github-actions bot commented Oct 3, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)

Copy link

codspeed-hq bot commented Oct 3, 2025

CodSpeed Performance Report

Merging #8798 will not alter performance

Comparing naoNao89:test/cat-stdbuf-broken-pipe (e092d75) with main (daa74e7)

Summary

✅ 105 untouched
⏩ 73 skipped1

Footnotes

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

Copy link

github-actions bot commented Oct 3, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

Copy link

github-actions bot commented Oct 3, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

Copy link

github-actions bot commented Oct 4, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails 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.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载