uutils / uutils/coreutils

tests/common/util.rs panics with Broken pipe error on some targets when pipe_in() is used in tests

Open
#5,338 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

https://github.com/uutils/coreutils/blob/aa0437c28a07364244b43bea53f6e4fd7d100fba/tests/common/util.rs#L2014-L2015

This seems to be the culprit. Maybe add handling the errors with match/if let instead of expect().unwrap() ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/common/util.rs at lines 2014-2015 and trace how pipe_in() is used by the affected tests. Replace the unconditional failure path only after checking the expected behavior for a broken pipe on different targets. Done means the relevant tests no longer panic with a Broken pipe error when pipe_in() is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.