This randomly pops up when running semaphoreci.
The log file says:
---------
****** FAIL debug64 std.file
core.exception.AssertError@std/file.d(1929): unittest failure
---------
Looking at std/file.d it's clearly a timing issue:
----
@system unittest
{
import core.thread;
if (exists(deleteme))
remove(deleteme);
SysTime lastTime;
foreach (n; 0 .. 3)
{
write(deleteme, "a");
auto time = timeLastModified(deleteme);
remove(deleteme);
assert(time != lastTime);
lastTime = time;
Thread.sleep(10.msecs);
}
}
-----
Comment #1 by dlang-bot — 2020-08-12T20:38:38Z
@NilsLankila created dlang/phobos pull request #7589 "fix issue 21148, possible failure of CI when testing nano precision of file time stamps" fixing this issue:
- fix issue 21148, possible failure of CI when testing nano precision of file time stamps
If the kernel setting for the software clock frequency (HZ) is set to 100, we got 10 msec resolution. CIs being on VMs we cant control it's better to assume that the setting can be set to this worst value, so test with a value greater than 10 msecs.
https://github.com/dlang/phobos/pull/7589
Comment #2 by dlang-bot — 2020-08-13T08:12:14Z
dlang/phobos pull request #7589 "fix issue 21148, possible failure of CI when testing nano precision of file time stamps" was merged into master:
- 384c21688012b9262870f495893b184602f95719 by Nils Lankila:
fix issue 21148, possible failure of CI when testing nano precision of file time stamps
If the kernel setting for the software clock frequency (HZ) is set to 100, we got 10 msec resolution. CIs being on VMs we cant control it's better to assume that the setting can be set to this worst value, so test with a value greater than 10 msecs.
https://github.com/dlang/phobos/pull/7589