Commit 0dc74c9
committed
Merge bitcoin/bitcoin#32212: test: Remove confusing and failing system time test
fadf8f0 test: Remove confusing and failing system time test (MarcoFalke)
Pull request description:
This was just added as a sanity check in fa01366 by myself.
However, the test uses system time, so it may obviously (albeit rarely) fail.
Fix it by removing it.
Can be tested by running two bash loops at the same time:
`while ( ./bld-cmake/bin/test_bitcoin -t util_tests/util_time_GetTime ) ; do true ; done`
`while ( date -s "$(date -d 'now + 0.015 seconds' '+%Y-%m-%d %H:%M:%S.%3N')" && date -s "$(date -d 'now - 0.015 seconds' '+%Y-%m-%d %H:%M:%S.%3N')" ) ; do true ; done`
Eventually, it will fail:
```
test/util_tests.cpp(595): error: in "util_tests/util_time_GetTime": check ms_0 < GetTime<std::chrono::milliseconds>() has failed
test/util_tests.cpp(596): error: in "util_tests/util_time_GetTime": check us_0 < GetTime<std::chrono::microseconds>() has failed
*** 2 failures are detected in the test module "Bitcoin Core Test Suite"
ACKs for top commit:
janb84:
ACK [fadf8f0](bitcoin/bitcoin@fadf8f0)
mabu44:
Tested ACK fadf8f0
hebasto:
ACK fadf8f0, tested on Ubuntu 24.10.
Tree-SHA512: fc468546f46a12804802df4f0e64d2898aca3db4df69602e5919ac31646c2fcb1e75b614fc2d1a3959c3db10fb0e315da5886d348b41589dba7cb43e618444a11 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| 585 | + | |
585 | 586 | | |
586 | | - | |
587 | | - | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | | - | |
591 | | - | |
592 | 590 | | |
593 | 591 | | |
594 | 592 | | |
595 | | - | |
596 | | - | |
597 | 593 | | |
598 | 594 | | |
599 | 595 | | |
| |||
0 commit comments