uutils / uutils/coreutils

Failing tests as of 2025-08-13

Open
#8,480 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

The terminal sizes have been going on for a while now. All tested by getting the git tree and running the Ubuntu packaging cleanly in sbuild.

We did not notice that the tests started failing at some point (they worked fine in the 0.1.0 release afair), as the package inadvertently ignored test failures and I never scrolled back up enough in the build log :D

---- test_env::test_simulation_of_terminal_true stdout ----
bin: "/build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils"
run: /build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils env sh is_a_tty.sh

thread 'test_env::test_simulation_of_terminal_true' panicked at tests/by-util/test_env.rs:1602:5:
assertion `left == right` failed
  left: "stdin is a tty\r\nterminal size: \r\nstdout is a tty\r\nstderr is a tty\r\n"
 right: "stdin is a tty\r\nterminal size: 30 80\r\nstdout is a tty\r\nstderr is a tty\r\n"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- test_env::test_simulation_of_terminal_size_information stdout ----
bin: "/build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils"
run: /build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils env sh is_a_tty.sh

thread 'test_env::test_simulation_of_terminal_size_information' panicked at tests/by-util/test_env.rs:1711:5:
assertion `left == right` failed
  left: "stdin is a tty\r\nterminal size: \r\nstdout is a tty\r\nstderr is a tty\r\n"
 right: "stdin is a tty\r\nterminal size: 10 40\r\nstdout is a tty\r\nstderr is a tty\r\n"

---- test_env::test_simulation_of_terminal_for_stdin_only stdout ----
bin: "/build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils"
run: /build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils env sh is_a_tty.sh

thread 'test_env::test_simulation_of_terminal_for_stdin_only' panicked at tests/by-util/test_env.rs:1628:5:
assertion `left == right` failed
  left: "stdin is a tty\nterminal size: \nstdout is not a tty\nstderr is not a tty\n"
 right: "stdin is a tty\nterminal size: 30 80\nstdout is not a tty\nstderr is not a tty\n"

These are new:

---- test_env::test_env_arg_ignore_signal_valid_signals stdout ----
bin: "/build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils"
run: /build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils env --ignore-signal=int sleep 1000

thread 'test_env::test_env_arg_ignore_signal_valid_signals' panicked at tests/by-util/test_env.rs:49:14:
failed to send signal: Os { code: 2, kind: NotFound, message: "No such file or directory" }

---- test_ls::test_device_number stdout ----

thread 'test_ls::test_device_number' panicked at tests/by-util/test_ls.rs:4854:10:
Expect a block/char device

---- test_tail::test_following_with_pid stdout ----
bin: "/build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils"
touch: /tmp/.tmpHJKbrQ/f
run: /build/reproducible-path/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils tail --pid 34427 -f /tmp/.tmpHJKbrQ/f

thread 'test_tail::test_following_with_pid' panicked at tests/by-util/test_tail.rs:4865:10:
failed to kill sleep command: Os { code: 2, kind: NotFound, message: "No such file or directory" }

Summary

failures:
    test_env::test_env_arg_ignore_signal_valid_signals
    test_env::test_simulation_of_terminal_for_stdin_only
    test_env::test_simulation_of_terminal_size_information
    test_env::test_simulation_of_terminal_true
    test_ls::test_device_number
    test_tail::test_following_with_pid

test result: FAILED. 3378 passed; 6 failed; 42 ignored; 0 measured; 0 filtered out; finished in 24.07s

On the host I observe:

---- test_df::test_total stdout ----
bin: "/home/jak/Projects/Ubuntu/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils"
run: /home/jak/Projects/Ubuntu/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils df --total

thread 'test_df::test_total' panicked at tests/by-util/test_df.rs:411:5:
assertion `left == right` failed
  left: 1175375157
 right: 1175375156
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- test_cp::test_cp_reflink_always_override stdout ----
bin: "/home/jak/Projects/Ubuntu/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils"
mkdir: /tmp/.tmpgIaNNl/disk_root/
mkdir: /tmp/.tmpgIaNNl/disk_root/dir/
run: /home/jak/Projects/Ubuntu/rust-coreutils-0.1.0+git20250813.4af2a84/target/debug/coreutils truncate -s 128M disk.img
run: env mkfs.btrfs --rootdir disk_root/ disk.img
mkdir: /tmp/.tmpgIaNNl/mountpoint/
run: sudo -E --non-interactive mount disk.img mountpoint/

thread 'test_cp::test_cp_reflink_always_override' panicked at tests/uutests/src/lib/util.rs:1982:35:
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "wait: Timeout of '30s' reached" }

failures:
    test_cp::test_cp_reflink_always_override
    test_df::test_total
    test_env::test_simulation_of_terminal_for_stdin_only
    test_env::test_simulation_of_terminal_size_information
    test_env::test_simulation_of_terminal_true

Building with make test on the host instead I get errors (albeit make test in the package worked!):

error[E0658]: `let` expressions in this position are unstable
    --> /home/jak/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/selinux-0.5.3/src/lib.rs:1635:12
     |
1635 |         if let Ok(this_type) = self.the_type()
     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information

(the feature only was stabilized in Rust 1.88, it would be nice to use sustainable crate versions - it will take some more months before Rust 1.88 is available to Ubuntu, relying on a new language version merely released 2 months ago isn't particularly helpful)

(I think the packaging vendored selinux 0.5.2, but it now released 0.5.3 which is incompatible with Rust 1.85, which is the latest Rust on Ubuntu, and the dependency probably allows minor version bumps).

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 by reproducing the failures listed in tests/by-util/test_env.rs, test_ls.rs, test_tail.rs, and test_df.rs, then inspect the test utility at tests/uutests/src/lib/util.rs. Check both the packaging build and make test, including the selinux 0.5.3 Rust-version error. Done means the reported tests pass and the project builds with the supported Rust version.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.