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.
@github-actions
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)

@codspeed-hq
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 (677fd95)1

Summary

✅ 125 untouched

Footnotes

  1. No successful run was found on main (8983b90) during the generation of this report, so 677fd95 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions
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)

@github-actions
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)

@github-actions
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)

@github-actions
Copy link

GNU testsuite comparison:

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

@naoNao89 naoNao89 closed this by deleting the head repository Nov 6, 2025
@naoNao89 naoNao89 reopened this Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (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.

1 participant