Skip to content

[debug-tools/rocr-debug-agent] Enable rocr-debug-agent CI tests - #2859

Merged
lumachad merged 2 commits into
mainfrom
users/lumachad/therock/rocr-debug-agent-tests
Feb 9, 2026
Merged

lumachad merged 2 commits into
mainfrom
users/lumachad/therock/rocr-debug-agent-tests

Conversation

@lumachad

@lumachad lumachad commented Jan 12, 2026 •

Copy link
Copy Markdown
Contributor

Enable CI tests for the rocr-debug-agent component.

These should run in as many GPU targets as possible and they tend to run fairly quickly (less than 2 minutes).

The testing script tries to be a bit more robust to prevent spurious failures. For instance, if a run fails, it attempts to run the tests 2 more times by default, with an increasing delay between the runs.

@lumachad lumachad self-assigned this Jan 12, 2026
@lumachad lumachad added the enhancement New feature or request label Jan 12, 2026
@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch 5 times, most recently from 6d4aae5 to a67f5a1 Compare January 13, 2026 11:09
@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch from a67f5a1 to 842bba7 Compare January 13, 2026 13:21
@jayhawk-commits

Copy link
Copy Markdown
Contributor

This could be an opportunity to include the python script being called through a module import or similar, instead of a python launch within this python script via subprocess.

@lumachad

Copy link
Copy Markdown
Contributor Author

This could be an opportunity to include the python script being called through a module import or similar, instead of a python launch within this python script via subprocess.

Ok. But that requires some rework in debug agent. Let me get the tests running reliably in CI first, and then I can look into that.

@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch 5 times, most recently from 9b63e5e to 3b5b9a2 Compare January 21, 2026 08:20
@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch from 3b5b9a2 to 1960925 Compare January 27, 2026 11:14
@lumachad
lumachad marked this pull request as ready for review January 27, 2026 17:51
@lumachad

Copy link
Copy Markdown
Contributor Author

I haven't yet explored the python module idea as that requires changes to the rocr-debug-agent itself (the run_test.py script). I think we could do this post-migration to rocm-systems. Or even before. But I wanted to get tests going sooner rather than later.

@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch from 1960925 to 88c95f6 Compare January 27, 2026 23:41
@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch 2 times, most recently from 9d291b9 to a676387 Compare January 29, 2026 10:09
@lumachad lumachad changed the title [rocr-debug-agent] Enable CI tests [debug-tools/rocr-debug-agent] Enable CI tests Jan 30, 2026
@lumachad lumachad changed the title [debug-tools/rocr-debug-agent] Enable CI tests [debug-tools/rocr-debug-agent] Enable rocr-debug-agent CI tests Jan 30, 2026
@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch from a676387 to a640efa Compare February 2, 2026 10:32
@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch from a640efa to 5383305 Compare February 5, 2026 09:19
@lumachad
lumachad requested a review from geomin12 February 5, 2026 09:34
@lumachad

lumachad commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

I have reworked the testing script a little. Mostly refactoring, removing emojis, formatting output etc. This script only tests the rocr-debug-agent.

working_dir: Path,
test_bin_dir: Path,
env_vars: Optional[Dict[str, str]] = None,
max_retries: int = 3,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's avoid retries at initial implementation.

if we see flaky issues that need retries, we can add it then but let's get tests working and actually see its behavior

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd rather keep it. The reasoning here is we definitely don't want to fail other components' PR's due to random timeouts on busy GPU's at the time of testing. I've checked this in practice and I think it will work to our favor.

I can default to 1 if you'd like, but from experience I wouldn't do that. We might have to come back and readjust it.

This test takes about 11s on a single GPU system, so I don't think it is a big impact.

Comment on lines +317 to +319
logger.info(f"Test Binary: {rocr_debug_agent_test_bin}")
logger.info(f"Test Script: {rocr_debug_agent_test_script}")
logger.info(f"Test Bin Dir: {test_bin_dir}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can remove if not used? can't tell if these are debug logs or meant to be here.

if meant to be here, maybe we can combine in one log?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since we'll be running these tests constantly with every PR, the output is an important part of the testing script. We (component owners) would like to know exactly what is going on during a test run, so we can track down issues and address them quickly.

The reasoning here is once something fails, we don't get a second chance to run it. So we might as well capture as much information as possible (paths, invocations, timing etc).

Also, as mentioned before, this testing script should also be used by testers/developers.

@lumachad
lumachad requested a review from geomin12 February 6, 2026 08:04
@lumachad

lumachad commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

@geomin12 Alternatively, if the testing script is deemed too complex to live in TheRock, I can take it somewhere else and invoke it from TheRock. Does that sound like a better alternative? The functionality would be the same, but we'd need to incorporate the testing script in the project first.

These should run in as many GPU targets as possible and they tend to run
fairly quickly (less than 2 minutes).

The testing script tries to be a bit more robust to prevent spurious
failures. For instance, if a run fails, it attempts the run the tests 2
more times by default, with an increasing delay between the runs.
- Move argument parsing to the top.
- Use Path separator as opposed to explicit slashes.
@lumachad
lumachad force-pushed the users/lumachad/therock/rocr-debug-agent-tests branch from 9e84554 to 7141fc7 Compare February 9, 2026 08:41
@lumachad
lumachad requested a review from amd-shahab February 9, 2026 15:57
@geomin12

geomin12 commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@geomin12 Alternatively, if the testing script is deemed too complex to live in TheRock, I can take it somewhere else and invoke it from TheRock. Does that sound like a better alternative? The functionality would be the same, but we'd need to incorporate the testing script in the project first.

no it should be completely okay here! would rather have all the test scripts live together in one place!

@geomin12 geomin12 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i was unaware this may be used for local developers, so the extra arguments and color makes sense!

a lot of failures are occurring today due to github issues, but it works here: https://github.com/ROCm/TheRock/actions/runs/21818081510/job/62953984542?pr=2859

lgtm! thanks for the clarification replies :)

@lumachad

lumachad commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

@lumachad
lumachad merged commit 9afd55e into main Feb 9, 2026
81 of 88 checks passed
@lumachad
lumachad deleted the users/lumachad/therock/rocr-debug-agent-tests branch February 9, 2026 23:21
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Feb 9, 2026
@marbre

marbre commented Feb 11, 2026

Copy link
Copy Markdown
Member

@lumachad rocr-debug-agent is failing in multi-arch CI which we run on post-submit. This needs to be addressed in a follow up, I file an issue.

@marbre

marbre commented Feb 11, 2026

Copy link
Copy Markdown
Member

Filed #3373.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants