Part 7 · Environment & Tests · Intermediate
End-of-Test Hub: Objections, Readiness, and Fail-Fast Shutdown
Hub - objection ownership policy, drain-time strategy, global timeout kill-switch, ready_to_end usage, deterministic end-of-test checklist, and hang triage.
Overview
End-of-test policy is where a verification environment proves that completion and correctness are both deterministic. A good policy prevents false passes, prevents infinite hangs, and leaves enough settle time for late monitor and scoreboard work.
In large regressions, test closure quality matters as much as stimulus quality. The same objection and timeout policy should behave consistently across smoke, stress, and negative tests.
Sub-lessons in this topic
raise-drop-test-policy - who raises objections, who may drop them, and why ownership must stay explicit.
drain-time-env - tuning drain windows so trailing monitor/scoreboard work completes without wasting runtime.
global-timeout-kill - fail-fast watchdog patterns for hung objections and deadlocked protocol threads.
phase-ready-to-end-test - using ready_to_end logic to gate phase closure until checkers are truly quiescent.
end-of-test-checklist - reusable pass/fail closure checklist for every test class.
end-of-test-debug-hangs - deterministic symptom-to-boundary triage for stuck simulations.
End-of-test architecture map
Legend: [UVM] [ENV] [TEST] [CHECK]
[TEST] run_phase owns top-level objection policy
│
├─ raise before main scenario starts
├─ drop after scenario and local completion criteria
└─ optionally set drain_time for trailing checks
│
▼
[ENV] monitors + scoreboards continue ingest/compare tail activity
│
├─ ready_to_end hooks verify queues are drained
├─ check_phase validates final invariants
└─ report_phase summarizes outcomes
│
▼
[UVM] global timeout kill-switch prevents infinite hang
goal: end only when work is complete, fail loudly otherwise[UVM][ENV] closure boundaries
Boundary A: objection ownership
Boundary B: settle/drain latency
Boundary C: checker quiescence
Boundary D: timeout watchdog
Most shutdown bugs are one broken boundary, not random behaviorKey takeaways
Treat end-of-test as architecture, not incidental bookkeeping.
Ownership policy, readiness policy, and timeout policy must be explicit and reviewable.
A single deterministic closure model improves regression reliability and debug speed.
Fail-fast beats silent hangs in CI and nightly farms.
Common pitfalls
Letting arbitrary components raise/drop objections without ownership rules.
Using one oversized drain time to mask unknown late behavior.
Relying only on timeout instead of proving checker quiescence first.
Calling a test pass when no meaningful traffic or checking occurred.