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

Test failure LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic #71315

Closed
VincentBu opened this issue Jun 27, 2022 · 3 comments · Fixed by #71342
Assignees
Labels
arch-arm64 arch-x64 arch-x86 area-System.Runtime.InteropServices blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs os-linux Linux OS (any supported distro) os-mac-os-x macOS aka OSX os-windows

Comments

@VincentBu
Copy link
Contributor

Run: runtime-libraries-coreclr outerloop 20220626.1

Failed test:

net7.0-Linux-Release-arm64-CoreCLR_release-(Ubuntu.2110.Arm64.Open)Ubuntu.1804.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-21.10-helix-arm64v8-20211116135000-0f8d97e

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-arm64-CoreCLR_release-(Ubuntu.1804.ArmArch.Open)Ubuntu.1804.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-20220427172132-97d8652

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-arm64-CoreCLR_release-(Alpine.313.Arm64.Open)ubuntu.1804.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-helix-arm64v8-20210910135808-8a6f4f3

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-arm64-CoreCLR_release-(Alpine.314.Arm64.Open)ubuntu.1804.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-arm64v8-20210910135810-8a6f4f3

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Debian.11.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64-20210304164428-5a7c380

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Centos.8.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-SLES.15.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Fedora.34.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20220523142223-4f64125

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Ubuntu.2110.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-21.04-helix-amd64-20210922170909-34a2d72

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Mariner.1.0.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(openSUSE.15.2.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64-20211018152525-9cc02fe

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Centos.7.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-helix-20220601183719-dde38af

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-RedHat.7.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-20210304164434-56c6673

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-Ubuntu.1804.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x64-CoreCLR_release-Windows.Amd64.Server2022.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x64-CoreCLR_release-Windows.81.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x64-CoreCLR_release-(Windows.10.Amd64.ServerRS5.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2019-helix-amd64-20220502135740-56c6673

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x64-CoreCLR_release-Windows.11.Amd64.Client.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x86-CoreCLR_release-Windows.10.Amd64.Server2022.ES.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net48-windows-Release-x86-Windows.10.Amd64.Client21H1.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Alpine.314.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Alpine.313.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-helix-amd64-20210910135845-8a6f4f3

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-OSX-Release-arm64-CoreCLR_release-OSX.1200.ARM64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-OSX-Release-x64-CoreCLR_release-OSX.1200.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

Error message:

Expected 2 diagnostics, but encountered 1. Actual diagnostics:
(6,32): error SYSLIB1053: 'LibraryImportAttribute.StringMarshalling=StringMarshalling.Utf8' has no equivalent in 'DllImportAtttribute' and will not be forwarded
Expected: True
Actual:   False


Stack trace
   at LibraryImportGenerator.UnitTests.Diagnostics.VerifyDiagnostics(DiagnosticResult[] expectedDiagnostics, Diagnostic[] actualDiagnostics) in /_/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/Diagnostics.cs:line 535
   at LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic() in /_/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/Diagnostics.cs:line 332
--- End of stack trace from previous location ---
@VincentBu VincentBu added arch-arm64 arch-x86 os-linux Linux OS (any supported distro) os-mac-os-x macOS aka OSX os-windows arch-x64 blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs labels Jun 27, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 27, 2022
@ghost
Copy link

ghost commented Jun 27, 2022

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

Run: runtime-libraries-coreclr outerloop 20220626.1

Failed test:

net7.0-Linux-Release-arm64-CoreCLR_release-(Ubuntu.2110.Arm64.Open)Ubuntu.1804.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-21.10-helix-arm64v8-20211116135000-0f8d97e

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-arm64-CoreCLR_release-(Ubuntu.1804.ArmArch.Open)Ubuntu.1804.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-20220427172132-97d8652

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-arm64-CoreCLR_release-(Alpine.313.Arm64.Open)ubuntu.1804.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-helix-arm64v8-20210910135808-8a6f4f3

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-arm64-CoreCLR_release-(Alpine.314.Arm64.Open)ubuntu.1804.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-arm64v8-20210910135810-8a6f4f3

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Debian.11.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64-20210304164428-5a7c380

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Centos.8.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-SLES.15.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Fedora.34.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20220523142223-4f64125

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Ubuntu.2110.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-21.04-helix-amd64-20210922170909-34a2d72

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Mariner.1.0.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(openSUSE.15.2.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64-20211018152525-9cc02fe

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Centos.7.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-helix-20220601183719-dde38af

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-RedHat.7.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-20210304164434-56c6673

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-Ubuntu.1804.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x64-CoreCLR_release-Windows.Amd64.Server2022.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x64-CoreCLR_release-Windows.81.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x64-CoreCLR_release-(Windows.10.Amd64.ServerRS5.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2019-helix-amd64-20220502135740-56c6673

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x64-CoreCLR_release-Windows.11.Amd64.Client.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-windows-Release-x86-CoreCLR_release-Windows.10.Amd64.Server2022.ES.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net48-windows-Release-x86-Windows.10.Amd64.Client21H1.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Alpine.314.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-Linux-Release-x64-CoreCLR_release-(Alpine.313.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-helix-amd64-20210910135845-8a6f4f3

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-OSX-Release-arm64-CoreCLR_release-OSX.1200.ARM64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

net7.0-OSX-Release-x64-CoreCLR_release-OSX.1200.Amd64.Open

- LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic

Error message:

Expected 2 diagnostics, but encountered 1. Actual diagnostics:
(6,32): error SYSLIB1053: 'LibraryImportAttribute.StringMarshalling=StringMarshalling.Utf8' has no equivalent in 'DllImportAtttribute' and will not be forwarded
Expected: True
Actual:   False


Stack trace
   at LibraryImportGenerator.UnitTests.Diagnostics.VerifyDiagnostics(DiagnosticResult[] expectedDiagnostics, Diagnostic[] actualDiagnostics) in /_/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/Diagnostics.cs:line 535
   at LibraryImportGenerator.UnitTests.Diagnostics.StringMarshallingForwardingNotSupported_ReportsDiagnostic() in /_/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/Diagnostics.cs:line 332
--- End of stack trace from previous location ---
Author: VincentBu
Assignees: -
Labels:

arch-arm64, arch-x86, area-System.Runtime.InteropServices, os-linux, os-mac-os-x, os-windows, arch-x64, untriaged, blocking-outerloop

Milestone: -

@AaronRobinsonMSFT
Copy link
Member

/cc @jkoritzinsky @elinor-fung Are we missing something here?

@jkoritzinsky
Copy link
Member

I'll take a look. This is likely due to the change I made to the char marshallers.

@jkoritzinsky jkoritzinsky self-assigned this Jun 27, 2022
jkoritzinsky added a commit to jkoritzinsky/runtime that referenced this issue Jun 27, 2022
…evel platforms

Separate out the "no marshalling info" error factory from the "unsupported" marshalling factory so we still get the same diagnostics on downlevel platforms where we use the forwarder as our fallback.

Fixes dotnet#71315
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 27, 2022
@ghost ghost removed untriaged New issue has not been triaged by the area owner in-pr There is an active PR which will close this issue when it is merged labels Jun 27, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 arch-x64 arch-x86 area-System.Runtime.InteropServices blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs os-linux Linux OS (any supported distro) os-mac-os-x macOS aka OSX os-windows
Projects
None yet
3 participants