Skip to content

Fix test suite compilation and sandbox compatibility - #1485

Merged
frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:patches-from-google
Aug 25, 2026
Merged

frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:patches-from-google

Conversation

@frankslin

Copy link
Copy Markdown
Collaborator
  • Explicitly include <stdlib.h> in test/PortableUtil.hpp. The POSIX functions setenv and unsetenv are declared in <stdlib.h>. Relying on <unistd.h> to transitively include it fails in environments with stricter C++ standards or different libc implementations.
  • Replace hardcoded relative/tmp test output paths with ::testing::TempDir(). This ensures tests do not fail when run concurrently, on read-only filesystems, or within strict build sandboxes (like Bazel test environments).

- Explicitly include <stdlib.h> in test/PortableUtil.hpp. The POSIX functions
  `setenv` and `unsetenv` are declared in <stdlib.h>. Relying on <unistd.h> to
  transitively include it fails in environments with stricter C++ standards or
  different libc implementations.
- Replace hardcoded relative/tmp test output paths with `::testing::TempDir()`.
  This ensures tests do not fail when run concurrently, on read-only
  filesystems, or within strict build sandboxes (like Bazel test environments).
@frankslin
frankslin merged commit fa130de into BYVoid:master Aug 25, 2026
41 checks passed
@frankslin
frankslin deleted the patches-from-google branch August 25, 2026 03:28
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