mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-03 03:31:57 +02:00
Merge bitcoin/bitcoin#31846: test: Remove stale gettime test
fa3a4eafa11ee03fccea1c2a16df5bf2ab164159 test: Remove stale gettime test (MarcoFalke) Pull request description: 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 *all* `GetTime<>` 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 the `assert(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. ACKs for top commit: l0rinc: ACK fa3a4eafa11ee03fccea1c2a16df5bf2ab164159 laanwj: ACK fa3a4eafa11ee03fccea1c2a16df5bf2ab164159 Tree-SHA512: fd485e74962b659ee23ba2952d284fa9d6cfb9d9844a5e70013c8ead495ed77f5b784d5ca3ba0b30c492a5d27b2e81f9e1e0dbc530af7da1494789ac5e055b99
This commit is contained in:
commit
87ce116058
@ -567,14 +567,6 @@ BOOST_AUTO_TEST_CASE(strprintf_numbers)
|
||||
#undef B
|
||||
#undef E
|
||||
|
||||
/* Check for mingw/wine issue #3494
|
||||
* Remove this test before time.ctime(0xffffffff) == 'Sun Feb 7 07:28:15 2106'
|
||||
*/
|
||||
BOOST_AUTO_TEST_CASE(gettime)
|
||||
{
|
||||
BOOST_CHECK((GetTime() & ~0xFFFFFFFFLL) == 0);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(util_time_GetTime)
|
||||
{
|
||||
SetMockTime(111);
|
||||
|
Loading…
x
Reference in New Issue
Block a user