Hyper-V API: Plan9 shares feature#4723
Draft
xmkg wants to merge 314 commits intofeature/hyperv-api-backend-virtual-machinefrom
Draft
Hyper-V API: Plan9 shares feature#4723xmkg wants to merge 314 commits intofeature/hyperv-api-backend-virtual-machinefrom
xmkg wants to merge 314 commits intofeature/hyperv-api-backend-virtual-machinefrom
Conversation
Member
xmkg
commented
Mar 11, 2026
also add a couple non-std::error_code overloads. mark some of the std::error_code overloads noexcept. updated the test code.
Also, simplify boilerplate code by wrapping MockFuncion with StrictMock which allows us to eliminate the need for EXPECT_NO_CALL stubs.
[hyperv_test_utils] improve make_tempfile_path
- move GUID formatter to the platform_win.h header - update unit test usages
- Introduce two new types, HcsScsiDevice & HcsScsiDeviceType - Provide proper formatting for the HcsScsiDevice - Remove vhdx_path & cloudinit_iso_path variables from create params - Introduce scsi_devices paraneter to create params - Update the code that refers to the vhdx_path & cloudinit_iso_path
- replace "endpoints" with "network_adapters" in create params - Introduce new HcsNetworkAdapter type - Implement proper JSON formatter for HcsNetworkAdapter - Update relevant references in code
- add_endpoint function now takes compute system name as the rest of the API does - Updated code references
to simplify the interaction between the smart pointers and the C API a lean out_ptr type is implemented based on P1132R6 paper, which is already accepted into the C++23 standard. - open_host_compute_system and create_host_compute system now uses the out_ptr to avoid creating a temporary raw pointer for the API calls.
- update one more location that has been missed
modify_compute_system is the generic function for doing runtime CS modification.
- Use c++20 designated initializers to avoid IILEs - removed redundant instance_guid filed from HcsNetworkAdapter - Add ASSERT_THROW for suspend failure test as it throws now on pause fail.
It'll be introduced later in a separate branch.
These two functions allow querying info about HCN networks. Filtering networks through win32 API is a bit guesswork so let's do it in the intended way.
Also added integration tests for the query_network and enumerate_networks
Now the networks() call return vSwitches and links populated properly the prepare_networking() function works as intended and the custom net setup code is no longer necessary.
It'll be introduced in a separate branch.
This reverts commit a3b92ff.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/hyperv-api-backend-virtual-machine #4723 +/- ##
=============================================================================
Coverage ? 87.67%
=============================================================================
Files ? 256
Lines ? 14113
Branches ? 0
=============================================================================
Hits ? 12372
Misses ? 1741
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4642fa0 to
3de21e5
Compare
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.