Skip to content

Commit 1a7664d

Browse files
authored
Fix unhandled exception test for composite r2r case (#109244)
The test fails when built as r2r composite on linux coreclr due to the fact that the unhandled exception differs in this case from regular non-composite or non-r2r builds. It gets System.EntryPointNotFoundException instead of System.DllNotFoundException due to a different order the resolving happens in this case. This change fixes that by modifying the unhandledTester to accept both of these cases as success.
1 parent 3648d83 commit 1a7664d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tests/baseservices/exceptions/unhandled/unhandledTester.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ static void RunExternalProcess(string unhandledType, string assembly)
9898
}
9999
else if (unhandledType == "foreign")
100100
{
101-
if (!lines[0].StartsWith("Unhandled exception. System.DllNotFoundException:"))
101+
if (!lines[0].StartsWith("Unhandled exception. System.DllNotFoundException:") &&
102+
!lines[0].StartsWith("Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named 'HelloCpp'"))
102103
{
103104
throw new Exception("Missing Unhandled exception header");
104105
}

0 commit comments

Comments
 (0)