Skip to content

Commit

Permalink
don't try to test module path if we can't load the module (#57590)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik authored Aug 17, 2021
1 parent 91c1250 commit 24971b0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ public void LongModuleFileNamesAreSupported()
IntPtr moduleHandle = Interop.Kernel32.LoadLibrary(longNamePath);
if (moduleHandle == IntPtr.Zero)
{
Assert.Equal(126, Marshal.GetLastWin32Error()); // ERROR_MOD_NOT_FOUND
Assert.Equal(Architecture.X86, RuntimeInformation.ProcessArchitecture);
return; // we have failed to load the module on x86, we skip the rest of the test (it's best effort)
return; // we've failed to load the module, we can't test module paths
}

try
Expand Down

0 comments on commit 24971b0

Please sign in to comment.