-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.IO.Tests.File_GetSetTimes.SetDateTimeMax fails on Ubuntu 18.04 in the CI #43166
Comments
Here is a link to the report on the test failure: |
I can repro the issue on my local Ubuntu 18.04 VM too. |
It seems there was a kernel patch that enabled limits on the time stamps, see https://lore.kernel.org/lkml/20190730014924.2193-10-deepa.kernel@gmail.com/. The timestamp limit mentioned in that page matches what we are getting as the actual value in the test. |
I'm disabling the test for now on Linux in #43178. |
Fix I guess is to update
|
Eh, I guess not that simple; it seems it's filesystem specific. |
Since from this point onward, Linux kernels will not have long max datetime support, I think we can simply exclude Linux from this test's matrix? macOS and 32bit Unix are already excluded, regardless of filesystem type (e.g. NTFS macOS will pass this test in practice but we seem to only care about the default file system of platform). --- a/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs
+++ b/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs
@@ -11,10 +11,6 @@ namespace System.IO.Tests
{
public class File_GetSetTimes : StaticGetSetTimes
{
- // OSX has the limitation of setting upto 2262-04-11T23:47:16 (long.Max) date.
- // 32bit Unix has time_t up to ~ 2038.
- private static bool SupportsLongMaxDateTime => PlatformDetection.IsWindows || (!PlatformDetection.Is32BitProcess && !PlatformDetection.IsOSXLike);
-
protected override string GetExistingItem()
{
string path = GetTestFilePath();
@@ -148,7 +144,7 @@ public void SetUptoNanoseconds()
Assert.Equal(ticks, dateTime.Ticks);
}
- [ConditionalFact(nameof(SupportsLongMaxDateTime))]
+ [PlatformSpecific(TestPlatforms.Windows)]
public void SetDateTimeMax()
{
string file = GetTestFilePath(); |
Seems this issue can be closed, since the test no longer runs on Linux? |
In two of my unrelated CIs, the System.IO.Tests.File_GetSetTimes.SetDateTimeMax test keeps failing on Ubuntu 18.04 with the following error:
There was a notice from the engineering team that they have updated Ubuntu 18.04 image to the latest version, so I wonder if it is related. Setting the file time calls
utimes
orutimensat
glibc functions, so their implementation w.r.t. clipping the max time could have possibly changed.Runfo Tracking Issue: System.IO.Tests.File_GetSetTimes.SetDateTimeMax fails on Ubuntu 18.04 in the CI
Build Result Summary
The text was updated successfully, but these errors were encountered: