Skip to content

windows-msvc CI is RED on main: test_backend_cross_device.cpp uses POSIX setenv/unsetenv, which MSVC does not provide #603

Description

@localai-bot

The windows-msvc-vulkan (and windows-msvc-cpu) CI legs fail on main and therefore on every PR branched from it.

tests\vt\test_backend_cross_device.cpp(1004,5): error C3861: setenv: identifier not found
tests\vt\test_backend_cross_device.cpp(1048,5): error C3861: setenv: identifier not found
tests\vt\test_backend_cross_device.cpp(1050,5): error C3861: unsetenv: identifier not found

setenv/unsetenv are POSIX; MSVC provides _putenv_s instead. The three call sites manipulate VT_FUSED_TIER around a tier sweep.

Introduced by 13bb7241f ("feat(backend): Metal W0 — enabling fixes + vt::Backend/Platform skeleton"). Confirmed present in git show origin/main:tests/vt/test_backend_cross_device.cpp.

Not introduced by any row currently in flight. Found while reviewing CI on #601, whose diff does not contain this file (git diff --name-only origin/main <branch> | grep test_backend_cross_device → no match). Any PR opened against current main will show this as a red Windows leg; the main baseline must be subtracted before attributing it.

Fix is a small portability shim — the repo already needs one wherever env vars are set from tests on Windows. Options: a helper that maps to _putenv_s under _MSC_VER, or guard the tier sweep out on MSVC (worse: it silently drops coverage on that platform).

Worth checking whether other tests set environment variables the same way, so the shim lands once rather than per-site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions