uutils / uutils/coreutils

test_truncate_applies_before_complement_with_class intermittent failure

Open
#12,045 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

---- test_tr::test_truncate_applies_before_complement_with_class stdout ----
bin: "D:\\a\\coreutils\\coreutils\\target\\debug\\coreutils.exe"
run: D:\a\coreutils\coreutils\target\debug\coreutils.exe tr -ct [:digit:] X

thread 'test_tr::test_truncate_applies_before_complement_with_class' (7868) panicked at tests\uutests\src\lib\util.rs:2846:18:
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "failed to write to stdin of child: The pipe is being closed. (os error 232)" }
stack backtrace:
   0: std::panicking::panic_handler
             at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library\std\src\panicking.rs:689
   1: core::panicking::panic_fmt
             at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library\core\src\panicking.rs:80
   2: core::result::unwrap_failed
             at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library\core\src\result.rs:1867
   3: enum2$<core::result::Result<tuple$<>,std::io::error::Error> >::unwrap
             at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library\core\src\result.rs:1233
   4: uutests::util::UChild::join
             at .\tests\uutests\src\lib\util.rs:2846
   5: uutests::util::UChild::wait_with_output
             at .\tests\uutests\src\lib\util.rs:2562
   6: uutests::util::UChild::wait
             at .\tests\uutests\src\lib\util.rs:2537
   7: uutests::util::UCommand::run
             at .\tests\uutests\src\lib\util.rs:2048
   8: uutests::util::UCommand::fails
             at .\tests\uutests\src\lib\util.rs:2072
   9: tests::test_tr::test_truncate_applies_before_complement_with_class
             at .\tests\by-util\test_tr.rs:389
  10: tests::test_tr::test_truncate_applies_before_complement_with_class::closure$0
             at .\tests\by-util\test_tr.rs:385
  11: core::ops::function::FnOnce::call_once<tests::test_tr::test_truncate_applies_before_complement_with_class::closure_env$0,tuple$<> >
             at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library\core\src\ops\function.rs:250
  12: core::ops::function::FnOnce::call_once
             at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

https://github.com/uutils/coreutils/actions/runs/25015365304/job/73261655322?pr=12043

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/by-util/test_tr.rs around test_truncate_applies_before_complement_with_class at lines 385-389, then inspect tests/uutests/src/lib/util.rs around UChild::join and wait_with_output. Reproduce the intermittent Windows failure from the linked Actions run and determine why the stdin pipe closes; done means the test runs reliably without the reported panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.