Skip to content

fix(health): fail TransferBench healthcheck test when TransferBench reports a failure - #688

Open
paklui wants to merge 2 commits into
ROCm:mainfrom
paklui:fix/tb-healthcheck-fail-detection
Open

paklui wants to merge 2 commits into
ROCm:mainfrom
paklui:fix/tb-healthcheck-fail-detection

Conversation

@paklui

@paklui paklui commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

test_transfer_bench_healthcheck only ran scan_test_results, whose patterns ("test FAIL ", "ABORT", ...) do not match TransferBench's healthcheck lines such as "Testing all-to-all XGMI copies ........FAIL (56 test(s))".
TransferBench has non-0 exit code was not checked either, and the Run Deck capture is best-effort, so a failing healthcheck was reported as a pytest pass.

Run the healthcheck with orch.exec(detailed=True) and fail the test on a non-0 exit code.
The healthcheck preset exits non-0 when any sub-test fails or when it cannot run
(for example on an unsupported GPU model).
Failed sub-tests are named from the "Testing ... FAIL (N test(s))" lines.

We have seen on MI300X with TransferBench v1.67.00 and v1.71.00 that all-to-all XGMI copies failed on 56 of 56 pairs
(exit code 2, also through the sudo -n bash -c wrapper), however the CVS test passed.

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

…eports a failure

test_transfer_bench_healthcheck only ran scan_test_results, whose patterns
("test FAIL ", "ABORT", ...) do not match TransferBench's healthcheck verdict
lines such as "Testing all-to-all XGMI copies ........FAIL (56 test(s))".
TransferBench's non-zero exit code was not checked either, and the Run Deck
capture is best-effort, so a failing healthcheck was reported as a pytest pass.

Run the healthcheck with orch.exec(detailed=True) and fail the test on a
non-zero exit code. The healthcheck preset exits non-zero when any sub-test
fails or when it cannot run (for example on an unsupported GPU model). Failed
sub-tests are named from the "Testing ... FAIL (N test(s))" lines.

Seen on MI300X with TransferBench v1.67.00 and v1.71.00: all-to-all XGMI
copies failed on 56 of 56 pairs (exit code 2, also through the
"sudo -n bash -c" wrapper), but the CVS test passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 21:37

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

Sharded SSH can crash on structured results or pass when hosts are missing, and Run Deck can misclassify nonzero exit codes as passes.

3 open issues
What changed in this PR

This PR updates CVS’s TransferBench healthcheck to detect failures that the generic output scanner misses, using command exit codes and named sub-test failures.

Changes:

  • Request detailed execution results and validate healthcheck outcomes.
  • Add unit tests for passing, failing, and verbose output, plus detailed-result forwarding.
  • Document the corrected failure behavior in the changelog.
File Description
cvs/​tests/​health/​transferbench_cvs.py Collect detailed results and check healthcheck failures.
cvs/​lib/​unittests/​test_transferbench_health.py Add healthcheck parsing and execution-option coverage.
CHANGELOG.md Describe the healthcheck failure-detection fix.

Review effort: Balanced

Comment thread cvs/tests/health/transferbench_cvs.py Resolved
Comment thread cvs/tests/health/transferbench_cvs.py Resolved
Comment thread cvs/tests/health/transferbench_cvs.py Resolved
…esults

Address review feedback on the TransferBench healthcheck exit-code check:

- Pass print_console=False when run_transferbench requests detailed
  results. With SSH sharding (more than CVS_HOSTS_PER_SHARD hosts), the
  merged-output logger calls .splitlines() on each result and fails on the
  {output, exit_code} dicts. The healthcheck test logs the output itself
  through print_test_output.
- Fail every expected host (orch.hosts) that has no result. Sharded runs
  send commands only to reachable hosts, so a host pruned during an earlier
  probe was absent from the results and the healthcheck passed without
  running there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 23:36

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.

🔵 Needs a closer look

Run Deck can report exit-code failures as passes, and no integration test verifies that recorded failures propagate to the pytest outcome.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Add integration test for healthcheck failure propagation

cvs/​tests/​health/​transferbench_cvs.py:566

Please add an integration-level unit test that calls test_transfer_bench_healthcheck with a mocked orchestrator and checks the actual pytest outcome for both zero and non-zero exits. The new tests mock fail_test and exercise the parser and command helper separately, so they do not verify that this call propagates a recorded failure through update_test_result; a wiring regression could restore the original false pass without failing them.

2 resolved since last review

Review effort: Balanced

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