The gettime
test is stale:
- It was added to sanity check the
time
implementation in the mingw toolchain to catch a 32-bit vs 64-bit mismatch in commit eaafa23cbd83b7bda4b28779138c62446bbdea2a. However, since commit 0000a63689036dc4368d04c0648a55fdf507932f,std::chrono::system_clock
is used. - Even though
system_clock
may also return incorrect values, such an error should affect allGetTime<>
calls (not only the second-precision ones). (I expect such an error to lead to a signed integer overflow in the normal nanosecond precision, so it should be caught by ubsan or by theassert(ret > 0s)
. If not, the error should be apparent on startup in the debug log.)
So remove it for now. An alternative would be to extend the test to cover time
again, and adjust the comment to say that the test should be fixed along with the block header timestamp. Since that timestamp can’t grow beyond 2106 anyway, see the _test_y2106
functional test.