Skip to content

Make host tests enable test-only behaviour for nethost before first use - #107170

Merged
elinor-fung merged 2 commits into
dotnet:mainfrom
elinor-fung:fix61131
Aug 30, 2024
Merged

elinor-fung merged 2 commits into
dotnet:mainfrom
elinor-fung:fix61131

Conversation

@elinor-fung

@elinor-fung elinor-fung commented Aug 30, 2024 •

Copy link
Copy Markdown
Member

On macOS with system integrity protection enabled, if a code-signed binary is loaded in a process, modified, and loaded again in another process, the second run will crash with Code Signature Invalid).

Enabling test-only behaviour modifies the binary (re-writes a placeholder value). The nethost tests were enabling/disabling test-only behaviour for the same nethost binary used by all the tests. This change updates the tests to just always enable it before any use of the binary.

Fixes #61131

cc @dotnet/appmodel @AaronRobinsonMSFT

@ghost ghost added the area-Host label Aug 30, 2024
@elinor-fung elinor-fung changed the title Make host tests enable test-only behaviour for nethost first use Make host tests enable test-only behaviour for nethost before first use Aug 30, 2024
@elinor-fung
elinor-fung marked this pull request as ready for review August 30, 2024 17:12
@elinor-fung
elinor-fung merged commit 48ab86a into dotnet:main Aug 30, 2024
@elinor-fung
elinor-fung deleted the fix61131 branch August 30, 2024 19:21
jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
…se (dotnet#107170)

On macOS with system integrity protection enabled, if a code-signed binary is loaded in a process, modified, and loaded again in another process, the second run will crash with Code Signature Invalid).

Enabling test-only behaviour modifies the binary (re-writes a placeholder value). The nethost tests were enabling/disabling test-only behaviour for the same nethost binary used by all the tests. This change updates the tests to just always enable it before any use of the binary.
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Installer test infrastructure around the install_location config file on macOS crashes test process with RC2 SDK

2 participants