Skip to content

Comments

WSLC SDK Initial Tests#14232

Open
JohnMcPMS wants to merge 7 commits intomicrosoft:feature/wsl-for-appsfrom
JohnMcPMS:sdk-tests
Open

WSLC SDK Initial Tests#14232
JohnMcPMS wants to merge 7 commits intomicrosoft:feature/wsl-for-appsfrom
JohnMcPMS:sdk-tests

Conversation

@JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Feb 19, 2026

Summary of the Pull Request

Tests for initial WLSC SDK implementation and placeholders for not-yet-implemented APIs.

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

Adds tests for the implemented portions of the WSLC SDK and placeholders that expect E_NOTIMPL results from the unimplemented functions. Based on the WSLA tests as the SDK is a wrapper layer for it.

Validation Steps Performed

Ran these tests.

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner February 19, 2026 01:45
Copilot AI review requested due to automatic review settings February 19, 2026 01:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds initial test coverage for the WSLC SDK (Windows Subsystem for Linux Container SDK), providing both functional tests for implemented APIs and placeholder tests for not-yet-implemented functionality. The tests follow patterns established in the existing WSLATests.cpp and provide comprehensive coverage of session management, image operations, container lifecycle, and process I/O handling.

Changes:

  • Added WslcSdkTests.cpp with test coverage for WSLC SDK session, image, container, and process APIs
  • Added placeholder tests expecting E_NOTIMPL for APIs not yet implemented
  • Updated CMakeLists.txt to include the new test file and link against the wslcsdk library

Reviewed changes

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

File Description
test/windows/WslcSdkTests.cpp New test file with 30+ test methods covering WSLC SDK functionality including session creation/termination, image pulling, container lifecycle, process I/O handling, and placeholder tests for unimplemented APIs
test/windows/CMakeLists.txt Added WslcSdkTests.cpp to SOURCES, included WslcSDK headers, linked wslcsdk library, and added wslcsdk to dependencies

Copy link
Collaborator

@OneBlue OneBlue left a comment

Choose a reason for hiding this comment

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

LGTM, minor comments

{
if (session)
{
WslcSessionTerminate(session);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I recommend validating the return value of these (even in the RAII helpers) since we're validating the SDK behavior here

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not seeing a VERIFY_SUCCEEDED_LOG type macro in TAEF. I doubt that we want to terminate the process if these are happening during an exception in the test. We could try/catch it, but would that actually cause the test to fail due to error logging?

In addition, these are attempting to do maximum cleanup for idempotency reasons. Tests can and should call these cleanup functions and verify the output as part of running the main test body.

Do you want it to be a requirement that the runtime always returns a success on repeat calls to these cleanup functions?

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.

2 participants