Skip to content

e2e: distill and unify remaining hand-rolls and one-offs. - #855

Draft
klihub wants to merge 9 commits into
containers:mainfrom
klihub:devel/e2e/distill-and-unify-tests
Draft

klihub wants to merge 9 commits into
containers:mainfrom
klihub:devel/e2e/distill-and-unify-tests

Conversation

@klihub

@klihub klihub commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

This PR is doing another sweep through e2e test cases, distilling and unifying most of the remaining common functionality migrating them from hand-rolled/one-off local implementations to a common set in test/e2e/lib/test.bash.

The sweep touches test cases modified in #829, #831, and #834 so it is marked a draft until those are merged.

@klihub
klihub requested review from askervin and bart0sh October 16, 2026 05:32
@klihub
klihub force-pushed the devel/e2e/distill-and-unify-tests branch 5 times, most recently from daa6ed4 to c918e31 Compare October 19, 2026 13:06
wait-verify waits until the expressions verify takes hold, then verifies
them, so that a test waiting for an eventual state no longer has to
hand-roll a retry loop over pyexec. nrt-query-q is nrt-query without the
command logging, for use inside such a loop.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Of the 33 tests which define a local cleanup(), 15 define it as one of
three cumulative shapes. Add cleanup-test, which takes --helm and
--cache for the latter two, and call it in those tests instead. The call
sites spell both flags out, as --cache alone hides the helm-terminate.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Convert 68 raw deletions in 31 tests, dropping the flags delete-pods
adds itself and a redundant --wait. They now tolerate a missing pod and
never fail, like the 43 existing call sites. Three tests keep a raw
deletion which does not fit the helper.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add dra-devices, dra-consumable-capacity and dra-claimed-cpus, which the
three DRA tests each had a version of, and skip-test for the SKIP
verdict three tests wrote by hand. dra-devices fetches the devices once
and leaves the fields to jq on the host. The DRA device test now waits
for the kubelet to unprepare a claim with wait-verify.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add wait-pod-condition for the waits which come later than the creation
of the pod, and let create do the three which follow it directly. Drop a
wait for Ready which repeated what the create before it had done. The
container exit test ignored its wait; it now fails, with a message.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Migrate more tests to use the common cleanup-test().

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
create-namespaces now remembers what it made and cleanup-test deletes it
again, retiring five hand-kept delete-namespaces lists. It also empties a
namespace which is already there, as the start-of-test cleanup used to.
test10 leaked two namespaces for want of a list, test18 deleted two it
never created. --preserve-namespaces keeps named ones alive across a
mid-test cleanup; no test needs it yet.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Five tests which arrived after this series was written clean up what
cleanup-test() already does. Replace their local cleanup() where it has
nothing else to do, and delegate to cleanup-test from it where it has.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
The test waited for its refused pod with raw kubectl right after
creating it. The create itself can do that wait, the same way as in the
strict alignment test.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
@klihub
klihub force-pushed the devel/e2e/distill-and-unify-tests branch from c918e31 to 73db6dc Compare October 19, 2026 14:39
@klihub
klihub requested a balanced review from Copilot October 21, 2026 12:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Startup cleanup can leave workloads from a failed scheduling test running, compromising isolation of the strict-alignment test.

1 open issue
What changed in this PR

Consolidates repeated end-to-end test operations into shared helpers for the topology-aware, balloons, and template policies.

Changes:

  • Standardizes pod deletion, namespace cleanup, and policy teardown.
  • Adds shared condition polling, skip reporting, and DRA query helpers.
  • Migrates existing tests, including the recent DRA coverage, to these helpers.
File Description
test/​e2e/​policies.test-suite/​topology-aware/​s8c4k/​test01-sparse-4kcpus/​code.var.sh Uses shared skip and deletion helpers.
test/​e2e/​policies.test-suite/​topology-aware/​n6-hbm-cxl/​test04-nrt/​code.var.sh Standardizes cleanup.
test/​e2e/​policies.test-suite/​topology-aware/​n6-hbm-cxl/​test01-memory-types/​code.var.sh Standardizes cleanup and pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test43-dra-pcie-roots/​code.var.sh Uses shared DRA device queries.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test42-dra-devices/​code.var.sh Adopts shared DRA, polling, and cleanup helpers.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test40-otel-logging/​code.var.sh Shares cleanup and removes redundant readiness wait.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test26-resize/​code.var.sh Standardizes cleanup.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test25-irq/​code.var.sh Standardizes cleanup.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test24-podresources/​code.var.sh Shares policy cleanup.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test22-isolcpus/​code.var.sh Shares cleanup and creation-time waiting.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test21-update-config/​code.var.sh Standardizes cleanup.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test20-coldstart/​code.var.sh Standardizes cleanup.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test19-cpuclass/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test18-strict-alignment/​code.var.sh Migrates cleanup, waiting, and pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test17-scheduling-classes/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test16-idle-shared-pools/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test15-busy-shared-pools/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test14-burstable/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test11-reserved-cpu-annotations/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test10-additional-reserved-namespaces/​code.var.sh Standardizes final cleanup.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test09-container-exit/​code.var.sh Uses shared readiness waiting.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test08-cpuprio-allocation/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test07-mixed-allocations/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test04-available-resources/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test03-simple-affinity/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test01-always-fits/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c16/​test00-basic-placement/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​topology-aware/​n4c128/​test19-cacheclusters/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​template/​n4c16/​test01-dra/​code.var.sh Adopts shared DRA, waiting, and cleanup helpers.
test/​e2e/​policies.test-suite/​template/​n4c16/​test00-e2e-framework/​code.var.sh Shares policy and cache cleanup.
test/​e2e/​policies.test-suite/​balloons/​n6-hbm-cxl/​test04-nrt/​code.var.sh Standardizes cleanup.
test/​e2e/​policies.test-suite/​balloons/​n6-hbm-cxl/​test01-memory-types/​code.var.sh Standardizes cleanup.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test25-irq/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test24-podresources/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test21-controller-check/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test19-pct/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test18-turbo-priority/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test17-cstates-scheduling/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test16-composite-balloons/​code.var.sh Shares cleanup and namespace-specific pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test15-loadclasses/​code.var.sh Shares pod deletion and cache cleanup.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test13-cacheclusters/​code.var.sh Shares pod deletion and cache cleanup.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test11-match-expression/​code.var.sh Standardizes cleanup.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test10-allocator-opts/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test08-numa/​code.var.sh Uses shared pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test07-maxballoons/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test06-update-config/​code.var.sh Shares namespace, policy, and cache cleanup.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test05-namespace/​code.var.sh Uses tracked namespace cleanup.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test04-groupby/​code.var.sh Uses tracked namespace cleanup.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test02-prometheus-metrics/​code.var.sh Shares cleanup and pod deletion.
test/​e2e/​policies.test-suite/​balloons/​n4c16/​test01-basic-placement/​code.var.sh Shares pod and namespace cleanup.
test/​e2e/​lib/​test.bash Adds common polling, DRA, skip, and cleanup helpers.

Review effort: Balanced

}

cleanup
cleanup-test

This branch has not been deployed

No deployments
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