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

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

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

elinor-fung
Copy link
Member

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

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

@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
71 checks passed
@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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants