Skip to content

Build the gtest helper libraries again - #837

Merged
rkennke merged 2 commits into
mainfrom
build/gtest-native-libs
Oct 5, 2026
Merged

rkennke merged 2 commits into
mainfrom
build/gtest-native-libs

Conversation

@rkennke

@rkennke rkennke commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?:

Sets nativeLibsSourceDir and nativeLibsOutputDir in the ddprof-lib gtest block, so buildNativeLibs runs again and builds the helper DSOs under src/test/resources/native-libs before the gtest tasks.

Motivation:

buildNativeLibs has been skipped on every build since the Kotlin build-logic migration (#358). Its onlyIf requires both directory properties, but neither has a convention and ddprof-lib never set them. So the helper libraries (reladyn-lib, small-lib, unresolved-functions) were never built, and tests that depend on them found them missing and exited early.

The fix for PROF-16135 (stacked on this PR) adds a gtest that needs such a DSO. That's what turned this up.

Additional Notes:

  • Every Linux gtest task already depends on buildNativeLibs. Its Makefiles hardcode gcc/g++, and the task throws if any Makefile fails. These libraries have not been built on aarch64, musl or the sanitizer images since Migrate build system to Kotlin build-logic #358, so this PR's CI run is the first time they are. Please watch those jobs in particular.
  • This does not make elfparser_ut's resource tests run. They resolve their DSOs relative to the working directory (cwd/../build/...), which doesn't match under Gradle (cwd is ddprof-lib), so they still bail out with exit 0. That's a separate, pre-existing issue, left for a follow-up.

How to test the change?:

./gradlew :ddprof-lib:gtestDebug -i now shows > Task :ddprof-lib:buildNativeLibs executing instead of SKIPPED, and the DSOs appear under ddprof-lib/build/test/resources/native-libs/. Verified locally on linux-x64 (glibc 2.35).

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a security review (run the dd:platform-security-review
    skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: PROF-16135

🤖 Generated with Claude Code

The gtest plugin's buildNativeLibs task builds the helper DSOs under
src/test/resources/native-libs, but its onlyIf requires
nativeLibsSourceDir and nativeLibsOutputDir to be set, and neither has a
convention nor was set by ddprof-lib. The task has therefore been
skipped since the move to the Kotlin build-logic (#358), and tests that
need those DSOs found them missing and exited early.

Set both directories in the ddprof-lib gtest block so the DSOs are
built before the gtest tasks run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rkennke
rkennke requested a review from a team as a code owner October 5, 2026 14:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4d2382edc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ddprof-lib/build.gradle.kts

@datadog-prod-us1-6 datadog-prod-us1-6 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The added source and output directories satisfy the existing buildNativeLibs contract and restore helper DSO generation before Linux gtest tasks.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit f4d2382 · @DataDog review to ask questions

The CI gtest jobs run buildGtest{Config}, which only compiles and links,
and then execute the binaries directly. buildNativeLibs was wired only
into the gtest{Config}_{Test} run tasks, so those jobs never built the
helper DSOs the binaries load. Make buildGtest{Config} depend on it as
well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dd-octo-sts

dd-octo-sts Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #37331869958 | Commit: cf5c019 | Duration: 16m 30s (longest job)

✅ All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - ✅ - -
8-ibm - ✅ - -
8-j9 ✅ ✅ - -
8-librca - - ✅ ✅
8-orcl - ✅ - -
11 - ✅ - -
11-j9 ✅ ✅ - -
11-librca - - ✅ ✅
17 ✅ ✅ - -
17-graal ✅ ✅ - -
17-j9 ✅ ✅ - -
17-librca - - ✅ ✅
21 ✅ ✅ - -
21-graal ✅ ✅ - -
21-librca - - ✅ ✅
25 ✅ ✅ - -
25-graal ✅ ✅ - -
25-librca - - ✅ ✅

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-10-05 15:40:56 UTC

@dd-octo-sts

dd-octo-sts Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

✅ All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 b1154b92

@dd-octo-sts

dd-octo-sts Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Reliability & Chaos Results

✅ All reliability & chaos checks passed Pipeline: https://gitlab.ddbuild.io/DataDog/java-profiler/-/pipelines/142411689

@rkennke
rkennke merged commit 46ade41 into main Oct 5, 2026
115 checks passed
@rkennke
rkennke deleted the build/gtest-native-libs branch October 5, 2026 16:48
@github-actions github-actions Bot added this to the 1.52.0 milestone Oct 5, 2026
@rkennke
rkennke restored the build/gtest-native-libs branch October 5, 2026 16:48
@rkennke
rkennke deleted the build/gtest-native-libs branch October 5, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant