-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Stabilize the event handler leaking test and make Start-PSBuild -SMAOnly literally just rebuild S.M.A.dll
#10790
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
Conversation
| } | ||
| finally | ||
| { | ||
| AmsiUtils.Uninitialize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Uninitialize calls CloseSession internally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this explanation and why we combine the tests to the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the explanation is needed here. It's more confusing as you won't see the original test cases anymore.
|
I believe xUnit runs tests in random order and it looks like the previous implementation depended on some ordering, so this might be the fix |
Start-PSBuild -SMAOnly literally just rebuild S.M.A.dllStart-PSBuild -SMAOnly literally just rebuild S.M.A.dll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With one minor comment.
|
I will merge this PR to unblock CI failures. |
|
🎉 Handy links: |
PR Summary
The event handler test is failing intermittently in our daily test run:
https://powershell.visualstudio.com/PowerShell/_build/results?buildId=35039
The cause of it is likely the
SecuritySupportTests, where the registration/unregistration of the event handler are separately in two tests.I merge those 3 tests into one and will see if that resolves the intermittent failure.
Also slightly update
Start-PSBuildto make-SMAOnlyliterally only re-build and re-deploy S.M.A.dll, without doing extra post-build tasks.The main purpose of this change is to avoid spinning up the
pwshfor retrieving experimental features, so that we can add code in S.M.A.dll to wait for debugger to attach for debugging scenarios. /cc @rjmholtPR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.