Repository navigation
test(conformance): migrate lifecycle main-result tests to lifecycle stories - #4628
Open
politerealism wants to merge 1 commit into
Conversation
…tories Move the canonical-main result tests from the legacy sandbox_lifecycle binary into the conformance lifecycle area, one story per file: exit zero completes a retained sandbox, a nonzero exit is preserved, detached mains reach Completed or Error, and a main that exits while provisioning is reported as a workload result. The stories read phase and exit code from `sandbox get --output json` instead of matching CLI text, wait for the exit code to be recorded, and run without a TTY. The provisioning story also checks the documented MainProcessFailed Ready reason. Remove the three detached tests from sandbox_lifecycle. Keep the two non-detached exit tests there, since they run create under a pty and the support runner cannot allocate one yet. Contributes to NVIDIA#3954 Signed-off-by: politerealism <burdcat17@gmail.com>
This branch has not been deployed
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.
Summary
Move the canonical-main result tests from the legacy
sandbox_lifecyclebinary into the conformancelifecyclearea. How a sandbox reports its main process's result isn't driver-specific, so it belongs with the other lifecycle stories and runs against any prepared gateway. Stacked on #4538, which relocates the suites.Related Issue
Contributes to #3954. No separate issue: this migrates existing coverage.
Changes
lifecycle/, one per file, keeping the original test names:canonical_main_exit_zero_completes_persistent_sandbox: a main that exits 0 leaves a retained sandbox inCompletedwith exit code 0, and its output reaches the create command.canonical_main_nonzero_exit_preserves_status: the create command exits with the main's code, and the sandbox isErrorwith that code recorded.detached_canonical_main_exit_zero_reaches_completedanddetached_canonical_main_nonzero_exit_reaches_error: a detached main exits only after the sandbox is created (it waits for a release file), then reachesCompletedorErrorwith its code.detached_main_exit_during_provisioning_is_classified_as_workload_result: a main that exits while the sandbox is provisioning is reported asErrorwith its exit code and theMainProcessFailedReady reason, not as a provisioning failure.phase,exit_codeand the Ready condition fromsandbox get --output jsoninstead of matchingPhase: ...text. The server can mark a sandboxError(ContainerExited) before the supervisor reports the exit code, so the helper keeps polling until both are present and fails at once on a different code.--no-ttyand the target's default image. The support runner can't allocate a pty, and the legacy exit-zero and nonzero tests rancreateunder one, so those two legacy tests stay insandbox_lifecyclefor now: removing them would drop interactive-create coverage of exit-code propagation. They overlap the newmain_exit_*stories until the runner can allocate a pty. The TTY-specific cases (canonical_tty_main_uses_sandbox_environmentand the TTY halves of other tests) stay for the same reason.e2e/rust/tests/sandbox_lifecycle.rs; they have no pty dependence. The binary stays on the Podman archive exclusion list because it still holds the remaining tests.create_with_main,expect_terminal_result,run_gated_main,exec_succeedsandrequire_output_line.create_running_sandboxnow reusescreate_with_main.Testing
mise run pre-commitpassese2e/with-podman-gateway.sh)Error, the nonzero story expecting code 8, the detached zero story expectingError, the provisioning story expecting the wrong Ready reason, and the output line never matching (fails the two non-detached stories only)tmachine test ubuntu-docker-rootful binaries conformance) and in the Ubuntu K3s guest (tmachine test ubuntu-k3s k3s conformance); the archive built from this commit lists the five stories. The success logs don't print per-test names.exit 11lands while the sandbox is still provisioning (it depends on timing, and the gateway log doesn't record phase changes); the story does check the result and theMainProcessFailedreasonChecklist