Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

df: test_type_option_with_file is failing on linux #6194

Open
jadijadi opened this issue Apr 5, 2024 · 2 comments
Open

df: test_type_option_with_file is failing on linux #6194

jadijadi opened this issue Apr 5, 2024 · 2 comments
Labels

Comments

@jadijadi
Copy link
Contributor

jadijadi commented Apr 5, 2024

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.

@cakebaker
Copy link
Contributor

cakebaker commented Apr 5, 2024

What's the output of df --output=fstype . and df --output=fstype?

Edit: I'm able to reproduce it on my machine. It seems to be related to tmpfs: running df -t ext4 . on a tmpfs file system fails with "no file systems processed", whereas with uutils df it doesn't fail.

@jadijadi
Copy link
Contributor Author

jadijadi commented Apr 5, 2024

here you are

df --output=fstype .
Type
ext4

df --output=fstype
Type
ext4
devtmpfs
tmpfs
efivarfs
tmpfs
tmpfs
vfat
ext4
tmpfs

target/debug/coreutils df --output=fstype .
Type
ext4

target/debug/coreutils df --output=fstype
Type
ext4
devtmpfs
tmpfs
efivarfs
tmpfs
tmpfs
vfat
ext4
tmpfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants