Skip to content

Print out codesign info on failed check for equivalence - #121756

Merged
elinor-fung merged 2 commits into
dotnet:mainfrom
elinor-fung:signing-test-print-info
Nov 22, 2025
Merged

elinor-fung merged 2 commits into
dotnet:mainfrom
elinor-fung:signing-test-print-info

Conversation

@elinor-fung

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

Copy link
Copy Markdown
Member

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

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

@AaronRobinsonMSFT AaronRobinsonMSFT 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.

:shipit:

@elinor-fung
elinor-fung merged commit 2372a0b into dotnet:main Nov 22, 2025
@elinor-fung
elinor-fung deleted the signing-test-print-info branch November 22, 2025 02:50
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants