Repository navigation
host: delete the old clone path (SL6.2b) - #1507
Pedro Henrique Penna (ppenna) wants to merge 1 commit into
Conversation
This pull request changes existing testsIt modifies or removes 360 existing test asset(s), listed below. Review each with care: a change to a test can hide a regression that the test caught. See doc/contribute.md#changes-to-existing-tests. Test code
... and 310 more, which the job's summary lists. Relocated unchanged: 0; added: 0. Compared the merge base |
There was a problem hiding this comment.
🟡 Changes recommended
The restore sequence omits required readiness and activation steps before commit, and the acceptance matrix still identifies the wrong PR as retiring the doctests.
2 open issues
What changed in this PR
Removes the legacy store-based clone path as SL6.2b of NVX’s library-slimming workstream, following the runtime adapter’s removal in #1499. Template stores, identity types, and required aliases remain for subsequent deletion steps.
Changes:
- Deletes clone planning, launch, restore, records, reattachment, and their dedicated tests.
- Removes crate-private helpers used only by the deleted path and adjusts surviving tests.
- Updates documentation, public API snapshots, and doctest retirement tracking.
| File | Description |
|---|---|
nvx-rs/src/host/template/store/tests.rs |
Removes clone-only test helpers. |
nvx-rs/src/host/template/store/leases.rs |
Removes documentation of deleted launch checks. |
nvx-rs/src/host/template/store.rs |
Removes the clone-only socket-limit re-export. |
nvx-rs/src/host/template/mod.rs |
Removes clone module, exports, and documentation. |
nvx-rs/src/host/template/clone/records/tests.rs |
Deletes clone-record tests. |
nvx-rs/src/host/template/clone/record.rs |
Deletes clone activation-record construction. |
nvx-rs/src/host/template/clone/reattach.rs |
Deletes store-based clone reattachment. |
nvx-rs/src/host/template/clone/launch/tests.rs |
Deletes the clone-launch test hook. |
nvx-rs/src/host/template/clone/launch.rs |
Deletes legacy clone launch implementation. |
nvx-rs/src/host/template/clone/failure/tests.rs |
Deletes clone-failure classification tests. |
nvx-rs/src/host/template/clone/export.rs |
Deletes clone-specific export checks. |
nvx-rs/src/host/supervisor/vmm.rs |
Removes clone-reattachment documentation references. |
nvx-rs/src/host/supervisor/tests.rs |
Adjusts imports and removes deleted-field assertions. |
nvx-rs/src/host/supervisor/mod.rs |
Updates clone documentation and removes private re-exports. |
nvx-rs/src/host/supervisor/launch.rs |
Removes clone-only failure fields and teardown helper. |
nvx-rs/src/host/store/tests.rs |
Removes an assertion using the deleted refusal helper. |
nvx-rs/src/host/store/regular.rs |
Removes the refusal-helper re-export and its documentation. |
nvx-rs/src/host/store/names.rs |
Removes documentation references to deleted clone writers. |
nvx-rs/src/host/store/locked.rs |
Removes clone-only socket and owned-entry accessors. |
nvx-rs/src/host/snapshot/key/tests.rs |
Removes deleted gateway-accessor assertions. |
nvx-rs/src/host/snapshot/key.rs |
Removes the clone-only IPv6 gateway accessor. |
nvx-rs/src/host/seal/windows/tests.rs |
Retires the volume-GUID path test. |
nvx-rs/src/host/seal/windows.rs |
Removes volume-GUID path support used only by clones. |
nvx-rs/src/host/seal.rs |
Removes the private volume-path wrapper. |
nvx-rs/src/host/sandbox/scratch.rs |
Removes the version accessor and clone-plan documentation link. |
nvx-rs/src/host/sandbox/plan.rs |
Removes clone-only DNS lookup support. |
nvx-rs/src/host/sandbox/distro.rs |
Removes the version accessor and clone-plan documentation link. |
nvx-rs/src/host/platform/windows/tests.rs |
Uses retained listener-binding APIs. |
nvx-rs/src/host/platform/windows/mod.rs |
Removes unused helper re-exports. |
nvx-rs/src/host/platform/windows/identity.rs |
Removes the hard-link count helper. |
nvx-rs/src/host/platform/windows/endpoint.rs |
Removes the clone-only listener factory; updates documentation. |
nvx-rs/src/host/platform/tests.rs |
Removes deleted refusal-helper assertions. |
nvx-rs/src/host/platform/other.rs |
Removes the link-count stub; updates listener documentation. |
nvx-rs/src/host/platform/mod.rs |
Removes refusal classification helper and references. |
nvx-rs/src/host/platform/linux/tests.rs |
Uses verified restore-ready reception. |
nvx-rs/src/host/platform/linux/mod.rs |
Removes the link-count re-export. |
nvx-rs/src/host/platform/linux/identity.rs |
Removes the hard-link count helper. |
nvx-rs/src/host/platform/linux/endpoint.rs |
Removes unverified reception; updates listener documentation. |
nvx-rs/README.md |
Removes legacy clone API descriptions. |
nvx-rs/public-api/windows.txt |
Removes deleted clone API entries. |
nvx-rs/public-api/linux.txt |
Removes deleted clone API entries. |
doc/acceptance-case-matrix.md |
Retires the clone doctest and updates counts and locations. |
Review effort: Balanced
32ceca2 to
51569c6
Compare
With the runtime adapter gone (SL5.2), nothing calls the old clone path, which restored a clone from a template store's leased generation: ClonePlan and CloneRequest, which planned it, the launch that returned a Restoring, the restore sequence through CloneControl, Activated and Started, the clone and failure records, with the backward scan for OpenVMM's fatal line, and the store-based reattach_clone. host::template::clone leaves with its submodules, their exports, their 120 unit tests and ClonePlan's doc test, and the public API snapshots lose its 194 items on each platform. The crate-private code that only the clone path used leaves with it, as the dead-code check of each feature set finds it on Linux and Windows: platform::is_refused, link_count on every host, Windows' listen_ready, Linux's unverified ReadyListener::receive, seal::final_volume_path, SnapshotKey::ipv6_gateway, the distro and scratch bindings' version accessors, SandboxPlan::dns_server, LockedStore's reserved_socket and owned_entries, Starting::end_keeping_journal, and LaunchFailure's spawned and unended, which only a clone's launch read; with the re-exports of launch_reporting, reattach_reporting and SOCKET_PATH_LIMIT, and the template store's test helpers that only the clone tests used. The store identity types and the host::template aliases that the template store still uses stay for SL6.2a and SL6.1. The tests of what leaves go with it: final_volume_path's own test retires, and five tests drop their assertions on is_refused, ipv6_gateway and LaunchFailure's fields. The tests of the restore-ready listeners take the paths that a restore takes: on Windows, the test binds its listener at a fresh pipe itself, now that listen_ready is gone there, and on Linux, it receives through the verified path. The docs stop naming the clone path: the rustdoc of the template module, the supervisor, the sandbox store's file names, the bindings' geometries, the restore-ready listeners, which a restore now uses alone, and the template store's clone sockets; the nvx README's module table and its template, supervisor and checked-handoff sections; and the case matrix, which retires ClonePlan's doc test, follows the template store's doc test to its new line, and names SL6.2a as the PR that retires the template store's two doc tests. Part of #1121 (SL6.2b). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
51569c6 to
6065e73
Compare

Leaving code only. This PR changes only code that this effort removes from NVX: the old clone path (
host::template::clone: its records, planning, launch, restore sequence and store-based reattach), with the crate-private code that only it used and the edits that remove references to it. Nothing that stays changes, and no later PR uses what it changes, so the size limits for kept code don't apply.Outside the clone path and the stores that SL6.2a and SL6.1 delete, the modules that it edits,
host::platform,host::seal,host::snapshotandhost::sandbox, only lose the crate-private items that only the clone path used, as the compiler's dead-code check finds them, with the rustdoc and test assertions that named them.Part of #1121 (SL6.2b, "The old clone path is gone"). Parent #1087, umbrella #1076.
Stacked on #1499 (SL5.2), which deletes the runtime adapter, the old clone path's last user. Its base is
agents/slim-sl5-2-remove-adapter(a2fadde7), and it merges only after #1499.What and why
Once #1499 deletes the runtime adapter, nothing calls the old clone path, which restored a clone from a template store's leased generation. This PR does SL6.2b's Scope and no more, in one commit,
host: delete the old clone path:The old clone path goes:
nvx-rs/src/host/template/clone.rsandclone/, 14 files and 15,666 lines.ClonePlan,CloneRequestandCloneUpper, with the export check (export.rs).ClonePlan::launch, which returned aRestoring(launch.rs).restore.rs):CloneControl,Activated,Started,RestoreDeadlines,MAX_ACTIVATION_SESSIONS,RESTORE_TO_READY_TIMEOUT,READY_TO_START_TIMEOUTandRESTORE_READY_EVENT.failure.rs,record.rs,records.rs):CloneFailure,Evidence,Outcome,Stage,Progress,Teardown,FailureRecord,CloneRecords,FAILURE_FORMATandstatus_evidence, with the backward scan of OpenVMM's log for its fatal line.reattach.rs):reattach_cloneandReattachedClone.template/clone/tests.rs,template/clone/tests/{launch,restore}.rsandtemplate/clone/{failure,launch,records}/tests.rs(the last only held a test hook).host::templatelosesmod clone, its re-export, and the five bullets of its rustdoc that described it. The public API snapshots lose its 194 items on each platform, all undernvx::host::template.The crate-private code that only it used goes with it, as the dead-code check of CI's warning-denied builds of each feature set finds it, on Linux and on Windows:
host::platform:is_refused, with its re-export inhost::store::regular;link_count, on Linux, Windows and other hosts; Windows'listen_ready; and Linux's unverifiedReadyListener::receive, sincehost::restorereceives throughreceive_verified.host::seal:final_volume_path, with its Windows implementation.host::snapshot:SnapshotKey::ipv6_gateway.host::sandbox:DistroBinding::version,ScratchBinding::versionandSandboxPlan::dns_server.host::store, which SL6.1 deletes:LockedStore::reserved_socketandLockedStore::owned_entries.host::supervisor, which SL6.1 deletes:Starting::end_keeping_journal;LaunchFailure'sspawnedandunended, which only the clone launch read, withabandon_after'sspawnedparameter, which only filled them; and thepub(crate)re-exports oflaunch_reportingandreattach_reporting, whose functions stay forlaunchandreattach. Whatsupervisor::launchreturns and leaves doesn't change: it already passed a hook that records nothing, and kept onlyLaunchFailure::error.host::template::store, which SL6.2a deletes: the re-export ofSOCKET_PATH_LIMIT, which its capture still uses, and two test helpers that only the clone tests used,Store::publish_spec_for_testsand a re-export ofSNAPSHOT_ARTIFACTS.What stays, as the Scope says: the stores' identity types and the
host::templatealiases that the template store still uses, for SL6.2a and SL6.1.The docs stop naming the clone path, with no other change:
host::template's module docs;host::supervisor's "Clones" section, whose steps 2 and 3 launch the clone withlaunch, after the caller bound what its restore needs, such as its restore-ready endpoint, check through the caller's own transport that its restore completed, and only then commit the launch, or abandon it, without the deleted plan and restore sequence, and whose crash notes dropreattach_clone;Vmm::stop_unless_exited,launch_reporting,abandon_afterandStarting::commit_reporting; the sandbox store'sCLONE_ACTIVATION_NAME,RESTORE_READY_NAME,CLONE_PROGRESS_NAMEandCLONE_FAILURE_NAME, which no longer say what the deleted launch wrote in them; the geometries of the distro and scratch bindings; each platform's restore-ready listener, whichhost::restorenow uses alone; the template store's clone socket, whose length only the deleted launch checked; and the mentions ofis_refused.nvx-rs/README.md: the module table's row ofnvx::host::template(now "Legacy template capture plans and store, with aliases of the snapshot metadata"); its section, which loses the paragraphs of the clone plan, launch, restore sequence, failures, reattach and records, and keeps those of the store, of which the lease's clone socket no longer names the deleted launch's checks; the supervisor's Windows working-directory limit, which no clone preflight checks now; and "Checked handoff", which loses its paragraph on the clone.doc/acceptance-case-matrix.md: the doc test ofClonePlanis retired, and the template store's doc test follows its code to line 473 (was 474), and its two doc tests, ofTemplatePlanandStore, now name SL6.2a, which deletes the template store, as the PR that retires them; the Docs row now counts 36 tests, 34 kept, 1 rewritten, 1 retired.doc/modules, the module diagrams, still showhost::template::clone: CI's nightlymodule-diagramsworkflow draws them again, asdoc/ci.mdasks.Every removed test, and its fate
python scripts/check_test_changes.py --base origin/agents/slim-sl5-2-remove-adapterreports 360 changes to existing tests: 121 removed tests, 7 modified tests, the imports of one test module, and the removed helpers, modules, imports and attributes of the deleted test files. All 121 removed tests retire, since what they check leaves NVX, and none is named in the case matrix, as coverage or otherwise (git grepof each name):host::seal::windows::tests::final_volume_paths_name_the_file_by_its_volume, the test offinal_volume_path.The doc test
nvx-rs/src/host/template/clone.rs - host::template::clone::ClonePlan (line 247), which the report doesn't list, retires too, as the case matrix's Docs row says.nvx-rs/src/host/seal/windows/tests.rs(host::seal::windows::tests): 1final_volume_paths_name_the_file_by_its_volumenvx-rs/src/host/template/clone/failure/tests.rs(host::template::clone::failure::tests): 10each_row_of_the_table_attributes_its_evidence,names_are_those_of_the_records,a_repair_status_alone_is_evidence_of_the_repair_stage_at_any_point,an_activation_status_is_evidence_of_its_class_until_a_workload_may_have_run,a_report_gives_the_guest_s_status_and_its_evidence,a_status_prevails_over_what_was_seen_of_the_same_end_but_not_over_the_template_s_evidence,openvmm_s_fatal_error_is_evidence_of_an_incompatible_host_only_for_its_codes,openvmm_s_fatal_error_is_evidence_of_a_forward_bind_when_it_names_a_forward_it_cannot_bind,host_failures_that_ran_out_of_a_resource_are_resource_exhaustion,teardowns_follow_the_end_of_the_launchnvx-rs/src/host/template/clone/records/tests.rs(host::template::clone::records::tests): 11a_progress_log_records_each_step_once_with_the_steps_that_it_deferred,a_progress_log_replaces_an_earlier_one_only_in_the_directory_that_it_holds_open,a_progress_log_that_a_crash_cut_short_is_read_and_one_of_another_launch_is_refused,a_failure_record_is_read_as_it_was_written,a_failure_record_is_in_place_when_its_directory_is_synced,a_failure_record_keeps_the_ends_of_texts_too_long_for_a_read_to_take,a_failure_record_of_another_format_or_a_malformed_one_is_refused,a_failure_record_of_another_clone_than_the_one_of_the_lease_is_refused,the_line_of_openvmm_s_fatal_error_is_read_from_the_end_of_its_log,the_line_of_openvmm_s_fatal_error_is_read_before_a_chain_of_any_length,the_cause_that_names_a_forward_that_openvmm_cannot_bind_follows_the_fatal_linenvx-rs/src/host/template/clone/tests.rs(host::template::clone::tests): 39a_clone_in_ram_restores_its_lease_with_its_image_and_no_scratch_file,files_of_the_sandboxs_store_are_refused_as_images,links_and_directories_under_the_names_of_the_sandboxs_store_are_refused,a_scratch_image_that_is_a_file_of_a_generation_s_snapshot_is_refused,a_scratch_image_in_the_template_store_is_refused,locations_that_name_their_volume_by_its_guid_are_compared_with_the_store,a_scratch_image_with_another_name_is_refused,names_that_the_file_system_takes_for_those_of_the_stores_files_are_the_stores,templates_that_a_runtime_of_other_contracts_captured_are_refused,images_that_their_binding_does_not_authorize_and_malformed_generations_are_refused,keys_that_their_read_refuses_for_what_they_are_are_failures_of_the_template,keys_of_another_encoding_version_are_failures_of_the_host_that_quarantine_nothing,a_clone_on_a_scratch_image_claims_it_and_reads_no_content,a_scratch_image_serves_one_clone_at_a_time,scratch_images_whose_identity_or_kind_changed_are_refused,images_no_longer_than_the_placeholder_are_served_and_longer_ones_refused,scratch_images_of_another_length_or_geometry_are_refused,a_template_serves_clones_in_ram_whatever_geometry_its_scratch_presented,files_on_a_filesystem_of_another_block_size_are_refused,memory_targets_are_whole_blocks_from_the_templates_ram_to_its_capacity,processor_targets_are_counts_from_the_templates_processors_online_at_boot_to_its_capacity,requests_that_no_clone_takes_are_refused_before_anything_is_opened,templates_serve_the_networks_of_every_policy_at_their_nics_address_alone,clones_are_planned_under_the_lock_that_acquired_their_lease_before_their_launch,files_that_their_paths_do_not_name_as_checked_are_refused,the_activation_record_of_a_clone_in_ram_names_its_restore_image_and_settings,the_activation_record_of_a_clone_on_a_scratch_image_names_only_its_journal,the_activation_record_of_a_gpt_clone_names_its_disk_and_the_bound_of_its_first_partition,the_activation_record_of_a_clone_of_a_template_with_a_nic_names_its_own_network,settings_that_no_activation_record_holds_are_refused_before_anything_is_created,only_a_path_that_no_longer_names_its_supplied_file_is_the_request_s,a_clone_with_an_export_records_its_plan_and_maps_from_its_children,exports_that_no_cold_launch_attaches_are_refused_before_anything_is_opened,exports_that_overlap_the_template_store_are_refused_before_anything_is_opened,exports_that_let_the_guest_turn_the_template_store_s_path_are_refused,exports_that_let_the_guest_block_the_template_store_s_path_are_refused,exports_that_hold_the_sandbox_s_directory_are_refused,files_in_the_sandbox_s_directory_are_refused,the_export_of_a_clone_is_attached_and_mapped_as_a_cold_launch_attaches_and_maps_itnvx-rs/src/host/template/clone/tests/launch.rs(host::template::clone::tests::launch): 43restore_vmm_role,a_clone_restores_its_leased_snapshot_with_its_devices_and_activation_record,clones_of_one_generation_restore_its_snapshot_in_place_at_once,the_control_socket_of_a_clone_goes_once_its_vm_has_ended_and_for_good_with_its_lease,a_clone_of_a_template_with_a_nic_restores_its_own_policy_in_place_of_the_templates,a_clone_of_a_template_with_processors_offline_at_boot_restores_its_processor_target,a_clone_on_a_scratch_image_passes_its_claim_to_its_vmm,a_clone_with_an_export_binds_it_to_its_template_s_dormant_filesystem_slot,a_clone_whose_exported_objects_changed_since_its_plan_starts_nothing,a_clone_whose_export_cannot_be_inspected_starts_nothing_and_fails_with_the_host_s_evidence,a_clone_launches_only_as_the_launch_that_its_durable_binding_reserves,working_directory_limits_are_checked_before_clone_launches,a_clone_whose_launch_failed_before_it_began_launches_no_more_until_its_release,a_failure_that_a_reattach_records_before_any_launch_shows_no_report_of_an_earlier_vm,a_clone_whose_control_socket_openvmm_or_the_host_cannot_use_starts_nothing,launch_role,a_launch_whose_caller_crashes_before_it_begins_leaves_files_that_the_release_removes,a_launch_whose_caller_crashes_once_it_began_ends_as_reattach_recovers_it,a_launch_that_began_shows_the_report_of_a_vmm_that_its_journal_does_not_record,a_reattach_takes_the_report_of_a_vmm_whose_launch_a_recovery_of_the_sandbox_ended,a_launch_whose_caller_crashes_once_its_vmm_started_ends_the_vmm_as_reattach_recovers_it,a_restore_whose_caller_crashes_before_its_commit_ends_its_vmm_as_reattach_recovers_it,a_restore_whose_caller_crashes_once_it_committed_keeps_its_lease_while_its_vm_runs,a_clone_whose_caller_crashed_once_it_committed_is_taken_over_in_a_new_session,a_journal_that_a_clone_s_commit_left_is_no_failure_of_the_clone,a_reattach_ends_a_clone_that_it_may_not_keep_through_its_verified_identity,a_reattach_fails_a_clone_whose_record_of_a_failure_cannot_be_read,a_reattach_fails_a_clone_whose_sandbox_records_the_failure_of_another_clone,a_reattach_fails_a_clone_whose_record_of_a_failure_is_of_another_template,a_record_of_a_failure_that_cannot_be_read_is_a_failure_whatever_the_reattach_finds,a_reattach_ends_the_launch_of_a_caller_that_crashed_and_records_its_failure,a_reattach_records_the_failure_of_an_interrupted_launch_before_it_ends_the_launch,a_launch_abandoned_before_its_activation_leaves_the_spawn_for_a_reattach,a_clone_whose_vm_exited_once_it_committed_is_classified_by_its_report,a_reattach_records_the_failure_of_a_vm_that_exited_before_it_forgets_the_vm,a_reattach_takes_the_outcome_report_of_a_vm_that_exited_as_it_first_read_it,a_reattach_finishes_an_earlier_failure_with_what_the_clone_s_vmm_left_as_it_ended,a_clone_whose_progress_log_may_have_lost_its_steps_may_have_run_its_workload,a_clone_that_its_holder_stopped_ended_whatever_a_reboot_left_of_its_progress_log,a_clone_whose_vmm_exited_before_its_holder_s_stop_began_lost_its_status,an_interrupted_launch_that_a_reattach_cannot_end_yet_keeps_its_lease_until_one_can,a_reattach_that_cannot_record_a_failure_ends_and_forgets_nothing_of_the_clone,a_reattach_makes_the_record_of_an_earlier_failure_durable_before_it_ends_the_launchnvx-rs/src/host/template/clone/tests/restore.rs(host::template::clone::tests::restore): 17a_clone_is_activated_once_its_restore_is_ready_then_started_and_committed,a_ready_that_does_not_report_the_record_s_activation_ends_the_launch,a_session_that_the_adapter_lost_is_replaced_by_one_that_resends_the_same_record_first,a_retry_never_sends_another_record_nor_takes_another_activation,only_lost_sessions_are_replaced_and_only_so_many_times,a_clone_that_took_the_reset_of_a_lost_session_before_its_ready_ends_the_retries,the_restore_to_ready_deadline_runs_from_the_launch_through_every_step,the_ready_to_start_deadline_runs_from_the_ready_and_a_start_is_never_resent,a_vmm_that_exits_or_sends_anything_but_its_event_ends_the_launch,a_status_with_which_the_guest_ended_the_clone_s_vm_attributes_its_failure,a_failure_is_recorded_before_its_teardown_and_again_once_the_teardown_ended,a_launch_that_cannot_be_ended_keeps_its_records_and_its_lease_until_a_reattach_ends_it,a_caller_fails_a_ready_or_started_clone_with_its_own_evidence_as_the_sequence_fails_one,a_failure_that_cannot_be_recorded_before_its_teardown_keeps_its_launch_for_a_reattach,a_diagnosis_too_long_for_a_record_keeps_its_ends_and_its_evidence_through_a_reattach,a_clone_with_an_export_gets_its_mapping_table_once_ready_and_its_start_once_it_applied_it,a_partial_or_failed_mapping_table_ends_the_launch_and_its_sandbox_never_startsSize
Measured against
a2fadde7(#1499's head):platform/linux/mod.rs1,platform/windows/mod.rs2,store/regular.rs1,store/locked.rs1), 2 imports (sandbox/plan.rs,seal/windows.rs), and 7 lines ofsupervisor/launch.rsthat loseLaunchFailure's two fields andabandon_after'sspawned. The counted files lose 127 lines of code.template/mod.rs,template/store.rs,template/store/leases.rs(doc only),platform/mod.rs,platform/other.rs,platform/{linux,windows}/{mod,identity,endpoint}.rs,sandbox/{distro,scratch,plan}.rs,seal.rs,seal/windows.rs,snapshot/key.rs,store/{locked,names,regular}.rs(names.rsdoc only), andsupervisor/{launch,mod,vmm}.rs(vmm.rsdoc only). Besidestemplate/mod.rs, whose module list, re-exports and rustdoc lose the clone path, they hold the dead-code check's findings, the rustdoc links that the deletion broke, and the docs that described the deleted code. The 14 files that it only deletes don't count.BOOT_CONTRACT_VERSIONandCONTROL_CONTRACT_REVISIONdon't change.Left as is
ReadyListener::receive_checkedkeeps itsverify_original_peerflag, which onlytruereaches now that the unverifiedreceiveis gone: the compiler doesn't flag it, and removing it would refactor code that stays.CheckedDistro::geometryandCheckedScratch::geometry; the sandbox store's paths and names of a clone's files, which its release and removal still clean up; andVmm::stop_unless_exited.Not in this PR
Rewriting, refactoring or improving any clone-independent code that stays; re-homing clone records, planning or reattachment; a replacement clone API, compatibility aliases or migration readers; deleting the store identities or the
host::templatealiases (SL6.2a, SL6.1); and the module diagrams, which CI draws.Validation
On
32ceca26, with Rust 1.95.0 andNVX_BUNDLE=skip, locally on Windows and on nvx-mshv-test (Azure Linux 3, kernel 6.18, linux-mshv, virtual machine), in a temporary worktree:cargo fmt --all --check-D warnings:--all-targets --all-features,--lib,--lib --no-default-features,--lib --no-default-features --features serde,--lib --bins --features cli,--lib --bins --no-default-features --features testingRUSTDOCFLAGS=-D warnings cargo doc --locked --no-deps --all-featurespython scripts/public_api.py(both snapshots)--update, then passedpython scripts/check_test_layout.pycargo +1.89 check --locked --all-targets --all-features(MSRV)cargo check --locked --all-targets --all-features --target aarch64-apple-darwincargo test --locked --all-featurescli110, every other target, doc tests 11--no-fail-fast: lib 2188 (57 ignored), where the base runs 2304 (59): the 118 clone tests that Linux builds leave;cli119, every other target, doc tests 31 (base 32)cargo test --lockedcargo build --locked --lib --no-default-features,cargo test --locked --lib --no-default-featurescargo test --doc --all-features -- --listhost::template::store::Storeat 473python3 scripts/nvx.py check-guest-binaries --toolchain 1.95.0(Clippy and tests of the guest feature for the guests' target)python scripts/check_markdown_links.py,python -m compileall -q scriptsvalidate-nvx's Windows step:python -m unittestof its 22 modules,test_adversarial.py,test_hosts.py, and thenvx.py --helpchecksshinMicrovmTests.test_host_loopback_script_probes_udp_on_proxy_and_general_ports, under load, which passed when rerun with the other 19 host-loopback tests (this change touches no script);test_adversarial.py84 OK (11 skipped),test_hosts.py4 OK, every--helpexits 0Windows' Clippy and
--all-featurestests ran on earlier versions of the commit, which differ from32ceca26only in comments and in Linux-only code. The head,6065e736, then changed only rustdoc and the case matrix, for the review below:RUSTDOCFLAGS=-D warnings cargo doc --all-features,cargo fmt --checkand the doc-test list passed again on Windows.A first Linux run found the dead-code check's only Linux-only finding, Linux's unverified
ReadyListener::receive, which this head deletes. In a later full run on the same content,tests/supervisor.rs'svmms_inherit_only_their_streams_and_allowed_descriptors_while_others_spawnfailed once per feature set: twosleepprocesses that its other thread spawned withstd::process, while it launched VMMs, held the VMMs' pipes. It passed in the full runs of the table, in 12 runs of--test supervisor, 6 of them detached as the full runs were, and in 5 runs alone; what it tests,supervisor::spawnand the platform's spawn, doesn't change here, and one full run at the base passed too. So it looks like a timing-dependent flake of the host, under the load of other jobs, rather than an effect of this change.No microVM scenario ran: no runtime path changes. What
nvx-rs run,sandboxandsnapshotrun doesn't use the clone path, and the edits to code that they use only remove what nothing calls. Left to CI: the bundled-artifact check and the build of the guest binaries, which this change doesn't reach, and the hypervisor jobs.Changes to existing tests (
tests-modified)Besides the removals above, each change only drops or replaces what used a deleted item:
host::platform::tests::a_bounded_read_refuses_a_regular_file_that_holds_more_than_its_boundandhost::platform::tests::an_open_of_a_regular_file_refuses_a_link_and_a_directory: drop their assertions onis_refused, which leaves. The refusals' messages, and the missing file'sNotFound, stay checked.host::store::tests::entries_that_are_links_or_not_regular_files_are_refused_as_the_platform_refuses_them: drops its assertion onplatform::is_refused; the refusal's message, the platform's, stays checked.host::snapshot::key::tests::a_key_holds_what_its_capture_made: drops its checks ofSnapshotKey::ipv6_gateway, which leaves (the clone path named its DNS server from it), with the spec without an IPv6 identity that only they used. The key of a template without a NIC still has no guest network.host::supervisor::tests::a_launch_whose_caller_cannot_record_its_failure_keeps_its_journal_for_recovery: drops its assertions onLaunchFailure::spawnedandLaunchFailure::unended, which leave. It still checks the error's kind and message, the journal that remains for recovery, and the recovery. Its module importslaunch_reportingfromsuper::launch, now thatsupervisor/mod.rsdoesn't re-export it.host::platform::windows::tests::a_restore_ready_client_that_closed_before_its_connection_was_accepted_is_read_to_its_end: binds its listener withReadyListener::bindat a fresh pipe thatcontrol_endpointdraws, as a restore binds one at the pipe that its VM directory draws, in place of the deletedlisten_ready, which drew a pipe of its own and bound it the same way. Same cases, same assertions.host::platform::linux::tests::a_restore_ready_client_that_closed_before_its_connection_was_accepted_is_read_to_its_end: receives throughreceive_verified, the receive thathost::restoreuses, in place of the deleted unverifiedreceive. Same cases, same assertions. Its client is the test process itself, which runs throughout, so the check of the original peer passes, throughSO_PEERPIDFD, whichhost::restorealready requires (Linux 6.5 or a backport).host::template::store::tests: its imports lose theSNAPSHOT_ARTIFACTSre-export, andimpl Storelosespublish_spec_for_tests, which only the clone tests used.