Skip to content

LogicalName added for EmbeddedResource#99999

Merged
jkotas merged 4 commits into
dotnet:mainfrom
rzsc:fix/issue_412
Mar 23, 2024
Merged

LogicalName added for EmbeddedResource#99999
jkotas merged 4 commits into
dotnet:mainfrom
rzsc:fix/issue_412

Conversation

@rzsc

@rzsc rzsc commented Mar 20, 2024

Copy link
Copy Markdown
Contributor

The test is trying to get a manifest named "test22888resources.test22888.resources" but according to the rule from https://learn.microsoft.com/en-us/dotnet/core/resources/manifest-file-names:

"If the resource file is colocated with a source file (.cs or .vb) of the same root file name, the full name of the first type that's defined in the source file is used for the manifest file name."

The resource file "test22888.resx" colocated with a C# source file "test22888.cs" so the manifest gets name after the first type defined in the C# source file (TestAssemblyLoadContext.resources).

Here is the next paragraph from the aforementioned web page:

"If a resource file is explicitly included in the project file as an EmbeddedResource item with LogicalName metadata, the LogicalName value is used as the manifest name. LogicalName takes precedence over any other metadata or setting."

To solve the problem LogicalName="test22888resources.test22888.resources" attribute has been added to EmbeddedResource item in "test22888resources.csproj" project file to make the manifest name to be as the test expects it.

The test has been removed from the tests exclusion file "./src/tests/issues.targets".

Part of #84834, cc @dotnet/samsung

Fixes #13703

@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Mar 20, 2024
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Mar 20, 2024
@jkotas

jkotas commented Mar 20, 2024

Copy link
Copy Markdown
Member

Test introduced by dotnet/coreclr#22925

@jkotas jkotas added area-AssemblyLoader-coreclr only use for closed issues and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Mar 20, 2024
@clamp03

clamp03 commented Mar 20, 2024

Copy link
Copy Markdown
Member

Related Issue: #13703

@jkotas

jkotas commented Mar 20, 2024

Copy link
Copy Markdown
Member

The re-enabled test is failing on Mono:

/tmp/helix/working/A93108F6/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true test22888.dll ''
Failed to unload the test assembly
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101
   at Xunit.Assert.Equal[Int32](Int32 expected, Int32 actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 168
   at Xunit.Assert.Equal[Int32](Int32 expected, Int32 actual) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 90
   at __GeneratedMainWrapper.Main()

Mono does not support collectible assemblies that this test is exercising. Could you please keep the test disabled on Mono against #34072 ? (Look for this issue number in issues.targets to find the right place where it should be disabled.

@rzsc

rzsc commented Mar 20, 2024

Copy link
Copy Markdown
Contributor Author

Mono does not support collectible assemblies that this test is exercising. Could you please keep the test disabled on Mono against #34072 ? (Look for this issue number in issues.targets to find the right place where it should be disabled.

Understood. I'm on it. Thanks!

Mono does not support collectible assemblies that this test is exercising.
@jkotas

jkotas commented Mar 21, 2024

Copy link
Copy Markdown
Member

Is this ready for review?

@rzsc rzsc marked this pull request as ready for review March 21, 2024 08:04
@clamp03

clamp03 commented Mar 21, 2024

Copy link
Copy Markdown
Member

Is this ready for review?

@jkotas I think it is ready for review. Could you review it? Thank you.

@rzsc

rzsc commented Mar 21, 2024

Copy link
Copy Markdown
Contributor Author

Is this ready for review?

@jkotas sorry for delayed reply. The PR is ready for review. Thanks!

@jkotas

jkotas commented Mar 22, 2024

Copy link
Copy Markdown
Member

/azp run runtime-nativeaot-outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rzsc

rzsc commented Mar 22, 2024

Copy link
Copy Markdown
Contributor Author

@jkotas, I can see that some checks were not successful...
Are these failures related to my changes?
I cannot deduce it from error messages...
I can see some warnings related to the test22888, the one I have modified and enabled. Shall I fix these warnings?
Thank you for all your help!

@jkotas

jkotas commented Mar 22, 2024

Copy link
Copy Markdown
Member

/azp run runtime-nativeaot-outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit 7dae296 into dotnet:main Mar 23, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-AssemblyLoader-coreclr only use for closed issues community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failed: Regressions/coreclr/GitHub_22888/test22888

6 participants