Skip to content

Conversation

@elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Nov 18, 2025

Print the output of codesign --display --verbose=6 for the two files when assert for equivalence fails.

@elinor-fung elinor-fung added test-enhancement Improvements of test source code area-HostModel Microsoft.NET.HostModel issues labels Nov 18, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke
See info in area-owners.md if you want to be subscribed.

Copilot finished reviewing on behalf of elinor-fung November 18, 2025 22:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves test diagnostics by capturing and displaying codesign information when signature equivalence checks fail. When AssertMachFilesAreEquivalent throws an assertion failure, the test now outputs detailed codesign information for both the codesign-generated and managed-signed files to help debug mismatches.

Key Changes

  • Added ITestOutputHelper to the test class constructor to enable test output logging
  • Wrapped the equivalence assertion in a try-catch block that captures and logs verbose codesign information on failure

Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Choose a reason for hiding this comment

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

:shipit:

@elinor-fung elinor-fung merged commit 2372a0b into dotnet:main Nov 22, 2025
78 checks passed
@elinor-fung elinor-fung deleted the signing-test-print-info branch November 22, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-HostModel Microsoft.NET.HostModel issues test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants