fix: update macrotest outputs for nightly rust#501
Merged
wmmc88 merged 3 commits intomicrosoft:mainfrom Sep 11, 2025
Merged
Conversation
wmmc88
commented
Sep 9, 2025
wmmc88
commented
Sep 9, 2025
tests/wdk-macros-tests/tests/outputs/nightly/macrotest/bug_tuple_struct_shadowing.expanded.rs
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the CI workflow to use nightly Rust and refactors macro test output files to improve error handling patterns. The changes are driven by updates to the nightly Rust compiler which changed how macro expansion generates assertion code.
Key changes:
- Updates CI workflow to install
cargo-makeand run additional top-level tests - Refactors assertion logic in multiple macro test output files from negated
ifstatements tomatchexpressions for clearer error handling - Fixes a symlink creation function to handle edge cases more robustly
Reviewed Changes
Copilot reviewed 11 out of 16 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/test.yaml |
Adds cargo-make installation and new test job for top-level tests |
tests/wdk-macros-tests/src/lib.rs |
Improves symlink creation logic and fixes formatting |
tests/mixed-package-kmdf-workspace/crates/driver/Cargo.toml |
Disables tests due to GitHub runner issues |
Multiple macrotest/*.expanded.rs files |
Updates generated macro expansion outputs to use match instead of negated if for assertions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
gurry
approved these changes
Sep 10, 2025
svasista-ms
approved these changes
Sep 11, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request updates the CI workflow and refactors several test output files to improve code clarity and test execution. The workflow now installs
cargo-makeand runs additional tests using it. In the test output files, the assertion logic for checking buffer size calculations is refactored to use a more idiomaticmatchstatement for error handling.CI Workflow Improvements
.github/workflows/test.yaml: Adds a step to installcargo-makeand introduces a new job to run top-level tests viacargo-make, in addition to the existing workspace tests.Test Output Refactoring
macrotest/bug_tuple_struct_shadowing.expanded.rs,macrotest/bug_unused_imports.expanded.rs,macrotest/wdf_device_create.expanded.rs,macrotest/wdf_device_create_device_interface.expanded.rs,macrotest/wdf_driver_create.expanded.rs,macrotest/wdf_request_retrieve_output_buffer.expanded.rs,macrotest/wdf_spin_lock_acquire.expanded.rs,macrotest/wdf_verifier_dbg_break_point.expanded.rs): Refactor the assertion for buffer size calculation from a negatedifstatement to amatchstatement for clearer error handling. [1] [2] [3] [4] [5] [6] [7] [8]