Skip to content

Fix image leaks in the tests causing failures in "WslcSdkTests::ImageProgressCallback"#40888

Merged
OneBlue merged 3 commits into
masterfrom
user/oneblue/fix-leaks
Jun 24, 2026
Merged

Fix image leaks in the tests causing failures in "WslcSdkTests::ImageProgressCallback"#40888
OneBlue merged 3 commits into
masterfrom
user/oneblue/fix-leaks

Conversation

@OneBlue

@OneBlue OneBlue commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary of the Pull Request

This change solves various image layer leaks in the tests that cause the WslcSdkTests::ImageProgressCallback to fail if ran from a storage of a previous test session.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Copilot AI review requested due to automatic review settings June 24, 2026 00:37
@OneBlue OneBlue requested a review from a team as a code owner June 24, 2026 00:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Windows WSLC SDK test suites to proactively delete registry-pulled images at test scope-exit, preventing leftover image layers from prior runs from contaminating subsequent runs (notably scenarios that exercise image pull progress callbacks).

Changes:

  • Add scope-exit cleanup in WinRT-based image pull/auth tests to delete the test image via m_defaultSession.DeleteImage(...) (errors swallowed).
  • Add scope-exit cleanup in C-API based image pull/auth tests to delete the test image via WslcDeleteSessionImage(...) (failures logged).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/windows/WslcSdkWinRTTests.cpp Adds SCOPE_CLEANUP image deletion to avoid leaked images between WinRT test runs.
test/windows/WslcSdkTests.cpp Adds wil::scope_exit_log image deletion to avoid leaked images between C-API test runs.

@OneBlue OneBlue merged commit 9361ff0 into master Jun 24, 2026
12 checks passed
@OneBlue OneBlue deleted the user/oneblue/fix-leaks branch June 24, 2026 19:20
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.

4 participants