← Back to Pull requests

e2e: distill common test functionality to `lib/test.bash`. #768

Closed
unknown closed this pull request without merging on Aug 28, 2026 12:22 UTC
View on GitHub
unknown unknown commented on Aug 26, 2026 14:27 UTC
Author

This patch set refactors existing test cases by

  • looking for common or very similar functionality,

  • distilling them out to a new shared shell scriptlet library lib/test.bash,

  • reworking affected test cases to use the newly added test function
  • The PR is split to commits to "identify one refactorable function or functions related to the same test or same functionality to be tested, distill out common functionality, then refactor the affected tests to use the new common functions, putting each such change to a separate commit". Moreover, separate sweeps over the n4c16, n4c128, n6-hbm-cxl, and s8c4k topology test sets are split to separate commits.

    Here is the summary of logical changes made.

  • add lib/test.bash test helper library

  • add retry-until polling helper

  • add pod and namespace cleanup helpers, use in balloons tests

  • use the cleanup helpers in topology-aware tests

  • add expect-launch-failure helper

  • add wait-pod-gone helper

  • add container state and creation error helpers

  • add plugin log retrieval helpers

  • add plugin log assertion helpers

  • add node extended resource helpers

  • add CPU list arithmetic helpers

  • add container cpuset lookup helpers

  • add interrupt affinity test helpers

  • add scheduling class verification helper

  • add policy configuration status helpers

  • add helm-reconfigure and patch-policy-config

  • add CLOS and CPU frequency assertion helpers

  • add node reboot, kernel command line and NUMA helpers

  • move the node resource topology helpers to the shared library

  • move the metrics helpers to the shared library

  • fix pod names in test07-maxballoons error messages

  • add relaunch-policy helper

  • document the shared test helpers

  • drop the unused cleanup function of test17-cstates-scheduling

  • use the cleanup helpers in the n6-hbm-cxl tests

  • use the shared NRT helpers in the n6-hbm-cxl tests

  • distil the memory type verifications of the n6-hbm-cxl tests

  • add CPU hot-plug helpers

  • add kernel version and kubepods cpuset check helpers

  • use the existing shared helpers in the s8c4k tests

  • use the shared helpers in the n4c128 test

  • distil the repeated loops of the n4c128 test

  • stop deleting namespaces the n4c128 test never creates
  • The full test set still passes after these changes.

    Diff: 287 lines (+215 / -72) across 3 files Reviewer: kad Review duration: 2755m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 287 lines diff across 3 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.339
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #768"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.8% (MEDIUM) · Higher = larger blast radius
    44.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.7% · Safe to merge
    17.7%