Skip to content

[DRAFT][rocgdb] Test filter standardization#170

Draft
dileepr1 wants to merge 2 commits into
amd-stagingfrom
users/dravindr/tf_rocgdb
Draft

[DRAFT][rocgdb] Test filter standardization#170
dileepr1 wants to merge 2 commits into
amd-stagingfrom
users/dravindr/tf_rocgdb

Conversation

@dileepr1

Copy link
Copy Markdown

Draft / WIP — opened to exercise CI against the paired TheRock branch. Do not merge as-is: THEROCK_COMMIT_REF in the workflows points at a feature branch and must be reverted to a pinned ROCm/TheRock SHA before merge.

Summary

Adopts TheRock's test-filter standardization (RFC0010) for ROCgdb, keeping all component-specific logic in this repo. TheRock stays component-agnostic — it only invokes its generic test_runner.py.

New sibling files under gdb/testsuite/ (installed verbatim by TheRock's existing testsuite install rule to tests/rocgdb/gdb/testsuite/):

  • test_categories.yaml — source of truth for the quick/standard/comprehensive/full tiers (DejaGnu .exp selection, labels, timeouts).
  • test_rocgdb.py — the DejaGnu launcher with a --tier flag (honours TEST_TYPE); self-locates rocgdb + testsuite from __file__ when run by ctest from the install tree.
  • gen_ctestfile.py — dev tool that regenerates CTestTestfile.cmake from the YAML.
  • CTestTestfile.cmake — pre-generated + committed; one add_test() per tier; each invokes test_rocgdb.py --tier <name> via a relative path (ctest sets the working directory to the test dir).

Workflows now invoke test_runner.py with TEST_COMPONENT=rocgdb / TEST_TYPE=standard instead of a per-component script.

Pairing

Paired with TheRock branch users/dravindr/tr_rocgdb, whose net footprint is just:

  • fetch_test_configurations.py: rocgdb job → test_runner.py
  • test_runner.py: a single COMPONENT_OVERRIDES["rocgdb"] entry → tests/rocgdb/gdb/testsuite

THEROCK_COMMIT_REF in therock-ci-linux.yml and therock-test-packages.yml is temporarily set to users/dravindr/tr_rocgdb so this draft builds/tests against that paired state.

Flow

workflow → test_runner.py (TheRock, generic)
        → ctest -L <tier> --test-dir tests/rocgdb/gdb/testsuite
            → CTestTestfile.cmake (ROCgdb-owned)
                → ./test_rocgdb.py --tier <name> (ROCgdb-owned)
                    → reads ./test_categories.yaml → make check TESTS=...

Test plan

  • TheRock CI Linux build (gfx94X-dcgpu) succeeds against tr_rocgdb
  • Run Tests job exercises ctest -L standardtest_rocgdb.py --tier standard (GCC + LLVM matrix)
  • Revert THEROCK_COMMIT_REF to a pinned ROCm/TheRock SHA before un-drafting

🤖 Generated with Cursor

Made with Cursor

@dileepr1 dileepr1 changed the title [DRAFT][rocgdb] Test filter standardization (RFC0010) [DRAFT][rocgdb] Test filter standardization Jun 12, 2026
@dileepr1 dileepr1 force-pushed the users/dravindr/tf_rocgdb branch from c589eb6 to c670cb0 Compare June 12, 2026 22:13

@lumachad lumachad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR. Some preliminary comments. I think it's mostly OK, pending adjusting location of files, lists of tests and validation.

Comment thread .github/workflows/therock-ci-linux.yml Outdated
Comment thread .github/test-runner/CTestTestfile.cmake
Comment thread .github/workflows/therock-test-packages.yml
Comment thread .github/test-runner/test_categories.yaml
@lumachad

Copy link
Copy Markdown
Collaborator

Thanks for the updates. Let me go through this again.

@lumachad

Copy link
Copy Markdown
Collaborator

Let's wait until #117 gets merged, as that one has a large change to test_rocgdb.py. Since this one touches that same script, we should avoid needless conflict resolution cycles.

@lumachad

Copy link
Copy Markdown
Collaborator

#117 has been merged. I think we can rebase the changes in this PR on top of current test_rocgdb.py.

dileepr1 and others added 2 commits June 22, 2026 10:39
Add a --tier {quick,standard,comprehensive,full} option to
.github/scripts/test_rocgdb.py (mutually exclusive with
--tests/--gpu-tests/--cpu-tests, defaults to the TEST_TYPE env var). When set,
test_patterns from .github/test-runner/test_categories.yaml are expanded (with
fnmatch excludes) into the concrete .exp list.

The non-upstream test-filter files live under .github/test-runner/ to keep
ROCgdb close to upstream:
  - test_categories.yaml  : source of truth for the tiers
  - gen_ctestfile.py      : dev tool that regenerates CTestTestfile.cmake
  - CTestTestfile.cmake   : maps each tier to ../../test_rocgdb.py --tier <name>

TheRock installs these next to the testsuite via EXISTS-guarded rules
(paired branch users/dravindr/tr_rocgdb, ROCm/TheRock#5917).

Co-authored-by: Cursor <cursoragent@cursor.com>
Temporary validation scaffolding (to be removed before merge; the TheRock-side
PR will own the trigger post multi-arch CI migration):
  - Point THEROCK_COMMIT_REF at the paired branch users/dravindr/tr_rocgdb.
  - Run TheRock's generic test_runner.py with TEST_COMPONENT=rocgdb and
    TEST_TYPE=quick (the curated smoke tier finishes within the job timeout),
    and restore THEROCK_BIN_DIR so test_runner.py can derive ROCM_PATH and the
    ctest --test-dir.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dileepr1 dileepr1 force-pushed the users/dravindr/tf_rocgdb branch from 173f18d to 014312a Compare June 22, 2026 15:39
@lumachad

Copy link
Copy Markdown
Collaborator

@dileepr1 Thanks. Let me go through this again and see what we should put into the test categories.

@lumachad

Copy link
Copy Markdown
Collaborator

@dileepr1 With rocgdb testing we have both CPU and GPU tests that must be routed to the appropriate runners to make the best use of resources. Can these filters handle that?

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