Skip to content
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

Delete RHEL6 leftovers #1648

Merged
merged 1 commit into from
Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/coreclr/init-distro-rid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#
# | OS | Expected RID |
# -------------------------------------------------
# | rhel6 | rhel.6-x64 |
# | alpine* | linux-musl-(arch) |
# | freeBSD | freebsd.(version)-x64 |
#
Expand Down
30 changes: 0 additions & 30 deletions src/installer/corehost/common/pal.unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ pal::string_t pal::get_current_os_rid_platform()
{
pal::string_t ridOS;
pal::string_t versionFile(_X("/etc/os-release"));
pal::string_t rhelVersionFile(_X("/etc/redhat-release"));

if (pal::file_exists(versionFile))
{
Expand Down Expand Up @@ -625,35 +624,6 @@ pal::string_t pal::get_current_os_rid_platform()
}
}
}
else if (pal::file_exists(rhelVersionFile))
{
// Read the file to check if the current OS is RHEL or CentOS 6.x
std::fstream fsVersionFile;

fsVersionFile.open(rhelVersionFile, std::fstream::in);

// Proceed only if we were able to open the file
if (fsVersionFile.good())
{
pal::string_t line;
// Read the first line
std::getline(fsVersionFile, line);

if (!fsVersionFile.eof())
{
pal::string_t rhel6Prefix(_X("Red Hat Enterprise Linux Server release 6."));
pal::string_t centos6Prefix(_X("CentOS release 6."));

if ((line.find(rhel6Prefix) == 0) || (line.find(centos6Prefix) == 0))
{
ridOS = _X("rhel.6");
}
}

// Close the file now that we are done with it.
fsVersionFile.close();
}
}

return normalize_linux_rid(ridOS);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public static partial class PlatformDetection
// RedHat family covers RedHat and CentOS
public static bool IsRedHatFamily => IsRedHatFamilyAndVersion();
public static bool IsNotRedHatFamily => !IsRedHatFamily;
public static bool IsRedHatFamily6 => IsRedHatFamilyAndVersion(6);
public static bool IsNotRedHatFamily6 => !IsRedHatFamily6;
public static bool IsRedHatFamily7 => IsRedHatFamilyAndVersion(7);
public static bool IsNotFedoraOrRedHatFamily => !IsFedora && !IsRedHatFamily;
public static bool IsNotDebian10 => !IsDebian10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ public static bool IsDrawingSupported
}
else
{
// ActiveIssue(24525)
return PlatformDetection.IsNotRedHatFamily6 && (NativeLibrary.TryLoad("libgdiplus.so", out _) || NativeLibrary.TryLoad("libgdiplus.so.0", out _));
return NativeLibrary.TryLoad("libgdiplus.so", out _) || NativeLibrary.TryLoad("libgdiplus.so.0", out _);
}
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ public void ProcessStart_UseShellExecute_OnUnix_SuccessWhenProgramInstalled(bool
}
}

// Active issue https://github.com/dotnet/corefx/issues/37739
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotRedHatFamily6))]
[Fact]
[PlatformSpecific(~TestPlatforms.OSX)] // On OSX, ProcessName returns the script interpreter.
public void ProcessNameMatchesScriptName()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public void FromHtml_Invalid_Throws(string htmlColor)
}
}

[ConditionalTheory(Helpers.IsDrawingSupported)]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsDrawingSupported))]
[InlineData("#G12", typeof(FormatException))]
[InlineData("#G12345", typeof(FormatException))]
[InlineData("1,2", typeof(ArgumentException))]
Expand Down
13 changes: 0 additions & 13 deletions src/libraries/System.Drawing.Primitives/tests/Helpers.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<ItemGroup>
<Compile Include="ColorTranslatorTests.cs" />
<Compile Include="DataContractSerializerTests.cs" />
<Compile Include="Helpers.cs" />
<Compile Include="PointFTests.cs" />
<Compile Include="PointTests.cs" />
<Compile Include="RectangleFTests.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace System.IO.Tests
{
public class Directory_Delete_str : FileSystemTest
{
static bool IsBindMountSupported => RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !PlatformDetection.IsInContainer && !PlatformDetection.IsRedHatFamily6;
static bool IsBindMountSupported => RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !PlatformDetection.IsInContainer;

#region Utilities

Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.IO.FileSystem/tests/File/Delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace System.IO.Tests
{
public class File_Delete : FileSystemTest
{
static bool IsBindMountSupported => RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !PlatformDetection.IsInContainer && !PlatformDetection.IsRedHatFamily6;
static bool IsBindMountSupported => RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !PlatformDetection.IsInContainer;

protected virtual void Delete(string path)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void ClonedClient_ActsAsOriginalClient()
}
}

[ConditionalFact(typeof(PlatformDetection), "IsNotRedHatFamily6")]
[Fact]
[PlatformSpecific(TestPlatforms.Linux)] // On Linux, setting the buffer size of the server will also set the buffer size of the client
public static void Linux_BufferSizeRoundtrips()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,13 @@ namespace System.Runtime.Tests
{
public class ProfileOptimizationTest : FileCleanupTestBase
{
// Active issue https://github.com/dotnet/corefx/issues/31792
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotRedHatFamily6))]
[Fact]
public void ProfileOptimization_CheckFileExists()
{
string profileFile = GetTestFileName();

RemoteExecutor.Invoke((_profileFile) =>
{
// tracking down why test sporadically fails on RedHat69
// write to the file first to check permissions
// See https://github.com/dotnet/corefx/issues/31792
File.WriteAllText(_profileFile, "42");

// Verify this write succeeded
Assert.True(File.Exists(_profileFile), $"'{_profileFile}' does not exist");
Assert.True(new FileInfo(_profileFile).Length > 0, $"'{_profileFile}' is empty");

// Delete the file and verify the delete
File.Delete(_profileFile);
Assert.True(!File.Exists(_profileFile), $"'{_profileFile} ought to not exist now");

// Perform the test work
ProfileOptimization.SetProfileRoot(Path.GetDirectoryName(_profileFile));
ProfileOptimization.StartProfile(Path.GetFileName(_profileFile));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ public static class DynamicRevocationTests
private static readonly X509ChainStatusFlags ThisOsRevocationStatusUnknown =
X509ChainStatusFlags.RevocationStatusUnknown | X509ChainStatusFlags.OfflineRevocation;

// RHEL6 uses a version of OpenSSL that (empirically) doesn't support designated responders.
// (There's a chance that we should be passing in extra stuff, but RHEL6 is the only platform
// still on OpenSSL 1.0.0/1.0.1 in 2019, so it seems OpenSSL-related)
private static readonly bool s_supportsDesignatedResponder = PlatformDetection.IsNotRedHatFamily6;

[Flags]
public enum PkiOptions
{
Expand Down Expand Up @@ -57,9 +52,7 @@ public static IEnumerable<object[]> AllViableRevocation
{
get
{
int designationLimit = s_supportsDesignatedResponder ? 4 : 1;

for (int designation = 0; designation < designationLimit; designation++)
for (int designation = 0; designation < 4; designation++)
{
PkiOptions designationOptions = (PkiOptions)(designation << 16);

Expand Down