WIP: Allow passing command line properties to tests#577
Conversation
…ptions argument to tests
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b67b5cc7d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!isHiddenClass(jvmti, klass) && | ||
| jvmti->GetClassLoader(klass, &cl) == JVMTI_ERROR_NONE && | ||
| isSystemClassLoaders(jni, cl)) { |
There was a problem hiding this comment.
Avoid treating hidden classes as loader-pinned
When a hidden class is defined from ordinary class bytes (for example via Lookup.defineHiddenClass using an application-loader lookup class), GetClassModifiers can return normal class-file modifiers rather than 0/synthetic/bridge, so this condition treats it as a system-loader class and skips GetClassMethods. Later samples store a raw Method* for a class that can still be unloaded independently of the loader, leaving stored traces with stale VM metadata pointers to resolve at dump time.
Useful? React with 👍 / 👎.
| // Profiler options from -Pprofiler.options property | ||
| val profilerOptions = project.findProperty("profiler.options") as String? | ||
| if (profilerOptions != null) { | ||
| allArgs.add("-Dddprof.test.options=$profilerOptions") | ||
| } |
There was a problem hiding this comment.
Pass profiler options to the normal Test tasks
This only wires -Pprofiler.options into the Exec-based paths, but on glibc/macOS the regular test<Config> tasks are created by createTestTask, which never adds -Dddprof.test.options to its JVM args. As a result, the documented/normal workflow such as testDebug -Pprofiler.options=... silently ignores the override unless the user switches to the new testProcess<Config> task or runs on musl.
Useful? React with 👍 / 👎.
|
CI Test ResultsRun: #26971651105 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Failed Testsmusl-amd64/debug / 21-librcaJob: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 17-librcaJob: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 25-librcaJob: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 11-librcaJob: View logs No detailed failure information available. Check the job logs. musl-amd64/debug / 8-librcaJob: View logs No detailed failure information available. Check the job logs. Summary: Total: 32 | Passed: 27 | Failed: 5 Updated: 2026-06-04 18:49:21 UTC |
What does this PR do?:
Motivation:
Additional Notes:
How to test the change?:
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!