btrfs causes four test failures
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
I tried running cargo test --features unix --release on my desktop and laptop and had failures on my desktop only. These installs are both exactly the same, but my desktop runs on btrfs and my laptop on ext4. They are running the most recent update of Debian 12 bookworm. This is on the most recent stable version of Rust.
Here is the output:
...
failures:
---- test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence stdout ----
touch: /tmp/.tmp8FzIzn/a
write(append): /tmp/.tmp8FzIzn/a
write(append): /tmp/.tmp8FzIzn/a
run: /home/david/projects/coreutils/target/release/coreutils cp --debug --sparse=always a b
thread 'test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence' panicked at tests/by-util/test_cp.rs:4046:5:
assertion `left == right` failed
left: 40
right: 8
---- test_cp::test_cp_sparse_always_empty stdout ----
write(default): /tmp/.tmpjXdqIm/src_file1
run: /home/david/projects/coreutils/target/release/coreutils cp --sparse=always src_file1 dst_file_sparse
open: /tmp/.tmpjXdqIm/dst_file_sparse
thread 'test_cp::test_cp_sparse_always_empty' panicked at tests/by-util/test_cp.rs:2334:9:
assertion `left == right` failed
left: 32
right: 0
---- test_cp::test_cp_sparse_always_non_empty stdout ----
write(default): /tmp/.tmp7HMecc/src_file1
run: /home/david/projects/coreutils/target/release/coreutils cp --sparse=always src_file1 dst_file_sparse
open: /tmp/.tmp7HMecc/dst_file_sparse
thread 'test_cp::test_cp_sparse_always_non_empty' panicked at tests/by-util/test_cp.rs:2361:5:
assertion `left == right` failed
left: 136
right: 16
---- test_du::test_du_dereference_args stdout ----
mkdir: /tmp/.tmpfF3pUp/dir
write(default): /tmp/.tmpfF3pUp/dir/file-ignore1
write(default): /tmp/.tmpfF3pUp/dir/file-ignore2
symlink: /tmp/.tmpfF3pUp/dir,/tmp/.tmpfF3pUp/sublink
run: /home/david/projects/coreutils/target/release/coreutils du -D -s sublink
run: /home/david/projects/coreutils/target/release/coreutils du -H -s sublink
run: /home/david/projects/coreutils/target/release/coreutils du --dereference-args -s sublink
run: /home/david/projects/coreutils/target/release/coreutils du -s sublink
thread 'test_du::test_du_dereference_args' panicked at tests/by-util/test_du.rs:367:12:
'4 sublink
' does not contain '0 sublink
'
failures:
test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence
test_cp::test_cp_sparse_always_empty
test_cp::test_cp_sparse_always_non_empty
test_du::test_du_dereference_args
test result: FAILED. 3384 passed; 4 failed; 57 ignored; 0 measured; 0 filtered out; finished in 33.95s
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failures with cargo test --features unix --release on the reported btrfs setup, then compare the results with ext4. Read the failing cases in tests/by-util/test_cp.rs at lines 2334, 2361, and 4046, and tests/by-util/test_du.rs at line 367. Done means all four reported tests pass on btrfs without regressing the existing test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100