Skip to content

df: test_type_option_with_file is failing on linux #6194

@jadijadi

Description

@jadijadi

running cargo test --features "df" --no-default-features on my machine (Fedora 39) fails with:

test test_df::test_type_option ... ok
test test_df::test_type_option_with_file ... FAILED

failures:

---- test_df::test_type_option_with_file stdout ----
run: /home/jadi/w/coreutils/target/debug/coreutils df --output=fstype .
run: /home/jadi/w/coreutils/target/debug/coreutils df -t tmpfs .
run: /home/jadi/w/coreutils/target/debug/coreutils df -t nonexisting .
run: /home/jadi/w/coreutils/target/debug/coreutils df --output=fstype
run: /home/jadi/w/coreutils/target/debug/coreutils df -t ext4 .
---- test_df::test_type_option_with_file stderr ----
thread 'main' panicked at tests/by-util/test_df.rs:292:14:
Command was expected to fail.
stdout = Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/nvme0n1p1  51290592 10272556  38380212  22% /

 stderr =
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test_df::test_type_option_with_file

test result: FAILED. 75 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.83s

On command line, running df -t ext4 . is successful with the following stdout:

df -t ext4 .
Filesystem        1K-blocks      Used Available Use% Mounted on
/dev/mapper/chome 873904196 722075412 107363172  88% /home

but the test expects a failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions