Skip to content

test: try gpu test case seq [draft]#8205

Open
runzhen wants to merge 1 commit intomainfrom
runzhen/seq
Open

test: try gpu test case seq [draft]#8205
runzhen wants to merge 1 commit intomainfrom
runzhen/seq

Conversation

@runzhen
Copy link
Copy Markdown

@runzhen runzhen commented Mar 30, 2026

What this PR does / why we need it:

This is a draft, don't review.

Which issue(s) this PR fixes:

Fixes #

Copy link
Copy Markdown
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

Adds a new E2E scenario runner intended to execute scenarios without t.Parallel(), and switches a set of GPU E2E tests to use it (likely to avoid GPU quota/resource contention).

Changes:

  • Introduced RunScenarioSequential helper in e2e/test_helpers.go.
  • Updated multiple GPU managed-experience tests to call RunScenarioSequential instead of RunScenario.
  • Updated the GPU DaemonSet test to call RunScenarioSequential.

Reviewed changes

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

File Description
e2e/test_helpers.go Adds RunScenarioSequential wrapper around runScenario (intended to avoid t.Parallel()).
e2e/scenario_gpu_managed_experience_test.go Switches several GPU managed-experience scenarios to the sequential runner.
e2e/scenario_gpu_daemonset_test.go Switches the GPU DaemonSet scenario to the sequential runner.

Comment on lines +89 to +92
func RunScenarioSequential(t *testing.T, s *Scenario) error {
// Default path
return runScenario(t, s)
}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

RunScenarioSequential diverges from RunScenario semantics: it bypasses the config.Config.TestPreProvision || s.VHDCaching branch, so running GPU scenarios under TEST_PRE_PROVISION or with VHDCaching enabled will no longer execute the two-stage pre-provision/VHD-capture flow. Consider refactoring RunScenario into a shared helper (e.g., runScenarioWithOptions(parallel bool)) so the only behavioral difference is omitting t.Parallel() (and also omitting the inner t.Parallel() calls in the pre-provision subtests when running sequentially).

Copilot uses AI. Check for mistakes.
Comment on lines +89 to +92
func RunScenarioSequential(t *testing.T, s *Scenario) error {
// Default path
return runScenario(t, s)
}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

The name RunScenarioSequential suggests it will always run scenarios sequentially, but it only avoids calling t.Parallel(); if a caller wraps it in a t.Run(...); t.Parallel() subtest, scenarios will still execute concurrently. Consider renaming to something like RunScenarioNonParallel (or similar) and/or adding a short doc comment clarifying the concurrency guarantee.

Copilot uses AI. Check for mistakes.
@@ -188,7 +188,7 @@ func Test_DCGM_Exporter_Compatibility(t *testing.T) {
for _, tc := range testCases {
tc := tc // capture range variable for parallel execution
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

This comment is now misleading: the subtests are not marked t.Parallel() and the scenario runner used is RunScenarioSequential, so this test is no longer set up for parallel execution. Update/remove the comment (and the tc := tc note) to match the intended sequential behavior, or add t.Parallel() if parallel subtests are still desired.

Suggested change
tc := tc // capture range variable for parallel execution
tc := tc // capture range variable for use in this subtest

Copilot uses AI. Check for mistakes.
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