debug-tools: Install rocgdb's sanitizer suppression files #10166
<!-- therock-pr-bot-policy-check -->
✅ All Checks Passed — Ready for Review
| Check | Status | Details |
|---|:---:|---|
| 📝 PR Description | ✅ Pass | — |
| ⛔ Forbidden Files | ✅ Pass | — |
| 🧪 Unit Test | ✅ Pass | PR does not contain code files — Unit Test auto-passed |
| 🔎 pre-commit | ✅ Pass | — |
| 🚫 Draft PR | 🔜 To Be Enabled | — |
| 🚩 Feature Flag | 🔜 To Be Enabled | — |
| 📊 Code Coverage | 🔜 To Be Enabled | — |
| 🤖 therock-pr-bot | ✅ Pass | — |
🎉 All checks passed! This PR is ready for review.
📖 Need help? See the Policy FAQ for details on every check and how to fix failures.
<!-- therock-pr-bot-fix-policies -->
🎉 All checks passed! This PR is ready for review.
Looks reasonable. Thanks.
The "optional" files are mandatory to download. debug-tools/rocgdb/CMakeLists.txt:837-840 says they "are not
required, so they do not make the configuration fail when missing" — but line 864 passes them into
_rocgdb_download_ci_scripts, which hard-fails per file at line 142. So the real semantics are: missing from the
source tree is fine; missing from amd-staging is a FATAL_ERROR that breaks configure for everyone with
DOWNLOAD_CI_SCRIPT=ON. The six names are hardcoded, so renaming or dropping any one .supp in ROCgdb becomes a
TheRock build break. Either download these best-effort (separate loop, message(WARNING) instead of fatal) or
keep the coupling and drop the "not required" framing, because the code doesn't believe it.
lgtm, i asked claude for review and added one comment
Indeed. I've updated the commit to make them best-effort. Please let me know what you think.
Related: https://github.com/ROCm/TheRock/pull/10296, see discussion with @rkayaith at https://github.com/ROCm/TheRock/pull/10296#discussion_r4746502820
Related: #10296, see discussion with @rkayaith at #10296 (comment)
@ScottTodd Thanks for the heads up. Do we have any TheRock-wide initiative for these suppression files? This particular PR attempts to deal with our own corner so we can run debug-tools tests against a sanitizer-built tree.
If we do decide to go with TheRock-wide settings, I don't see a lot of difficulty merging our debug-tools suppression requirements there though.
lancesix
lumachad
Motivation
The rocgdb testsuite reads sanitizer suppression files that the rocgdb test artifact does not install:
gdb/testsuite/lib/gdb.expsetsTSAN_OPTIONS=suppressions=$srcdir/../tsan-suppressions.txt, which resolves totests/rocgdb/gdb/tsan-suppressions.txtin the installed tree. ThreadSanitizer aborts at startup when a suppressions file it was told to use cannot be read, so with a TSan-instrumented rocgdb no test can start rocgdb (ERROR: (eof) GDB never initialized.).test_rocgdb.pyaddssuppressions=<file>to<SANITIZER>_OPTIONSfor the files in asanitizersdirectory next to it, if they exist. Nothing installs them, so they have never been used.Technical Details
All changes are in
debug-tools/rocgdb/CMakeLists.txt, plus the option description and README text.gdb/tsan-suppressions.txttotests/rocgdb/gdb/, and.github/scripts/sanitizers/.supptotests/rocgdb/sanitizers/. The existingtests/*rule inartifact-rocgdb.tomlalready packages them.test_rocgdb.pyand the other CI scripts are missing from the rocgdb source tree andTHEROCK_ROCGDB_DOWNLOAD_CI_SCRIPTisON, download the suppression files with them, from the same amd-staging commit, so they match thetest_rocgdb.pythat reads them. A failed download is a configure error, like for the scripts. A source tree that has the scripts but not the suppression files installs without them.curlgets--create-dirsso thesanitizersdirectory is created.Related: ROCm/ROCgdb#480 adds the ncurses suppression from
gdb/tsan-suppressions.txttosanitizers/tsan.supp. TSan reads a single suppressions file, and the runner's file takes precedence over the onegdb.expadds, so that ROCgdb change should land first, or together with this one.Test Plan
cmake --install --component testsinto a scratch prefix._rocgdb_download_ci_scriptson its own against amd-staging with the three scripts and the six suppression files, into an empty directory.pre-commit run --fileson the changed files.Test Result
.suppfiles andtsan-suppressions.txtinstall to the expected locations, and match the ROCgdb source.sanitizers/.tsan-suppressions.txtin by hand), and the full download path with a rocgdb source tree that lacks the CI scripts.Submission Checklist
🤖 Generated with Claude Code
JIRA ID : AIROCGDB-683