[DRAFT][rocgdb] Test filter standardization - #170
Conversation
c589eb6 to
c670cb0
Compare
lumachad
left a comment
There was a problem hiding this comment.
Thanks for the PR. Some preliminary comments. I think it's mostly OK, pending adjusting location of files, lists of tests and validation.
|
Thanks for the updates. Let me go through this again. |
|
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. |
|
#117 has been merged. I think we can rebase the changes in this PR on top of current test_rocgdb.py. |
173f18d to
014312a
Compare
|
@dileepr1 Thanks. Let me go through this again and see what we should put into the test categories. |
|
@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. |
014312a to
67f7e88
Compare
|
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. |
|
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. |
|
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.
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:
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. |
910aa30 to
ce6b3a3
Compare
…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>
ce6b3a3 to
a0c2ca3
Compare
|
@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. |
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 totests/rocgdb/gdb/testsuite/):test_categories.yaml— source of truth for thequick/standard/comprehensive/fulltiers (DejaGnu.expselection, labels, timeouts).test_rocgdb.py— the DejaGnu launcher with a--tierflag (honoursTEST_TYPE); self-locatesrocgdb+ testsuite from__file__when run by ctest from the install tree.gen_ctestfile.py— dev tool that regeneratesCTestTestfile.cmakefrom the YAML.CTestTestfile.cmake— pre-generated + committed; oneadd_test()per tier; each invokestest_rocgdb.py --tier <name>via a relative path (ctest sets the working directory to the test dir).Workflows now invoke
test_runner.pywithTEST_COMPONENT=rocgdb/TEST_TYPE=standardinstead 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.pytest_runner.py: a singleCOMPONENT_OVERRIDES["rocgdb"]entry →tests/rocgdb/gdb/testsuiteTHEROCK_COMMIT_REFintherock-ci-linux.ymlandtherock-test-packages.ymlis temporarily set tousers/dravindr/tr_rocgdbso this draft builds/tests against that paired state.Flow
Test plan
gfx94X-dcgpu) succeeds againsttr_rocgdbRun Testsjob exercisesctest -L standard→test_rocgdb.py --tier standard(GCC + LLVM matrix)THEROCK_COMMIT_REFto a pinnedROCm/TheRockSHA before un-drafting🤖 Generated with Cursor
Made with Cursor