Skip to content

SWDEV-545553 - Improve clarity and robustness of CALLBACK unit tests - #546

Merged
ethtrinh merged 3 commits into
developfrom
import/develop/ROCm_hip-tests/pr-510
Mar 3, 2026
Merged

ethtrinh merged 3 commits into
developfrom
import/develop/ROCm_hip-tests/pr-510

Conversation

@systems-assistant

Copy link
Copy Markdown
Contributor

Associated JIRA ticket number/Github issue number

SWDEV-545553

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Continuous Integration

What were the changes?

  • Assign hipKernelNameRefByPtr results to variables before assertions for better readability and debuggability.
  • Add additional assertions to check that returned kernel names are non-empty and contain the expected substring.
  • Refactor negative tests to consistently assign and check results.

Why are these changes needed?

  • Makes the test logic clearer by assigning the result to a named variable.
  • Makes it easier to debug if a test fails because the variable allows you to inspect or print its value.
  • Includes additional cases for the test.
  • Showcases copilots ability to improve unit tests.

Updated CHANGELOG?

  • Yes
  • No, Does not apply to this PR.

Added/Updated documentation?

  • Yes
  • No, Does not apply to this PR.

Additional Checks

  • I have added tests relevant to the introduced functionality, and the unit tests are passing locally.
  • Any dependent changes have been merged.

🔁 Imported from ROCm/hip-tests#510
🧑‍💻 Originally authored by @rocm-devops

SwRaw pushed a commit that referenced this pull request Aug 19, 2025
* PCS test: cast agent name to str

[ROCm/rocprofiler-sdk commit: 2d89363]
@rakesroy rakesroy added the STRESS_TEST_INITIATED PR Taken For CQE Stress Testing label Sep 3, 2025
jharryma pushed a commit that referenced this pull request Sep 12, 2025
* PCS test: cast agent name to str
@rakesroy

Copy link
Copy Markdown
Contributor

Stress test passed for PSDB build Linux# 1896, Windows# 9455

ammallya pushed a commit that referenced this pull request Nov 17, 2025
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.3.0 to 2.5.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.3.0...2.5.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.5.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
ammallya pushed a commit that referenced this pull request Nov 18, 2025
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.3.0 to 2.5.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.3.0...2.5.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.5.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

[ROCm/amdsmi commit: 28e577f]
ammallya pushed a commit that referenced this pull request Nov 21, 2025
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.3.0 to 2.5.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.3.0...2.5.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.5.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

[ROCm/amdsmi commit: 28e577f]
ammallya pushed a commit that referenced this pull request Jan 30, 2026
* CMakeLists - Set Std updates

* Jenkins - Code coverage

* Jenkins - Fix and cleanup

* Jenkins - Fix

* Jenkins - Fix

* Jenkins - Fix

* Jenkins - Fix

* Use amdclang compiler

* Remove slash in front of quote

* Jenkins - Fix

* Jenkins - Fix location

* Jenkins - Fix perf export

* Jenkins - .so fix

* Jenkins - lcov

* Install fix

* Use repo token for codecov

* Pass in sha to codecov

* Use clang19 for ubu24

* Use default clang

* CMakeLists - Set Std updates

* Jenkins - Code coverage

* Jenkins - Fix and cleanup

* Jenkins - Fix

* Jenkins - Fix

* Jenkins - Fix

* Jenkins - Fix

* Use amdclang compiler

* Remove slash in front of quote

* Jenkins - Fix

* Jenkins - Fix location

* Jenkins - Fix perf export

* Jenkins - .so fix

* Jenkins - lcov

* Install fix

* Use repo token for codecov

* Pass in sha to codecov

* Use clang19 for ubu24

* Use default clang

* Set proxy for codecov uploader

Needed for gfx90a

---------

Co-authored-by: Sam Wu <22262939+samjwu@users.noreply.github.com>
ammallya pushed a commit that referenced this pull request Jan 30, 2026
* CMakeLists - Set Std updates

* Jenkins - Code coverage

* Jenkins - Fix and cleanup

* Jenkins - Fix

* Jenkins - Fix

* Jenkins - Fix

* Jenkins - Fix

* Use amdclang compiler

* Remove slash in front of quote

* Jenkins - Fix

* Jenkins - Fix location

* Jenkins - Fix perf export

* Jenkins - .so fix

* Jenkins - lcov

* Install fix

* Use repo token for codecov

* Pass in sha to codecov

* Use clang19 for ubu24

* Use default clang

* CMakeLists - Set Std updates

* Jenkins - Code coverage

* Jenkins - Fix and cleanup

* Jenkins - Fix

* Jenkins - Fix

* Jenkins - Fix

* Jenkins - Fix

* Use amdclang compiler

* Remove slash in front of quote

* Jenkins - Fix

* Jenkins - Fix location

* Jenkins - Fix perf export

* Jenkins - .so fix

* Jenkins - lcov

* Install fix

* Use repo token for codecov

* Pass in sha to codecov

* Use clang19 for ubu24

* Use default clang

* Set proxy for codecov uploader

Needed for gfx90a

---------

Co-authored-by: Sam Wu <22262939+samjwu@users.noreply.github.com>

[ROCm/rocdecode commit: 5eab03d]
@jayhawk-commits
jayhawk-commits requested a review from a team as a code owner February 26, 2026 21:19
@ethtrinh
ethtrinh merged commit af21cd4 into develop Mar 3, 2026
23 checks passed
@ethtrinh
ethtrinh deleted the import/develop/ROCm_hip-tests/pr-510 branch March 3, 2026 16:22
systems-assistant Bot added a commit to ROCm/hip-tests that referenced this pull request Mar 3, 2026
 unit tests (#546)

Co-authored-by: ethtrinh <Ethan.Trinh@amd.com>
Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
[rocm-systems] ROCm/rocm-systems#546 (commit af21cd4)
dgaliffiAMD pushed a commit that referenced this pull request Aug 11, 2026
…eration failure (#9044)

## Motivation

`ROCPROFSYS_MAX_THREADS` is a compile time constant that is the core of
the `thread-limit` tests. For this test to work on TheRock, we need a
way to get the compile time value at runtime and run the test with it.
The idea here is to store it within `rocprof-sys-avail`, then read it
and run the test against that value.

## Technical Details

**Regarding thread-limit**
- Store `ROCPROFSYS_MAX_THREADS` in `rocprof-sys-avail`. Accessed using
`rocprof-sys-avail --max-threads`.
- Make` test_categories.yaml` copied to build folder during build time,
not configure time.
- Gate per thread finalization logs on `ROCPROFSYS_VERBOSE>0` or in
causal mode.
- This gets rid of some of the many logs that would be seen during this
test. I will be leaving the messages that say:
`[SIG27] Sampler for thread <N> will be triggered 250.0x per second of
CPU-time (every 4.000e+00 milliseconds)... `

**Regarding silent failure**:
- CTest generation step has been silently failing on TheRock regarding
thread-limit test as the `pytest.exit(0)` would mask any error during
generation. To fix this, we detect any collection errors and report
them, failing the build.
- Moved `get_thread_limit()` into the `test` definition itself.
Evaluating it during build (during CTesttestfile.cmake generation step)
would cause a failure in TheRock CI.

## Issue Tracking

Jira ID: AIPROFSYST-523
Jira ID: AIPROFSYST-656
Jira ID: ROCM-29285

## Test Plan

Examining TheRock CI workflow to see that the test ran and passed.

## Test Result

Ongoing.

Test passes in TheRock CI:
https://github.com/ROCm/rocm-systems/actions/runs/30031596021/job/89312443869?pr=9044
```
        Start 546: thread-limit-half-sampling
420/498 Test #546: thread-limit-half-sampling ......................................................................................................................................................   Passed    4.60 sec
        Start 547: thread-limit-half-binary-rewrite
421/498 Test #547: thread-limit-half-binary-rewrite ................................................................................................................................................   Passed    5.49 sec
        Start 548: thread-limit-half-runtime-instrument
422/498 Test #548: thread-limit-half-runtime-instrument ............................................................................................................................................   Passed    7.47 sec
        Start 549: thread-limit-half-sys-run
423/498 Test #549: thread-limit-half-sys-run .......................................................................................................................................................   Passed    4.63 sec
        Start 550: thread-limit-at-limit-sampling
424/498 Test #550: thread-limit-at-limit-sampling ..................................................................................................................................................   Passed    7.57 sec
        Start 551: thread-limit-at-limit-binary-rewrite
425/498 Test #551: thread-limit-at-limit-binary-rewrite ............................................................................................................................................   Passed    8.40 sec
        Start 552: thread-limit-at-limit-runtime-instrument
426/498 Test #552: thread-limit-at-limit-runtime-instrument ........................................................................................................................................   Passed   11.47 sec
        Start 553: thread-limit-at-limit-sys-run
427/498 Test #553: thread-limit-at-limit-sys-run ...................................................................................................................................................   Passed    7.76 sec
        Start 554: thread-limit-exhausted-sampling
428/498 Test #554: thread-limit-exhausted-sampling .................................................................................................................................................   Passed    8.72 sec
        Start 555: thread-limit-exhausted-binary-rewrite
429/498 Test #555: thread-limit-exhausted-binary-rewrite ...........................................................................................................................................   Passed    9.85 sec
        Start 556: thread-limit-exhausted-runtime-instrument
430/498 Test #556: thread-limit-exhausted-runtime-instrument .......................................................................................................................................   Passed   12.59 sec
        Start 557: thread-limit-exhausted-sys-run
431/498 Test #557: thread-limit-exhausted-sys-run ..................................................................................................................................................   Passed    8.47 sec
```

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
vedithal-amd added a commit that referenced this pull request Aug 21, 2026
- The listing was added by #546 to record what the standalone binary
  bundled. With that build removed, LICENSE.md carries only the MIT text.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vedithal-amd added a commit that referenced this pull request Aug 21, 2026
- The listing was added by #546 to record what the standalone binary
  bundled. With that build removed, LICENSE.md carries only the MIT text.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants