-
Notifications
You must be signed in to change notification settings - Fork 129
fix(cargo-wdk): update WDK build number range to skip InfVerif when building sample class drivers
#679
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
Open
svasista-ms
wants to merge
9
commits into
microsoft:main
Choose a base branch
from
svasista-ms:fix/infverif-sample-flag-range
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+143
−50
Open
fix(cargo-wdk): update WDK build number range to skip InfVerif when building sample class drivers
#679
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9a87d36
fix: update WDK build number range and add test for missing sample fl…
svasista-ms 59e0e34
fix: correct typo in comments regarding `/samples` flag in InfVerif
svasista-ms 65f804d
fix: update InfVerif samples flag
svasista-ms cd65e66
fix: improve InfVerif tests for samples flag handling
svasista-ms 6bfa32a
fix: remove comments regarding InfVerif and /samples flag in tests
svasista-ms daece66
Merge branch 'main' into fix/infverif-sample-flag-range
svasista-ms 3521ff2
Merge branch 'microsoft:main' into fix/infverif-sample-flag-range
svasista-ms b68cac2
fix: update infverif sample flag handling and adjust test expectations
svasista-ms 32bd21d
fix: refine infverif flag handling based on WDK build number range an…
svasista-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ | |
| use std::{ | ||
| ffi::{CStr, CString}, | ||
| marker::PhantomData, | ||
| ops::RangeFrom, | ||
| ops::RangeInclusive, | ||
| path::{Path, PathBuf}, | ||
| result::Result, | ||
| }; | ||
|
|
@@ -43,9 +43,9 @@ pub enum SignMode { | |
| }, | ||
| } | ||
|
|
||
| // FIXME: This range is inclusive of 25798. Update with range end after /sample | ||
| // flag is added to InfVerif CLI | ||
| const MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE: RangeFrom<u32> = 25798..; | ||
| // InfVerif in WDK builds in this range is bugged and does not contain the | ||
| // /samples flag. | ||
| const MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE: RangeInclusive<u32> = 25798..=26100; | ||
| const WDR_TEST_CERT_STORE: &str = "WDRTestCertStore"; | ||
| const WDR_LOCAL_TEST_CERT: &str = "WDRLocalTestCert"; | ||
| const STAMPINF_VERSION_ENV_VAR: &str = "STAMPINF_VERSION"; | ||
|
|
@@ -544,15 +544,19 @@ impl<'a> PackageTask<'a> { | |
| fn run_infverif(&self) -> Result<(), PackageTaskError> { | ||
| let additional_args = if self.sample_class { | ||
| let wdk_build_number = self.wdk_build.detect_wdk_build_number()?; | ||
| if MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.contains(&wdk_build_number) { | ||
| debug!( | ||
| "InfVerif in WDK Build {wdk_build_number} is bugged and does not contain the \ | ||
| /samples flag." | ||
| ); | ||
| warn!("InfVerif skipped for samples class. WDK Build: {wdk_build_number}"); | ||
| return Ok(()); | ||
| match wdk_build_number { | ||
| n if MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.contains(&n) => { | ||
| debug!( | ||
| "InfVerif in WDK Build {wdk_build_number} is bugged and does not contain \ | ||
| the /samples flag." | ||
|
Comment on lines
+550
to
+551
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be "buggy" instead of "bugged"? Or does "bugged" have some other mearning in this specific context? If you change this to "buggy" also make the same change in the comment above. |
||
| ); | ||
| warn!("InfVerif skipped for samples class. WDK Build: {wdk_build_number}"); | ||
| return Ok(()); | ||
| } | ||
| // Use the `/samples` flag after the range and the `/msft` flag before the range | ||
| n if n > *MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.end() => "/samples", | ||
| _ => "/msft", | ||
| } | ||
| "/msft" | ||
| } else { | ||
| "" | ||
| }; | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.