Skip to content

Commit 87ce116

Browse files
committed
Merge bitcoin/bitcoin#31846: test: Remove stale gettime test
fa3a4ea 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 eaafa23. However, since commit 0000a63, `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 fa3a4ea laanwj: ACK fa3a4ea Tree-SHA512: fd485e74962b659ee23ba2952d284fa9d6cfb9d9844a5e70013c8ead495ed77f5b784d5ca3ba0b30c492a5d27b2e81f9e1e0dbc530af7da1494789ac5e055b99
2 parents 42251e0 + fa3a4ea commit 87ce116

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/test/util_tests.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -567,14 +567,6 @@ BOOST_AUTO_TEST_CASE(strprintf_numbers)
567567
#undef B
568568
#undef E
569569

570-
/* Check for mingw/wine issue #3494
571-
* Remove this test before time.ctime(0xffffffff) == 'Sun Feb 7 07:28:15 2106'
572-
*/
573-
BOOST_AUTO_TEST_CASE(gettime)
574-
{
575-
BOOST_CHECK((GetTime() & ~0xFFFFFFFFLL) == 0);
576-
}
577-
578570
BOOST_AUTO_TEST_CASE(util_time_GetTime)
579571
{
580572
SetMockTime(111);

0 commit comments

Comments
 (0)