You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_sd_cpp_install.py: the non-safe_extractall tests cannot pass on Windows (fixtures hard-code the POSIX binary name) #9607
The non-safe_extractall tests in studio/backend/tests/test_sd_cpp_install.py cannot pass on a Windows host as written. This is pre-existing and unrelated to any current PR: the failing set is identical on fdf83cb and on later heads, so nothing recent introduced it.
It surfaced while validating #9270 on a Windows AMD machine, and is filed separately because it is out of scope there.
Measured
On a Windows 11 host (10.0.26200, NTFS, developer mode off), running the whole file under the studio venv:
commit
failed
passed
skipped
fdf83cb (base)
23
93
0
3592dff
23
113
21
comm over the two sorted failure lists reports zero entries on either side: same set, no regressions and no accidental fixes.
Independently on Linux, with sys.platform pinned to win32 inside the installer module, the same comparison gives 22 failures with identical sets on both commits. The one-test difference between 22 and 23 is the limit of that simulation: pinning sys.platform leaves platform.system(), os.name and path separators Linux-shaped, so a real Windows host finds one more. Worth knowing before anyone tries to reproduce this without Windows.
Cause
17 of them are one family:
RuntimeError: archive sd-master-...-bin-Linux-Ubuntu-24.04-x86_64.zip contained no sd-cli binary
The fixtures build synthetic archives containing sd-cli, but on Windows:
so install() correctly refuses an archive that supplied no sd-cli.exe. The product code is right; the fixtures hard-code the POSIX name.
The remaining handful are two cudart 404 assertions, a regex assertion, an OSError, and two in the same family.
Why it went unnoticed
studio-backend-ci.yml runs pytest tests/ on ubuntu-latest only. No Windows or macOS leg touches this file, so these tests have never executed on Windows.
Suggested direction
Build the fixture archives from _binary_names() rather than a literal sd-cli, so the member names follow the host the test runs on. That fixes the 17 directly and is a mechanical change.
Worth deciding separately whether a Windows CI leg should exist for this file. The safe_extractall subset already runs anywhere with only pytest:
which is 22 passed / 18 skipped on Windows and needs none of the backend stack. The rest of the file needs the studio venv, so a leg covering the whole file is a larger commitment than a leg covering the extraction tests.
I have a Windows 11 machine and can take this one.
Plan is the mechanical change you described: build the fixture archive members from _binary_names() instead of the literal sd-cli, following
the _CLI pattern already at line 411 and the suffix pattern at 2331. Scoping it to the 17-test family plus the two related ones. Leaving the cudart 404 assertions, the regex assertion and the OSError out of this PR, and not touching the Windows CI leg question here. Will post before and after failure counts from the real Windows run.
Activity
derrickrajkumar10 commentedon Aug 25, 2026
I have a Windows 11 machine and can take this one.
Plan is the mechanical change you described: build the fixture archive members from
_binary_names()instead of the literalsd-cli, followingthe
_CLIpattern already at line 411 and the suffix pattern at 2331. Scoping it to the 17-test family plus the two related ones. Leaving the cudart 404 assertions, the regex assertion and the OSError out of this PR, and not touching the Windows CI leg question here. Will post before and after failure counts from the real Windows run.