Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
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
4 changes: 4 additions & 0 deletions src/System.Drawing.Common/tests/FontFamilyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ public void Equals_Object_ReturnsExpected(FontFamily fontFamily, object other, b
}
}

// This will fail on any platform we use libgdiplus, with any
// installed system fonts whose name is longer than 31 chars.
// macOS 10.15+ ships out of the box with a problem font
[ActiveIssue("https://github.com/dotnet/runtime/issues/40937", TestPlatforms.AnyUnix)]
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Families_Get_ReturnsExpected()
{
Expand Down
9 changes: 8 additions & 1 deletion src/System.IO.Ports/tests/SerialPort/DosDevices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace System.IO.Ports.Tests
Expand Down Expand Up @@ -128,14 +129,20 @@ private static char[] CallQueryDosDevice(string name, out int dataSize)
buffer = new char[buffer.Length * 2];
dataSize = QueryDosDevice(null, buffer, buffer.Length);
}
else if (lastError == ERROR_ACCESS_DENIED) // Access denied eg for "MSSECFLTSYS" - just skip
{
dataSize = 0;
break;
}
else
{
throw new Exception("Unknown Win32 Error: " + lastError);
throw new Exception($"Error {lastError} calling QueryDosDevice for '{name}' with buffer size {buffer.Length}. {new Win32Exception((int)lastError).Message}");
}
}
return buffer;
}

public const int ERROR_ACCESS_DENIED = 5;
public const int ERROR_INSUFFICIENT_BUFFER = 122;
public const int ERROR_MORE_DATA = 234;

Expand Down