Skip to content

[unittest] Use TempDir() in gtest death-test stream capture on Linux#4962

Open
joker-eph wants to merge 1 commit into
google:mainfrom
joker-eph:tmpdir
Open

[unittest] Use TempDir() in gtest death-test stream capture on Linux#4962
joker-eph wants to merge 1 commit into
google:mainfrom
joker-eph:tmpdir

Conversation

@joker-eph
Copy link
Copy Markdown

@joker-eph joker-eph commented Apr 24, 2026

gtest's CapturedStream on Linux hardcoded /tmp/ for its temp file
without consulting the environment, causing failures in sandboxed
environments where /tmp is read-only. Use TempDir() instead, which
checks TEST_TMPDIR then TMPDIR and falls back to /tmp/, matching the
behavior already present on Android and macOS/iOS.

Assisted-by: Claude Code

gtest's CapturedStream on Linux hardcoded /tmp/ for its temp file
without consulting the environment, causing failures in sandboxed
environments where /tmp is read-only. Use TempDir() instead, which
checks TEST_TMPDIR then TMPDIR and falls back to /tmp/, matching the
behavior already present on Android and macOS/iOS.

Assisted-by: Claude Code
@joker-eph joker-eph changed the title [unittest] Use $TMPDIR in gtest death-test stream capture on Linux [unittest] Use TempDir() in gtest death-test stream capture on Linux Apr 24, 2026
joker-eph added a commit to llvm/llvm-project that referenced this pull request Apr 28, 2026
…194142)

gtest's CapturedStream on Linux hardcoded /tmp/ for its temp file
without consulting the environment, causing failures in sandboxed
environments where /tmp is read-only. Use TempDir() instead, which
checks TEST_TMPDIR then TMPDIR and falls back to /tmp/, matching the
behavior already present on Android and macOS/iOS.

See also upstream PR: google/googletest#4962

Assisted-by: Claude Code
llvm-sync Bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 28, 2026
…e on Linux (#194142)

gtest's CapturedStream on Linux hardcoded /tmp/ for its temp file
without consulting the environment, causing failures in sandboxed
environments where /tmp is read-only. Use TempDir() instead, which
checks TEST_TMPDIR then TMPDIR and falls back to /tmp/, matching the
behavior already present on Android and macOS/iOS.

See also upstream PR: google/googletest#4962

Assisted-by: Claude Code
llvm-upstreamsync Bot pushed a commit to qualcomm/cpullvm-toolchain that referenced this pull request Apr 28, 2026
…e on Linux (#194142)

gtest's CapturedStream on Linux hardcoded /tmp/ for its temp file
without consulting the environment, causing failures in sandboxed
environments where /tmp is read-only. Use TempDir() instead, which
checks TEST_TMPDIR then TMPDIR and falls back to /tmp/, matching the
behavior already present on Android and macOS/iOS.

See also upstream PR: google/googletest#4962

Assisted-by: Claude Code
cpullvm-upstream-sync Bot pushed a commit to navaneethshan/cpullvm-toolchain-1 that referenced this pull request Apr 28, 2026
…e on Linux (#194142)

gtest's CapturedStream on Linux hardcoded /tmp/ for its temp file
without consulting the environment, causing failures in sandboxed
environments where /tmp is read-only. Use TempDir() instead, which
checks TEST_TMPDIR then TMPDIR and falls back to /tmp/, matching the
behavior already present on Android and macOS/iOS.

See also upstream PR: google/googletest#4962

Assisted-by: Claude Code
kirthana14m pushed a commit to ROCm/llvm-project that referenced this pull request Apr 30, 2026
…lvm#194142)

gtest's CapturedStream on Linux hardcoded /tmp/ for its temp file
without consulting the environment, causing failures in sandboxed
environments where /tmp is read-only. Use TempDir() instead, which
checks TEST_TMPDIR then TMPDIR and falls back to /tmp/, matching the
behavior already present on Android and macOS/iOS.

See also upstream PR: google/googletest#4962

Assisted-by: Claude Code
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