Commit Graph

30 Commits

Author SHA1 Message Date
Blue
9fa3ea9e15 Format 2026-04-09 18:32:01 -07:00
Blue
24c9271475 Apply PR suggestions 2026-04-09 18:31:26 -07:00
Blue
d8b957d320 Add wslc.exe test coverage 2026-04-09 18:16:46 -07:00
Blue
acc6aeb0c8 Improve container state errors 2026-04-09 17:11:34 -07:00
Blue
e950342547 Add support for mounting files and non-existing folders as volumes (#40137)
* Save state

* Prepare for PR

* Apply PR feedback

* Add test coverage for restored containers

* Merge
2026-04-09 16:00:52 -07:00
Ben Hillis
9c4dba919f Refactor tests: use TAEF metadata for WSL version filtering (#40129)
Replace runtime WSL2_TEST_ONLY()/WSL1_TEST_ONLY() skip macros with
TAEF metadata-based test selection. Tests that don't apply to the
current WSL version are now excluded by /select: queries at selection
time rather than skipped at runtime, eliminating hundreds of 'skipped'
results from test output.

Changes:
- Add WSL2_TEST_METHOD, WSL1_TEST_METHOD, WSLC_TEST_METHOD macros
  in Common.h that tag tests with WSLVersion metadata property
- Convert ~430 test methods across 26 files to use new macros
- Update run-tests.ps1 to auto-add /select: version filter
- Update CloudTest XML configs with version selection queries
- Remove WSL2_TEST_ONLY() from composite macros in NetworkTests.cpp
- Update test README with new macro documentation

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-08 17:45:18 -07:00
Ben Hillis
c223800f46 wslc: implement dns tunneling for virtio proxy networking mode (#40104)
* wslc: implement dns tunneling for virtio proxy networking mode

This change implements dnstunneling for the virtio proxy networking mode. For now, this implementation uses the same socket-based approach, but in the fututure this will be moved over to the built-in dns support that is part of the wsldevicehost dll.

* wslc: enable DNS tunneling by default for virtio proxy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove unused DNS test helpers

VerifyDnsResolutionDig and VerifyDnsResolutionRecordTypes are dead
code — VerifyDnsQueries is the superset that covers all record types
and TCP/UDP modes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-07 01:40:04 +00:00
Blue
3f7cb6bc7a Add logic to reject invalid flags (#40100)
* Add logic to reject invalid flags

* Simplify tests

* Use macros

* Format

* Format
2026-04-06 18:36:17 -07:00
Blue
c4d7711d19 Correctly handle empty arguments & entrypoint when launching containers (#40122)
* Correctly handle empty arguments & entrypoint when launching containers

* Apply PR feedback
2026-04-06 17:44:48 -07:00
Blue
9d39805c4d Implement wslc session enter (#40088)
* Save state

* Save state

* Save state

* Cleanup

* Prepare for PR

* Cleanup

* Validate flags

* Apply PR suggestions

* Add comment

* Remove include

* Cleanup diff

* Format

* Format

* Restore session flags
2026-04-06 11:51:09 -07:00
Blue
e146f6b027 Add logic to clean up images created during the tests (#40078)
* Save state

* Format

* Log failures

* Format
2026-04-03 18:40:37 -07:00
beena352
3cf4cfae27 Allow small timestamp difference in ContainerRecoveryFromStorage test (#40081)
* Allow small timestamp difference in ContainerRecoveryFromStorage test

* feedback
2026-04-02 20:50:08 -07:00
Blue
da5efafd45 Don't fail to start a WSLCSession if anonymous volumes are present (#40077)
* Don't fail to start a WSLCSession if anonymous volumes are present

* Typo

* Cleanup diff

* Cleanup diff
2026-04-02 12:24:48 -07:00
Blue
0c9f76c3a8 Fix race condition in ElevatedTokenCanOpenNonElevatedHandles test case (#40071) 2026-04-01 18:15:07 -07:00
beena352
dee42d80cb Add port mappings to container list output (#14438) 2026-04-01 16:34:13 -07:00
Blue
1cab9b06b8 Switch DmesgOutput to a WSLCHandle (#40063) 2026-04-01 13:51:09 -07:00
Kevin Vega
148545eae7 List and inspect named volumes (#14555) 2026-04-01 12:10:20 -07:00
Blue
c98558e9cc Use COM marshalling to exchange handles (#40056)
* Prototype

* Save state

* Save state

* Save state

* Save state

* Save state

* Save state

* Remove zeroing

* Apply PR feedback

* Add test coverage

* Format

* Add test coverage for null handles
2026-04-01 09:28:28 +00:00
John Stephens
713fcda944 Add support for build logs (#40054) 2026-03-31 20:38:29 -07:00
Blue
40e57130df Fix race condition in ContainerLogs test case (#40052) 2026-03-31 17:57:51 -07:00
Blue
37a5a99d9d Implement WSLAContainer::Kill() (#14560)
* Implement WSLAContainer::Kill()

* Add test coverage

* Format

* Apply PR feedback
2026-03-31 12:06:55 -07:00
Blue
832b0f7b50 Update wslc build to look for Containerfile and Dockerfile (#40045)
* Save state

* Add test coverage

* Rename method

* Require input handle in the service

* Apply PR feedback

* Format

* Apply PR feedback + update tests

* Format
2026-03-31 11:40:11 -07:00
John Stephens
dc7ec8f442 Add cancellation to image build (#14453) 2026-03-30 18:27:24 -07:00
Ben Hillis
68055596ee Reject port mappings exceeding 63-port limit in relay (#40035)
WaitForMultipleObjects has a 64-handle limit. The accept thread uses
1 handle for the exit event, leaving room for 63 port mappings.

Reject new port mappings with ERROR_TOO_MANY_OPEN_FILES when the limit
is reached, rather than crashing the relay thread. Existing mappings
continue to work.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-30 13:00:35 -07:00
Kevin Vega
cc5f358e05 Allow retrieving state and init process info after container auto remove (#14429)
Allow clients to continue reading stdout/stderr and querying state from containers after they've been deleted, by caching the read-only data in the com wrapper.
2026-03-29 22:21:02 +00:00
Blue
933aedc79e Correctly set FileOffsets in WriteHandle (#14562)
* Correctly set FileOffsets in WriteHandle

* Apply PR suggestions
2026-03-28 11:44:02 -07:00
Blue
e7c520efd8 Use pre-imported container images in the tests to avoid hitting the API limit (#14561)
* Use pre-imported container images in the tests to avoid hitting the API limit

* Fix test case

* Update test/windows/wslc/e2e/WSLCE2EImageBuildTests.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-27 18:51:44 -07:00
Blue
7483642048 Various improvements to PullImage() + custom registry support (#14549)
* Save state

* Save state

* Handle issues during pull

* Disable the pull tests

* Update the CLI tests

* Format

* Fix legacy index logic

* Add test coverage for failed PullImage()

* Update test/windows/WSLCTests.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-27 18:50:56 -07:00
Blue
d5071295c1 Various improvements to interactions with user-provided handles (#14486)
* Save state

* Add test coverage

* Check the event under the lock

* Apply PR feedback

* Format

* Apply PR feedback
2026-03-27 16:13:29 -07:00
Ben Hillis
8973aeb8b5 cleanup: rename wsla -> wslc (#14502)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-27 11:39:25 -07:00