Skip to content

Unexpected Test Failure in test_du_no_dereference #5585

@allaboutevemirolive

Description

@allaboutevemirolive

I encountered an unexpected test failure while running cargo test, specifically in the test_du::test_du_no_dereference test case. The failure seems to be related to the use of symbolic links in the /tmp directory.

Error Output:

failures:

---- test_du::test_du_no_dereference stdout ----
mkdir: /tmp/.tmpaRZr6V/a_dir
symlink: /tmp/.tmpaRZr6V/a_dir,/tmp/.tmpaRZr6V/symlink
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du -P
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du --dereference -P
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du -P --dereference
thread 'test_du::test_du_no_dereference' panicked at tests/by-util/test_du.rs:372:14:
'4	./a_dir
8	./subdir/deeper/deeper_dir
16	./subdir/deeper
16	./subdir/links
36	./subdir
48	.
' does not contain 'symlink'

failures:
    test_du::test_du_no_dereference

test result: FAILED. 2540 passed; 1 failed; 28 ignored; 0 measured; 0 filtered out; finished in 60.97s

error: test failed, to rerun pass `--test tests`

Steps to Reproduce:
In the project directory, run cargo test.

Additional Information:

  • The error is consistently reproduced on local machines.
  • The error does not trigger the repository CI, possibly due to differences in the filesystem (as discussed here).

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