-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Kernel mode test harness #2040
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 #2040
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
Manually resolved: azure-devops/run-build.yml
|
The tests are failing with: |
|
Marking as |
|
We're going to close this PR for now - although we remain interested in supporting and testing kernel mode, we haven't found a way to get this working in the CI system. A possible way to make progress here would be to set up a fork of this repo with an Azure Pipelines Virtual Machine Scale Set, using very small/cheap VMs (not the 32-core monsters used by the official repo), and then iterating with that VMSS until the proper incantations to enable kernel mode testing with ultra-admin-etc. permissions are found. If and when a path forward is discovered, a new PR can be opened. |
This adds the capability to test the STL in the Windows kernel. The expectation is that the Windows kernel will support most of the freestanding facilities, with the likely exception of those involving RTTI and exceptions.
On the cmake side of things, I add a new executable that will do the necessary Windows things to load a kernel driver and run the unit test. I also create a static lib with shared per-test code. This includes a custom assert implementation that won't crash the system, but will instead continue executing and report the results up though the executable. This is basically downgrading the "assert" to an "expect". In practice, this hasn't caused me any problems so far.
The certificate used for driver signing is generated at test time, and is self signed. The certificate has a password that is generated during test time, and then forgotten when the test is done running. The certificate also has a very quick expiration date (2 days). All of these together should make the certificate both difficult to attack, and not worth attacking, as it will (at most) give you access to one CI VM for 2 days.
This supersedes #1421 (which superseded #1385)