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

artifacts\bin\FSharpSuite.Tests\release\netcoreapp3.1\FSharpSuite.Tests.dll test case fails only on DotNET Sdk 5.0.101 and 5.0.102 #10931

Closed
KevinRansom opened this issue Jan 23, 2021 · 3 comments
Assignees

Comments

@KevinRansom
Copy link
Member

KevinRansom commented Jan 23, 2021

We have a test case that fails internal builds, it started failing when the test ran on 5.0.101 it also fails on 5.0.102

Repro on a machine with 5.0.101 or 5.0.102 pin, the framework in the global.json and run build -c release -testcoreclr eventully observe the failure.

  Failed Compile to Assembly [583 ms]
  Error Message:

Expected:
.field public static literal int32 x = int32(0x00000007)



Entire actual:






.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
  .ver 4:0:0:0
}
.assembly extern FSharp.Core
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
  .ver 5:0:0:0
}
.assembly extern System.Runtime
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
  .ver 4:2:2:0
}
.assembly extern System.Diagnostics.Debug
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
  .ver 4:1:2:0
}
.assembly test
{
  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32,
                                                                                                      int32,
                                                                                                      int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 )
  .hash algorithm 0x00008004
  .ver 0:0:0:0
}
.mresource public FSharpSignatureData.test
{


}
.mresource public FSharpOptimizationData.test
{


}
.module test.dll

.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003
.corflags 0x00000001





.class public abstract auto ansi sealed LiteralValue
       extends [runtime]System.Object
{
  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
  .field public static literal valuetype [runtime]System.Int32 x = int32(0x00000007)
  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 )
  .custom instance void [System.Diagnostics.Debug]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [System.Diagnostics.Debug]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
}

.class private abstract auto ansi sealed '<StartupCode$test>'.$LiteralValue
       extends [runtime]System.Object
{
}






  Stack Trace:
     at FSharp.Test.Utilities.ILChecker.checkILAux(FSharpList`1 ildasmArgs, String dllFilePath, FSharpList`1 expectedIL) in C:\kevinransom\fsharp\tests\FSharp.Test.Utilities\ILChecker.fs:line 114
   at FSharp.Test.Utilities.ILChecker.checkIL(String dllFilePath, FSharpList`1 expectedIL) in C:\kevinransom\fsharp\tests\FSharp.Test.Utilities\ILChecker.fs:line 124
   at FSharp.Test.Utilities.ILVerifier.VerifyIL(FSharpList`1 expectedIL) in C:\kevinransom\fsharp\tests\FSharp.Test.Utilities\CompilerAssert.fs:line 32
   at FSharp.Compiler.UnitTests.AstCompiler.AST Compiler Smoke Tests.Compile to Assembly() in C:\kevinransom\fsharp\tests\fsharp\Compiler\Infrastructure\AstCompiler.fs:line 37

@vzarytovskii
Copy link
Member

vzarytovskii commented Jan 23, 2021

It seems that different IL is getting generated (or decompiled representation is different):
int32
vs
valuetype [runtime]System.Int32

We may need to tweak our notmalization before we compare IL.

I'm gonna look at it.

@KevinRansom
Copy link
Member Author

@vzarytovskii it's related to the sdk version, so it's likely resolution related.

@vzarytovskii
Copy link
Member

@vzarytovskii it's related to the sdk version, so it's likely resolution related.

Yeah, that's weird, since we didn't touch this test suite for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants