coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

`test`: `test_test::test_file_is_newer_than_and_older_than_itself` and `test_test::test_newer_file` fail when no birth date available

Open Joining7943 opened this issue 2 years ago • 0 comments

I'm not sure if the failures are related, so I'm posting both errors here. The above tests fail on my linux machine with

---- test_test::test_file_is_newer_than_and_older_than_itself stdout ----
current_directory_resolved: 
run: /home/lenny/workspace/external/uutils/uutils/target/debug/coreutils test regular_file -nt regular_file
current_directory_resolved: 
run: /home/lenny/workspace/external/uutils/uutils/target/debug/coreutils test regular_file -ot regular_file
thread 'test_test::test_file_is_newer_than_and_older_than_itself' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
 Some(
<    101,
>    1,
 )

', tests/common/util.rs:199:9
---- test_test::test_newer_file stdout ----
current_directory_resolved: 
touch: /tmp/.tmpHeDbat/regular_file
touch: /tmp/.tmpHeDbat/newer_file
run: /home/lenny/workspace/external/uutils/uutils/target/debug/coreutils test newer_file -nt regular_file
run: /home/lenny/workspace/external/uutils/uutils/target/debug/coreutils test newer_file -ot regular_file
thread 'test_test::test_newer_file' panicked at 'Command was expected to succeed.
stdout = 
 stderr = thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Uncategorized, message: "creation time is not available for the filesystem" }', src/uu/test/src/test.rs:292:38
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
', tests/common/util.rs:177:9

I wanna note, that my /tmp directory is a mounted tmpfs file system where the creation time is indeed not available. However, I ran both tests manually with gnu's test without producing a 101 exit code or an error message, so I guessed we shouldn't either.

Joining7943 avatar Dec 13 '22 20:12 Joining7943