From ee36d00d9481cfdc053778b945791c564aa679e9 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Tue, 17 Jan 2023 18:40:21 -0800 Subject: [PATCH] Fix diagnosticport test failure in ilasm/ildasm round-trip testing --- src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs b/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs index 2a4ccec828c27..7511acdafd4a7 100644 --- a/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs +++ b/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs @@ -415,7 +415,8 @@ public static async Task TEST_CanGetProcessInfo2WhileSuspended() } else { - string expectedName = Assembly.GetExecutingAssembly().GetName().Name; + // Assembly has not been loaded yet, so the assembly file name is used + string expectedName = Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location); Utils.Assert(expectedName.Equals(processInfo2.ManagedEntrypointAssemblyName), $"ManagedEntrypointAssemblyName must match. Expected: {expectedName}, Received: {processInfo2.ManagedEntrypointAssemblyName}"); }