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 Outdated
Comment thread .github/workflows/therock-test-packages.yml Outdated
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
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?

@dileepr1

Copy link
Copy Markdown
Author

@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?

I'll make the changes for this.

@dileepr1
dileepr1 force-pushed the users/dravindr/tf_rocgdb branch from 014312a to 67f7e88 Compare July 1, 2026 14:49
@lumachad

lumachad commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Hi @dileepr1, I don't think we want to push the gpu/cpu part into test_rocgdb.py. It already knows about that via --gpu-tests and --cpu-tests. What we want to support is sharding different types of tests to their required runners.

For instance, for rocgdb we currently have the cpu tests (runs only gdb.dwarf2), gpu tests (runs only gdb.rocm) and soon we will also have the corefile tests. All 3 categories need specific runners. Can we split those at a different level that is not test_rocgdb.py itself?

If so, we wouldn't even need to modify test_rocgdb.py, and we would just modify test_categories.yml to contain that information, like TheRock's test matrix/configuration.

@dileepr1

dileepr1 commented Jul 1, 2026

Copy link
Copy Markdown
Author

Thanks @lumachad, that makes sense.

You're right that the cpu/gpu split already lives at a level above the launcher — it's in TheRock's fetch_test_configurations.py (the rocgdb-cpu / rocgdb-gpu components with their --tests gdb.dwarf2 / --tests gdb.rocm selection and runner assignment). Our --domain addition just duplicated that split down into test_rocgdb.py, which is the wrong layer.

So we'll revert the --domain change and keep test_rocgdb.py generic (using the existing --tests / --gpu-tests / --cpu-tests), leaving the category → runner sharding entirely at the matrix level.

For the standardization part — could you share a sample test_categories.yml in the shape you envision (how you'd express the cpu / gpu / corefile categories, their test sets, runner requirements, and any tiering)? We'll build the framework around the structure you prefer so it lines up with how you'd want TheRock's matrix/config to consume it.

@lumachad

Copy link
Copy Markdown
Collaborator

Hi @dileepr1. I was thinking about this. Given we have our test script (test_rocgdb.py), we can carry on from the approach you've taken of teaching the script about the tiers (quick/standard/comprehensive/full). But we could make the tiers generic and based on the yaml file, such that we could pass --tier .

The distinction here is we will have 3 categories of tests that need to be executed each in distinct runners.

  • (1) GPU tests run on GPU runners
  • (2) GPU corefile tests run on special GPU runners given their corefile-specific settings
  • (3) CPU tests run on GPU-less runners

I think that needs to be taken care of by upper layers. Maybe the workflow or TheRock. So each tier would fire up the tier's tests for each one of the 1/2/3 runners.

We would run something like this for each tier:

  • test_rocgdb.py --tier --gpu (case 1, GPU runners)
  • test_rocgdb.py --tier --corefile (case 2, GPU corefile runners)
  • test_rocgdb.py --tier --cpu (case 3, CPU runners).

Do you think that could work? As for the individual tests for each tier, we would be in charge of determining those. But your initial list is fine for us.

@dileepr1
dileepr1 force-pushed the users/dravindr/tf_rocgdb branch 2 times, most recently from 910aa30 to ce6b3a3 Compare August 4, 2026 16:08
dileepr1 and others added 2 commits August 4, 2026 14:20
…ocgdb

Implements RFC0010 tiered test selection for the rocgdb DejaGnu suite.

test_rocgdb.py:
  - --tier {quick,standard,comprehensive,full} expands test_categories.yaml
    patterns into a concrete .exp list (defaults to the TEST_TYPE env var).
  - --domain {cpu,gpu,corefile,all} narrows a resolved tier into one of three
    disjoint runner categories so TheRock's CI matrix can fan a single tier
    definition out to rocgdb-cpu / rocgdb-gpu / rocgdb-corefile with no test
    running twice:
      cpu      - everything except gdb.rocm/*
      gpu      - gdb.rocm/* minus the corefile tests
      corefile - the gdb.rocm/* tests requiring allow_rocm_core_tests
                 (need GPU runners provisioned for host core dumps)

test_categories.yaml:
  - Defines the four tiers plus a top-level corefile_tests list (the five
    gdb.rocm tests marked `require allow_rocm_core_tests`).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@dileepr1
dileepr1 force-pushed the users/dravindr/tf_rocgdb branch from ce6b3a3 to a0c2ca3 Compare August 4, 2026 19:21
@dileepr1

dileepr1 commented Aug 5, 2026

Copy link
Copy Markdown
Author

@lumachad I've updated the PR as per above, could you re-review please?

@dileepr1
dileepr1 requested a review from lumachad August 5, 2026 19:40
@lumachad

Copy link
Copy Markdown
Collaborator

@lumachad I've updated the PR as per above, could you re-review please?

I have this on my TODO, but have a few things I need to get out of the way first, sorry.

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