mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4974] [Engine] tests: the three files that set env variables do not compile on Windows (setenv is POSIX) #5274
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5274
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4974
Author: @thatbuzzguy
Created: 11/2/2026
Status: 🔄 Open
Base:
main← Head:fix/windows-test-env-guard📝 Commits (1)
25764b0Tests: the parity and bench files that set env variables do not compile on Windows (setenv is POSIX)📊 Changes
3 files changed (+36 additions, -6 deletions)
View changed files
📝
bench/gdn_chunk_bench.cpp(+10 -2)📝
src/kernels/gdn_chunk_parity.cpp(+10 -2)📝
src/kernels/hc_persist_parity.cpp(+16 -2)📄 Description
Draft — the CUDA-gated targets cannot be compiled here; see Not run.
Problem and result: three files call POSIX setenv/unsetenv, which no Windows C runtime declares:
src/kernels/hc_persist_parity.cpp (lines 55-56), src/kernels/gdn_chunk_parity.cpp,
bench/gdn_chunk_bench.cpp. On Windows the affected targets fail to compile, so ctest never runs
hc_persist_parityorhc_persist_default_off. With the guard all three compile and both entries run.Related discussion: #3093 (closed; the guard it proposed is still not in the file at HEAD). #3093 covers
only hc_persist_parity.cpp — the other two files make the same calls.
Approach: the same
#if defined(_WIN32)helper the repository already uses in one of the two shapes italready has —
set_envas in src/kernels/decode_cluster_parity.cpp,put/unsetas insrc/prefill/kva_test.cpp.
_putenv_s(name, "")removes the variable on Windows, which is what--offneeds: the reader is
v != nullptr && std::atoi(v) != 0(src/kernels/cuda/fused_gr.cu:3156), so an emptyvalue reads as off. No engine path changes.
Validation:
Passed: HIP build with tests on an RX 7600 XT (gfx1102), ROCm 10.2.0a20260930, clang 24.0.0 with the
MSVC CRT (not MSVC itself).
tools\hip\build_windows.bat tests→ 250 targets, no error.ctest --test-dir build-hip-gfx1102 --output-on-failure --timeout 120 -E '^(ple_parity|platform_memory_test)$'→ 167 passed, 5 failed, 10 not run;
hc_persist_parityandhc_persist_default_offpassed.The same build before the change stopped at
hc_persist_parity.cpp:55: use of undeclared identifier 'unsetenv'(log: build-gfx1102-run1.log).
Failed: none observed for this change.
Not run: MSVC compilation of the three files; the CUDA build —
gdn_chunk_parityandgdn_chunk_benchare gated on STRATA_ENABLE_CUDA, so they were never compiled or registered on this machine, and their
behavior after the change is unverified.
Limits: test compilation only. The CUDA check needs a machine with a CUDA toolchain.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.