Skip to content

Fix upload-result-diff and azure-login pipeline failures (#197)#218

Merged
NateD-MSFT merged 13 commits intodevelopmentfrom
copilot/resolve-upload-result-diff-azure-login-issues
Apr 23, 2026
Merged

Fix upload-result-diff and azure-login pipeline failures (#197)#218
NateD-MSFT merged 13 commits intodevelopmentfrom
copilot/resolve-upload-result-diff-azure-login-issues

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 16, 2026

Pipeline test-action work in this PR

  • Fix ApiValidator/stampinf failures under NuGet WDK
  • Harden Dvl.exe check (fail instead of skip)
  • Parallelize per-test execution inside build_create_analyze_test.py (--jobs)
  • Surface test failures so Run test script actually fails the CI step
  • Gate Azure baseline-compare steps to non-PR runs only
  • Run test-query-health and test-codeql-latest-vs-current in parallel (drop needs: dependency)
  • Wire --jobs $NUMBER_OF_PROCESSORS explicitly into both workflow Run test script steps
  • Root-cause test-codeql-latest-vs-current failures: LNK1318 from concurrent link.exe workers contending for shared mspdbsrv.exe
  • Fix the race: per-subprocess unique _MSPDBSRV_ENDPOINT_ so each link.exe spawns its own dedicated mspdbsrv.exe
  • Add [N/total] progress prefix to per-test log lines in build_create_analyze_test.py
  • Pass --threads=0 to all three codeql query compile --check-only invocations in the build job
  • Make test-pack-version-update run only when targeting main (PR base_ref == 'main' or push to refs/heads/main)
  • Add test-codeql-latest-vs-current and test-create-dvl to publish's needs: (with if: guard allowing test-pack-version-update to be success or skipped)

- Skip Azure Login, Download, Upload, and comparison steps on
  pull_request events where OIDC secrets are unavailable
- Separate the "Upload result diff" step from the "Fail if diff
  detected" step so uploads succeed independently and failures
  have clear error messages
- Apply fixes to both test-query-health and
  test-codeql-latest-vs-current jobs

Agent-Logs-Url: https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/sessions/9c85d93e-42c1-4451-81ad-2a71ece7bc2e

Co-authored-by: NateD-MSFT <34494373+NateD-MSFT@users.noreply.github.com>
Building the python command with an empty $compareFlag variable
caused PowerShell to pass an empty string as a positional arg,
producing: "unrecognized arguments: ". Switched to building an
argument array and splatting it so the flag is only included when
present.

Applied to both test-query-health and test-codeql-latest-vs-current.

Agent-Logs-Url: https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/sessions/a5ce6b58-e7aa-4b94-b731-d0242b47b40e

Co-authored-by: NateD-MSFT <34494373+NateD-MSFT@users.noreply.github.com>
Removed unnecessary build steps for CA ported queries (covered by the build-all step) and adjusted dependencies in workflow to speed up PR runs (test steps will build as part of work.)

Signed-off-by: NateD-MSFT <34494373+NateD-MSFT@users.noreply.github.com>
- Remove <Inf> items from KMDFTestTemplate.vcxproj and CppKMDFTestTemplate.vcxproj
  so the StampInf MSBuild task is not triggered (stampinf.exe is not available in
  a NuGet-only WDK environment).  These templates exist solely for CodeQL analysis,
  not for building a production driver, so INF stamping is not needed.

- Add <ApiValidatorEnabled>false</ApiValidatorEnabled> to Directory.Build.props.
  ApiValidator.exe is not included in the WDK NuGet packages and is not available
  in the CI environment.  Disabling it allows the ApplicationForDriversTestTemplate
  (WindowsApplicationForDrivers10.0 toolset) to compile successfully for CodeQL.

- Update dvl_tests.ps1 to locate Dvl.exe dynamically from the NuGet packages
  directory instead of assuming the traditional system WDK install path
  C:\Program Files (x86)\Windows Kits\10\Tools\dvl\Dvl.exe.  Falls back to the
  system path for developer machines with a full WDK install, and gracefully skips
  the dvl command-type tests when Dvl.exe is not found in either location.

- Fix typo -test_emtpy -> -test_empty in the second Test-DVL "dvl" call inside
  Test-Driver (the typo was previously unreachable because the test exited earlier
  due to the Dvl.exe failure).

Agent-Logs-Url: https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/sessions/8484509b-2924-427f-bd9a-63e365e4b404

Co-authored-by: NateD-MSFT <34494373+NateD-MSFT@users.noreply.github.com>
Copilot AI and others added 2 commits April 21, 2026 03:31
- Add src/drivers/test/Directory.Build.targets that overrides the WDK's
  ApiValidator MSBuild target with an empty target.  The WDK NuGet packages
  reference ApiValidator.exe in WindowsDriver.common.targets but do not ship
  the binary itself, so the post-build step always failed with MSB3721 for
  builds using the Universal driver target platform.  Replacing the target
  with a no-op cleanly suppresses the step; API validation is irrelevant
  for the CodeQL static analysis these tests perform.  This is the cause of
  the 6 still-failing tests (UnsafeCallInGlobalInit, MultithreadedAVCondition,
  StaticInitializer, DeviceInitApi, FloatSafeExit, FloatUnsafeExit).

- Remove the previous <ApiValidatorEnabled>false</ApiValidatorEnabled>
  workaround from Directory.Build.props -- the WDK targets do not honor that
  property name, so it had no effect.

- dvl_tests.ps1: when Dvl.exe cannot be located in either the NuGet packages
  directory or the system WDK install path, exit with a clear failure instead
  of silently skipping the dvl command-type tests.  Skipping let regressions
  go undetected.

- build_create_analyze_test.py: parallelize the test runner.  Each ql_test
  uses isolated working/<name>, TestDB/<name>, and AnalysisFiles/<name>.sarif
  paths, so multiple tests are safe to execute concurrently.  Use
  multiprocessing.pool.ThreadPool (already imported) with a worker count
  controlled by a new -j/--jobs flag, defaulting to os.cpu_count().  Pass
  --jobs 1 to fall back to the legacy sequential behaviour.  Print output
  is already protected by print_mutex; added results_mutex around the shared
  health_df / detailed_health_df DataFrame writes.  Refactored the body of
  the per-test loop into _run_single_test for use by the pool's
  imap_unordered.

Agent-Logs-Url: https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/sessions/71e6036e-2c98-4bb7-85ab-2270cbce9c68

Co-authored-by: NateD-MSFT <34494373+NateD-MSFT@users.noreply.github.com>
@NateD-MSFT NateD-MSFT marked this pull request as ready for review April 21, 2026 05:55
@NateD-MSFT NateD-MSFT changed the base branch from main to development April 22, 2026 20:39
@NateD-MSFT
Copy link
Copy Markdown
Collaborator

The test-pack-query-update failure is due to previous changes to the Recommended query set but we are intentionally not bumping version until we merge up to main.

…rsion gate, broader publish needs

Agent-Logs-Url: https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/sessions/96f4dbad-dab0-45e8-9a14-94efd2c96d27

Co-authored-by: NateD-MSFT <34494373+NateD-MSFT@users.noreply.github.com>
@NateD-MSFT NateD-MSFT merged commit d6ed965 into development Apr 23, 2026
8 checks passed
@NateD-MSFT NateD-MSFT deleted the copilot/resolve-upload-result-diff-azure-login-issues branch April 23, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants