-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Kernel mode test harness #1421
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
Kernel mode test harness #1421
Conversation
Fix tpyos
We correctly deprecated `atomic_init` when implementing P0883R2, but missed that the effects changed as well.
Handle calling convention differences
Always compile kernel tests, but only run on x64
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Manually resolved: azure-devops/run-build.yml
StephanTLavavej
left a comment
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.
Quick partial review.
| } \ | ||
| } | ||
|
|
||
| #else |
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.
| #else | |
| #else // _KERNEL_MODE |
| abort(); | ||
| } | ||
| } | ||
| #endif |
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.
| #endif | |
| #endif // _KERNEL_MODE |
| @@ -0,0 +1,26 @@ | |||
| param([string]$out="MsvcStlTestingCert.pfx",[string]$pass="foo") | |||
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.
New file needs a copyright/license banner.
| Where-Object { $_.Subject -eq 'CN=MsvcStlTestingCert' } | | ||
| Remove-Item | ||
|
|
||
| #Make the new cert |
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.
| #Make the new cert | |
| # Make the new cert |
| @@ -0,0 +1,26 @@ | |||
| param([string]$out="MsvcStlTestingCert.pfx",[string]$pass="foo") | |||
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.
We conventionally avoid "foo" as a placeholder. Can we use something else here?
| typedef struct TestResults { | ||
| int main_return; | ||
| long tests_failed; | ||
| char output[4088]; |
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.
Is this number magical or arbitrary?
| struct DeviceOpener { | ||
| HANDLE h = INVALID_HANDLE_VALUE; | ||
| explicit DeviceOpener(const char* driverName) { | ||
| std::string dosName = "\\\\.\\"; |
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.
Raw string literals would make this easier to read.
| char InputBuffer[1]; | ||
| TestResults OutputBuffer; | ||
|
|
||
| auto success = DeviceIoControl(dev.h, (DWORD) IOCTL_SIOCTL_METHOD_RUN_TEST, &InputBuffer, sizeof(InputBuffer), |
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.
We conventionally avoid C-style casts.
| parallelismFlag: '-j$(testParallelism)' | ||
| xmlOutputFlag: '--xunit-xml-output=$(${{ parameters.buildOutputLocationVar }})/test-results.xml' | ||
| shardFlags: '--num-shards=$(System.TotalJobsInPhase);--run-shard=$(System.JobPositionInPhase)' | ||
| shardFlags: '-vv;--num-shards=$(System.TotalJobsInPhase);--run-shard=$(System.JobPositionInPhase)' |
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.
Is -vv necessary/useful, or is it a relic of development?
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 think this one is useful. Without this, CI failures tell you which tests failed, but give very little output from the failing test. But it's hard for me to verify that since this is in the CI machinery.
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'd say this is useful since upstream broke our ability to write nice output to the xml test results.
| -DCMAKE_BUILD_TYPE=Release ^ | ||
| -DLIT_FLAGS=$(litFlags) ^ | ||
| -DCMAKE_CXX_FLAGS=/analyze:autolog- ^ | ||
| -DCMAKE_CXX_FLAGS="/showIncludes /analyze:autolog-" ^ |
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.
Is /showIncludes a relic of development? I am concerned about the amount of log spam it could generate.
StephanTLavavej
left a comment
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.
This has a merge conflict with main now - can you resolve it?
|
I haven't forgotten about this... it's just that the machine that I'd been using to work on this died, and with the chip shortage, I've been having a hard time getting a replacement. I do plan on applying all the changes that have been suggested. |
| }; | ||
|
|
||
| inline constexpr _Drop_fn drop; | ||
|
|
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.
Looks like some ranges changes snuck in by accident?
|
Superseded by #2040 |
Merge after #1394