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

test_ls: Do not rely on the system time of metadata'access time #3029

Merged
merged 2 commits into from
Feb 6, 2022

Conversation

hbina
Copy link
Contributor

@hbina hbina commented Feb 2, 2022

---- test_ls::test_ls_order_time stdout ----
current_directory_resolved:
touch: C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-1
write(append): C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-1
touch: C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-2
write(append): C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-2
touch: C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-3
write(append): C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-3
touch: C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-4
write(append): C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-4
open: C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-3
run: C:\Users\Hanif\git\coreutils\target\debug\coreutils.exe ls -al
run: C:\Users\Hanif\git\coreutils\target\debug\coreutils.exe ls -t
run: C:\Users\Hanif\git\coreutils\target\debug\coreutils.exe ls --sort=time
run: C:\Users\Hanif\git\coreutils\target\debug\coreutils.exe ls -tr
run: C:\Users\Hanif\git\coreutils\target\debug\coreutils.exe ls --sort=time -r
run: C:\Users\Hanif\git\coreutils\target\debug\coreutils.exe ls -t -u
open: C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-3
open: C:\Users\Hanif\AppData\Local\Temp\.tmp2wgS4L\test-4
thread 'test_ls::test_ls_order_time' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
<"test-4\ntest-3\ntest-2\ntest-1\n"
>"test-3\ntest-4\ntest-2\ntest-1\n"

', tests\common\util.rs:233:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test_ls::test_ls_order_time

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

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

file3_access here is larger than file4_access but somehow it failed? https://github.com/uutils/coreutils/blob/main/tests/by-util/test_ls.rs#L1330-L1331

Signed-off-by: Hanif Bin Ariffin hanif.ariffin.43262@gmail.com

Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
@hbina hbina marked this pull request as draft February 2, 2022 04:53
@hbina hbina marked this pull request as ready for review February 3, 2022 08:08
@sylvestre sylvestre merged commit 16b397a into uutils:main Feb 6, 2022
@hbina hbina deleted the hbina-test_ls_order_time-is-flaky branch February 6, 2022 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants