-
Notifications
You must be signed in to change notification settings - Fork 67
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
fix: skip infverif task for sample drivers built with certain GE WDK versions #143
Conversation
…dows-drivers-rs into vnext-wdk-support
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.
Hey @NateD-MSFT! Thanks for the PR.
I like the change overall, but was wondering if we could isolate the sample-specific behavior outside of the core wdk-crates. This way we can avoid polluting windows-drivers-rs
with extra environment that is not relevant to the wdk or to building rust drivers.
My suggestion:
- keep the logic to detect, validate, and expose the WDK version inside of
wdk-build
andrust-driver-makefile.toml
- move the sample-specific infverif version mitigation logic to a script block in
sample-kmdf-driver/Makefile.toml
(and the same makefiles in the samples repo). It can be refactored to updateWDK_BUILD_ADDITIONAL_INFVERIF_FLAGS
by printing to stdout and using therust-env-update
plugin I wrote.
On 2nd thought, given that this is to work around issues in production WDKs and will be needed in all msft samples, I think we can keep a public function in |
I did one more quick refactor to clean things up, go ahead and review when you have time. |
Committing and signing off to see if the cloud build works where my local environment doesn't. Co-authored-by: Melvin Wang <melvin.mc.wang@gmail.com> Signed-off-by: NateD-MSFT <34494373+NateD-MSFT@users.noreply.github.com>
…dows-drivers-rs into vnext-wdk-support
I thought this needed to be made pub when I was testing, but I think it was a side effect of how I was testing my script while blocked on the cargo make bug. So this shouldn't need to be pub specifically.
…dows-drivers-rs into vnext-wdk-support
Created here: microsoft/Windows-rust-driver-samples#18 |
We expect that drivers built for Windows pass InfVerif. However, the driver samples provided by Microsoft generally have settings that do not pass the default InfVerif ruleset.
In the current (E)WDK, this can be alleviated by setting /msft when calling InfVerif.exe, but in the upcoming release's WDK this syntax is no longer available. While we wait for the InfVerif team to enable a new "/samples" flag for us, this change updates the cargo make logic to:
Note that with this change, samples should extend the makefile with
When testing on one machine, I did see an issue where a ; was incorrectly appended to the /msft flag. I haven't been able to repro this on other machines yet.