Skip to content

Make child-process tests portable across operating systems - #12355

Open
AlexeyKuznetsov-DD wants to merge 4 commits into
masterfrom
alexeyk/pure-java-test-commands
Open

Make child-process tests portable across operating systems#12355
AlexeyKuznetsov-DD wants to merge 4 commits into
masterfrom
alexeyk/pure-java-test-commands

Conversation

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor

What Does This Do

Adds PortableCommand so tests can run echo, cat, sleep, and a non-terminating command without OS-specific call sites. POSIX keeps native utilities; Windows uses a small child JVM.

Migrates ProcessSupervisorTest and ShellCommandExecutorTest to the portable commands.

Motivation

Make child-process tests OS-independent without relying on Windows shell builtins or changing existing POSIX behavior.

Additional Notes

Validated the helper on the default JVM and Java 8, plus both migrated test classes: 43 focused test executions passed.

Contributor Checklist

Jira ticket: N/A

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added comp: testing Testing tag: no release notes Changes to exclude from release notes type: refactoring tag: ai generated Largely based on code generated by an AI or LLM labels Aug 31, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Aug 31, 2026
@datadog-prod-us1-6

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.74 s 14.64 s [-0.2%; +1.6%] (no difference)
startup:insecure-bank:tracing:Agent 13.57 s 13.66 s [-1.3%; +0.0%] (no difference)
startup:petclinic:appsec:Agent 15.73 s 16.73 s [-11.3%; -0.6%] (unstable)
startup:petclinic:iast:Agent 16.88 s 16.89 s [-0.8%; +0.7%] (no difference)
startup:petclinic:profiling:Agent 16.50 s 16.87 s [-3.4%; -1.0%] (maybe better)
startup:petclinic:sca:Agent 16.90 s 16.67 s [+0.4%; +2.3%] (maybe worse)
startup:petclinic:tracing:Agent 16.04 s 16.10 s [-1.4%; +0.7%] (no difference)

Commit: 0d673408 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD removed the tag: ai generated Largely based on code generated by an AI or LLM label Sep 1, 2026
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD marked this pull request as ready for review September 1, 2026 23:11
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested review from a team as code owners September 1, 2026 23:11
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested review from dougqh and removed request for a team September 1, 2026 23:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T23:16:44.721286Z 2562626 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 256262607b

ℹ️ 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".

Comment thread utils/test-utils/src/main/java/datadog/trace/test/util/PortableCommandRunner.java Outdated

@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.

Datadog Autotest: FAIL

The new echo helper changes valid values across operating systems. POSIX treats option-like values as flags, and Windows can write non-ASCII text in a charset that the migrated consumer does not use.

Open Bits AI session

🤖 Datadog Autotest · Commit 2562626 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Comment thread utils/test-utils/src/main/java/datadog/trace/test/util/PortableCommandRunner.java Outdated

@dougqh dougqh 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 see the bots have a few suggestions, but overall, this looks good to me.

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

I see the bots have a few suggestions, but overall, this looks good to me.

Yep, I will process suggestions from bot before merge.

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

Labels

comp: testing Testing tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants