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_touch in Ubuntu code coverage recently started to fail (probably because of dailylight saving change) #4584

Closed
sylvestre opened this issue Mar 23, 2023 · 2 comments

Comments

@sylvestre
Copy link
Contributor


failures:
    test_touch::test_touch_leap_second
    test_touch::test_touch_set_both
    test_touch::test_touch_set_cymdhm_time
    test_touch::test_touch_set_cymdhms_time
    test_touch::test_touch_set_date
    test_touch::test_touch_set_date2


---- test_touch::test_touch_leap_second stdout ----
run: /home/runner/work/coreutils/coreutils/target/debug/coreutils touch -t 197001010000.60 test_touch_leap_sec
---- test_touch::test_touch_leap_second stderr ----
thread 'main' panicked at 'Error The system's UTC offset could not be determined retrieving the OffsetDateTime::now_local', tests/by-util/test_touch.rs:55:13
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/panicking.rs:64:14
   2: tests::test_touch::str_to_filetime
             at ./tests/by-util/test_touch.rs:55:13
   3: tests::test_touch::test_touch_leap_second
             at ./tests/by-util/test_touch.rs:792:17
   4: tests::test_touch::test_touch_leap_second::{{closure}}
             at ./tests/by-util/test_touch.rs:782:29
   5: core::ops::function::FnOnce::call_once
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/ops/function.rs:250:5
   6: core::ops::function::FnOnce::call_once
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/ops/function.rs:250:5
   7: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/ops/function.rs:250:5
   8: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/alloc/src/boxed.rs:1988:9
   9: test::run_test_in_spawned_subprocess
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/test/src/lib.rs:793:27
  10: test::test_main_static_abort
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/test/src/lib.rs:186:9
  11: tests::main
             at ./tests/tests.rs:1:1
  12: core::ops::function::FnOnce::call_once
             at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

https:/uutils/coreutils/actions/runs/4499044940/jobs/7916411002

@tertsdiepraam
Copy link
Member

tertsdiepraam commented Mar 23, 2023

Instead of fixing the touch tests specifically, I'd like to come back to this: #4446 (comment)

Basically, I think we should run all tests in the UTC timezone, unless otherwise specified, but we'll have to adapt some tests to make that work.

The error you've posted seems unrelated to the timezone though. I think it's a duplicate of #4253. I was working on a fix, but I needed support from the filetime crate, where I opened an issue: alexcrichton/filetime#95

@sylvestre
Copy link
Contributor Author

oups, thanks

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

No branches or pull requests

2 participants